-
Notifications
You must be signed in to change notification settings - Fork 913
Expand file tree
/
Copy pathCheckListsView.xaml
More file actions
206 lines (187 loc) · 9.45 KB
/
Copy pathCheckListsView.xaml
File metadata and controls
206 lines (187 loc) · 9.45 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
<!--*************************************************************************************
Toolkit for WPF
Copyright (C) 2007-2016 Xceed Software Inc.
This program is provided to you under the terms of the Microsoft Public
License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license
For more features, controls, and fast professional support,
pick up the Plus Edition at https://xceed.com/xceed-toolkit-plus-for-wpf/
Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
***********************************************************************************-->
<local:DemoView x:Class="Xceed.Wpf.Toolkit.LiveExplorer.Samples.CheckLists.Views.CheckListsView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:Xceed.Wpf.Toolkit.LiveExplorer"
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
xmlns:s="clr-namespace:System;assembly=mscorlib"
x:Name="demo"
Title="Check lists">
<local:DemoView.Description>
<Paragraph FontSize="14" FontFamily="Segoe">
The CheckListBox and CheckComboBox controls represent a list of selected items that are displayed as CheckBoxes. Besides the common SelectedItem and SelectedItems properties, these controls give developers more alternatives for managing and handling selections.
</Paragraph>
</local:DemoView.Description>
<local:DemoView.Resources>
<x:Array x:Key="personProperties" Type="s:String">
<s:String>ID</s:String>
<s:String>FirstName</s:String>
<s:String>LastName</s:String>
</x:Array>
</local:DemoView.Resources>
<Grid >
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<GroupBox Header="Features" Grid.Row="0" Margin="5">
<Grid>
<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition />
<RowDefinition />
<RowDefinition />
<RowDefinition />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<TextBlock Grid.Row="0" Grid.Column="0"
Text="Delimiter:"
Margin="2,5,5,5"/>
<TextBox x:Name="_delimiter"
Grid.Row="0" Grid.Column="1"
Width="200"
Margin="5"
HorizontalAlignment="Left"
Text="," />
<TextBlock Grid.Row="1" Grid.Column="0"
Text="ValueMemberPath:"
Margin="2,5,5,5"/>
<ComboBox x:Name="_valueMemberPath"
Grid.Row="1" Grid.Column="1"
HorizontalAlignment="Left"
Width="100"
Margin="5"
ItemsSource="{StaticResource personProperties}"
SelectedIndex="0"/>
<TextBlock Grid.Row="2" Grid.Column="0"
Text="SelectedValue:"
Margin="2,5,5,5"/>
<TextBox x:Name="_selectedValue"
Grid.Row="2" Grid.Column="1"
Width="200"
Margin="5"
HorizontalAlignment="Left"
Text="{Binding ElementName=_checkListBox, Path=SelectedValue, Mode=TwoWay}"/>
<TextBlock Grid.Row="3" Grid.Column="0"
Text="SelectedMemberPath:"
Margin="2,5,5,5"/>
<TextBox x:Name="_selectedMemberPath"
Grid.Row="3" Grid.Column="1"
Margin="5"
Width="125"
HorizontalAlignment="Left"
IsEnabled="False"
Text="IsSelected" />
<TextBlock Grid.Row="4" Grid.Column="0"
Text="AllowFilter:"
Margin="2,5,5,5"/>
<CheckBox x:Name="_isAllowFilter"
Grid.Row="4" Grid.Column="1"
Margin="5"
HorizontalAlignment="Left"
ClickMode="Press"
IsChecked="False" />
<TextBlock Grid.Row="0" Grid.Column="2"
Text="DisplayMemberPath:"
Margin="5"/>
<ComboBox x:Name="_displayMemberPath"
Grid.Row="0" Grid.Column="3"
Width="125"
Margin="5"
HorizontalAlignment="Left"
ItemsSource="{StaticResource personProperties}"
SelectedIndex="1"/>
<TextBlock Grid.Row="1"
Grid.Column="2"
Text="IsEditable:"
Margin="5" />
<CheckBox x:Name="_isEditable"
Grid.Row="1"
Grid.Column="3"
Margin="5"
HorizontalAlignment="Left"
Content="(CheckComboBox only)"
ClickMode="Press"
IsChecked="{Binding IsEditable, ElementName=_checkComboBox}" />
<TextBlock Grid.Row="2" Grid.Column="2"
Text="IsDropDownOpen:"
Margin="5"/>
<CheckBox x:Name="_isDropDownOpen"
Grid.Row="2" Grid.Column="3"
Margin="5"
HorizontalAlignment="Left"
Content="(CheckComboBox only)"
ClickMode="Press"
IsChecked="{Binding IsDropDownOpen, ElementName=_checkComboBox}" />
<TextBlock Grid.Row="3" Grid.Column="2"
Text="MaxDropDownHeight:"
Margin="5"/>
<StackPanel Orientation="Horizontal"
Grid.Row="3" Grid.Column="3"
HorizontalAlignment="Left"
Margin="5">
<xctk:DoubleUpDown x:Name="_maxDropDownHeight"
Width="45"
Value="{Binding MaxDropDownHeight, ElementName=_checkComboBox}"
DefaultValue="150"
AllowInputSpecialValues="PositiveInfinity"
Minimum="0"/>
<TextBlock Text="(CheckComboBox only)"
Margin="4"/>
</StackPanel>
</Grid>
</GroupBox>
<GroupBox Header="Item Models" Grid.Row="1" Margin="5">
<ListBox x:Name="_itemModels" DisplayMemberPath="ModelDisplay" FontFamily="Global Monospace"/>
</GroupBox>
<Grid Grid.Row="2">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<TextBlock Text="CheckListBox Usage:" Margin="5" Style="{StaticResource Header}" />
<xctk:CheckListBox x:Name="_checkListBox"
Grid.Column="0"
Grid.Row="1"
Margin="5"
VerticalAlignment="Stretch"
Delimiter="{Binding ElementName=_delimiter, Path=Text}"
ValueMemberPath="{Binding ElementName=_valueMemberPath, Path=SelectedItem}"
SelectedMemberPath="{Binding ElementName=_selectedMemberPath, Path=Text}"
DisplayMemberPath="{Binding ElementName=_displayMemberPath, Path=SelectedItem}"
AllowFilter="{Binding ElementName=_isAllowFilter, Path=IsChecked}" />
<TextBlock Text="CheckComboBox Usage:" Grid.Column="1" Margin="5" Style="{StaticResource Header}"/>
<xctk:CheckComboBox Grid.Column="1"
x:Name="_checkComboBox"
Grid.Row="1"
Margin="5"
VerticalAlignment="Top"
Delimiter="{Binding ElementName=_delimiter, Path=Text}"
ValueMemberPath="{Binding ElementName=_valueMemberPath, Path=SelectedItem}"
SelectedMemberPath="{Binding ElementName=_selectedMemberPath, Path=Text}"
DisplayMemberPath="{Binding ElementName=_displayMemberPath, Path=SelectedItem}"
AllowFilter="{Binding ElementName=_isAllowFilter, Path=IsChecked}"
IsEditable="False"
IsDropDownOpen="false"
MaxDropDownHeight="100"/>
</Grid>
</Grid>
</local:DemoView>