-
-
Notifications
You must be signed in to change notification settings - Fork 60
Expand file tree
/
Copy pathClipboardActionsPage.xaml
More file actions
51 lines (50 loc) · 2.64 KB
/
Copy pathClipboardActionsPage.xaml
File metadata and controls
51 lines (50 loc) · 2.64 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
<Page x:Class="WinUI.TableView.SampleApp.Pages.ClipboardActionsPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:controls="using:WinUI.TableView.SampleApp.Controls"
xmlns:local="using:WinUI.TableView.SampleApp"
xmlns:tv="using:WinUI.TableView"
d:DataContext="{d:DesignInstance Type=local:ExampleViewModel}"
mc:Ignorable="d">
<Grid>
<controls:SamplePresenter Header="Clipboard Actions">
<controls:SamplePresenter.Description>
<x:String xml:space="preserve">Use Ctrl+C, Ctrl+Shift+C or the corner options menu to copy the current selection.
Paste tab-delimited data from Excel with Ctrl+V or the same menu.</x:String>
</controls:SamplePresenter.Description>
<controls:SamplePresenter.Example>
<tv:TableView x:Name="tableView"
CanCopy="{x:Bind canCopyToggle.IsOn, Mode=TwoWay}"
CanPaste="{x:Bind canPasteToggle.IsOn, Mode=TwoWay}"
ItemsSource="{Binding Items}"
AutoGeneratingColumn="{x:Bind local:ExampleModelColumnsHelper.OnAutoGeneratingColumns}" />
</controls:SamplePresenter.Example>
<controls:SamplePresenter.Options>
<StackPanel Spacing="8">
<ToggleSwitch x:Name="canCopyToggle"
Header="Can Copy"
IsOn="True" />
<ToggleSwitch x:Name="canPasteToggle"
Header="Can Paste"
IsOn="True" />
</StackPanel>
</controls:SamplePresenter.Options>
<controls:SamplePresenter.Xaml>
<x:String xml:space="preserve">
<tv:TableView x:Name="tableView"
CanCopy="$(CanCopy)"
CanPaste="$(CanPaste)"
ItemsSource="{Binding Items}" />
</x:String>
</controls:SamplePresenter.Xaml>
<controls:SamplePresenter.Substitutions>
<controls:CodeSubstitution Key="CanCopy"
Value="{x:Bind tableView.CanCopy, Mode=OneWay}" />
<controls:CodeSubstitution Key="CanPaste"
Value="{x:Bind tableView.CanPaste, Mode=OneWay}" />
</controls:SamplePresenter.Substitutions>
</controls:SamplePresenter>
</Grid>
</Page>