1
1
<UserControl x : Class =" MaterialDesignColors.WpfExample.Toggles"
2
2
xmlns =" http://schemas.microsoft.com/winfx/2006/xaml/presentation"
3
3
xmlns : x =" http://schemas.microsoft.com/winfx/2006/xaml"
4
- xmlns : mc =" http://schemas.openxmlformats.org/markup-compatibility/2006"
5
- xmlns : d =" http://schemas.microsoft.com/expression/blend/2008"
4
+ xmlns : mc =" http://schemas.openxmlformats.org/markup-compatibility/2006"
5
+ xmlns : d =" http://schemas.microsoft.com/expression/blend/2008"
6
6
xmlns : materialDesign =" http://materialdesigninxaml.net/winfx/xaml/themes"
7
7
xmlns : smtx =" clr-namespace:ShowMeTheXAML;assembly=ShowMeTheXAML"
8
8
xmlns : domain =" clr-namespace:MaterialDesignDemo.Domain"
9
- mc : Ignorable =" d"
9
+ mc : Ignorable =" d"
10
10
d : DesignHeight =" 700" d : DesignWidth =" 800" >
11
11
<Grid >
12
12
<Grid .RowDefinitions>
25
25
<ColumnDefinition Width =" 1*" />
26
26
</Grid .ColumnDefinitions>
27
27
<TextBlock Style =" {StaticResource MaterialDesignHeadline5TextBlock}" >Toggles</TextBlock >
28
- <StackPanel Grid.Row=" 1" Orientation =" Horizontal" Margin =" 0 24 0 0" >
28
+ <StackPanel Grid.Row=" 1" Grid.Column= " 0 " Orientation =" Horizontal" Margin =" 0 24 0 0" >
29
29
<smtx : XamlDisplay Key =" buttons_33" Margin =" 5 5 8 8" >
30
30
<ToggleButton Content =" C" Style =" {StaticResource MaterialDesignActionLightToggleButton}" IsChecked =" True"
31
- ToolTip =" MaterialDesignActionLightToggleButton" />
31
+ ToolTip =" MaterialDesignActionLightToggleButton" />
32
32
</smtx : XamlDisplay >
33
33
<smtx : XamlDisplay Key =" buttons_34" Margin =" 0 5 8 8" >
34
34
<ToggleButton Content =" H" Style =" {StaticResource MaterialDesignActionToggleButton}"
35
- ToolTip =" MaterialDesignActionToggleButton"
36
- materialDesign:ShadowAssist.ShadowDepth=" Depth3" />
35
+ ToolTip =" MaterialDesignActionToggleButton"
36
+ materialDesign:ShadowAssist.ShadowDepth=" Depth3" />
37
37
</smtx : XamlDisplay >
38
38
<smtx : XamlDisplay Key =" buttons_35" Margin =" 0 5 8 8" >
39
39
<!-- checkbox style same as toggle button -->
40
40
<CheckBox Content =" E" Style =" {StaticResource MaterialDesignActionDarkCheckBox}"
41
- ToolTip =" MaterialDesignActionDarkCheckBox" />
41
+ ToolTip =" MaterialDesignActionDarkCheckBox" />
42
42
</smtx : XamlDisplay >
43
43
<smtx : XamlDisplay Key =" buttons_36" Margin =" 0 5 8 8" >
44
44
<ToggleButton Content =" C" Style =" {StaticResource MaterialDesignActionAccentToggleButton}"
45
- IsChecked =" True"
46
- ToolTip =" MaterialDesignActionAccentToggleButton" />
45
+ IsChecked =" True"
46
+ ToolTip =" MaterialDesignActionAccentToggleButton" />
47
47
</smtx : XamlDisplay >
48
48
<smtx : XamlDisplay Key =" buttons_37" Margin =" 0 5 8 8" >
49
49
<ToggleButton Content =" K" Style =" {StaticResource MaterialDesignActionToggleButton}" IsEnabled =" False"
50
- ToolTip =" MaterialDesignActionToggleButton" />
50
+ ToolTip =" MaterialDesignActionToggleButton" />
51
51
</smtx : XamlDisplay >
52
52
<smtx : XamlDisplay Key =" buttons_38" Margin =" 0 5 8 8" >
53
53
<ToggleButton Style =" {StaticResource MaterialDesignActionToggleButton}"
54
- ToolTip =" MaterialDesignActionToggleButton" >
55
- <Image Source =" Resources/ProfilePic.jpg" ></ Image >
54
+ ToolTip =" MaterialDesignActionToggleButton" >
55
+ <Image Source =" Resources/ProfilePic.jpg" / >
56
56
</ToggleButton >
57
57
</smtx : XamlDisplay >
58
58
<TextBlock Margin =" 16 0 8 0" VerticalAlignment =" Center" >Customise On Content:</TextBlock >
59
59
<smtx : XamlDisplay Key =" buttons_39" >
60
60
<ToggleButton Style =" {StaticResource MaterialDesignActionToggleButton}"
61
- ToolTip =" MaterialDesignActionLightToggleButton" >
61
+ ToolTip =" MaterialDesignActionLightToggleButton" >
62
62
<ToggleButton .Content>
63
63
<materialDesign : PackIcon Kind =" EmoticonSad" />
64
64
</ToggleButton .Content>
82
82
</RadioButton >
83
83
</smtx : XamlDisplay >
84
84
<smtx : XamlDisplay Key =" buttons_41" Margin =" 0 5 8 8" VerticalAlignment =" Center" >
85
- <RadioButton Style =" {StaticResource MaterialDesignRadioButton}" >
85
+ <RadioButton Style =" {StaticResource MaterialDesignRadioButton}" >
86
86
Ga Ga
87
87
</RadioButton >
88
88
</smtx : XamlDisplay >
109
109
</CheckBox >
110
110
</smtx : XamlDisplay >
111
111
<smtx : XamlDisplay Key =" buttons_45" Margin =" 0 5 8 8" VerticalAlignment =" Center" >
112
- <CheckBox Style =" {StaticResource MaterialDesignCheckBox}" IsEnabled =" False" IsChecked =" True" >
112
+ <CheckBox Style =" {StaticResource MaterialDesignCheckBox}" IsEnabled =" False" IsChecked =" True" >
113
113
Disabled
114
114
</CheckBox >
115
115
</smtx : XamlDisplay >
136
136
</StackPanel >
137
137
<StackPanel Grid.Column=" 0" Grid.Row=" 4" Margin =" 0 24 0 0" Orientation =" Horizontal" >
138
138
<smtx : XamlDisplay Key =" buttons_46" VerticalAlignment =" Center" Margin =" 5 0 0 0" >
139
- <ToggleButton Style =" {StaticResource MaterialDesignSwitchToggleButton}" ToolTip =" Default ToggleButton Style" />
139
+ <ToggleButton Style =" {StaticResource MaterialDesignSwitchToggleButton}" ToolTip =" Default ToggleButton Style" />
140
140
</smtx : XamlDisplay >
141
141
<smtx : XamlDisplay Key =" buttons_47" VerticalAlignment =" Center" Margin =" 8 0 0 0" >
142
142
<ToggleButton Style =" {StaticResource MaterialDesignSwitchToggleButton}" IsEnabled =" False" />
143
143
</smtx : XamlDisplay >
144
144
<smtx : XamlDisplay Key =" buttons_48" VerticalAlignment =" Center" Margin =" 8 0 0 0" >
145
145
<ToggleButton Style =" {StaticResource MaterialDesignSwitchLightToggleButton}"
146
- ToolTip =" MaterialDesignSwitchLightToggleButton" IsChecked =" True" />
146
+ ToolTip =" MaterialDesignSwitchLightToggleButton" IsChecked =" True" />
147
147
</smtx : XamlDisplay >
148
148
<smtx : XamlDisplay Key =" buttons_49" VerticalAlignment =" Center" Margin =" 8 0 0 0" >
149
- <ToggleButton Style =" {StaticResource MaterialDesignSwitchToggleButton}"
150
- ToolTip =" MaterialDesignSwitchToggleButton" IsChecked =" True" />
149
+ <ToggleButton Style =" {StaticResource MaterialDesignSwitchToggleButton}"
150
+ ToolTip =" MaterialDesignSwitchToggleButton" IsChecked =" True" />
151
151
</smtx : XamlDisplay >
152
152
<smtx : XamlDisplay Key =" buttons_50" VerticalAlignment =" Center" Margin =" 8 0 0 0" >
153
153
<ToggleButton Style =" {StaticResource MaterialDesignSwitchDarkToggleButton}"
154
- ToolTip =" MaterialDesignSwitchDarkToggleButton" IsChecked =" True" />
154
+ ToolTip =" MaterialDesignSwitchDarkToggleButton" IsChecked =" True" />
155
155
</smtx : XamlDisplay >
156
156
<smtx : XamlDisplay Key =" buttons_51" VerticalAlignment =" Center" Margin =" 8 0 0 0" >
157
- <ToggleButton Style =" {StaticResource MaterialDesignSwitchAccentToggleButton}"
158
- ToolTip =" MaterialDesignSwitchAccentToggleButton" IsChecked =" True" />
157
+ <ToggleButton Style =" {StaticResource MaterialDesignSwitchAccentToggleButton}"
158
+ ToolTip =" MaterialDesignSwitchAccentToggleButton" IsChecked =" True" />
159
159
</smtx : XamlDisplay >
160
- <smtx : XamlDisplay Key =" buttons_52" VerticalAlignment =" Center" Margin =" 8 0 0 0" >
160
+ <smtx : XamlDisplay Key =" buttons_52" VerticalAlignment =" Center" Margin =" 8 0 0 0" >
161
161
<ToggleButton Style =" {StaticResource MaterialDesignSwitchToggleButton}"
162
- ToolTip =" MaterialDesignSwitchToggleButton with Content and ToggleButtonAssist.OnContent" >
162
+ ToolTip =" MaterialDesignSwitchToggleButton with Content and ToggleButtonAssist.OnContent" >
163
163
<materialDesign : PackIcon Kind =" Pin" RenderTransformOrigin =" .5,.5" >
164
164
<materialDesign : PackIcon .RenderTransform>
165
165
<RotateTransform Angle =" 45" />
166
166
</materialDesign : PackIcon .RenderTransform>
167
167
</materialDesign : PackIcon >
168
168
<materialDesign : ToggleButtonAssist .OnContent>
169
- <materialDesign : PackIcon Kind =" Pin" />
169
+ <materialDesign : PackIcon Kind =" Pin" />
170
170
</materialDesign : ToggleButtonAssist .OnContent>
171
171
</ToggleButton >
172
172
</smtx : XamlDisplay >
173
173
<smtx : XamlDisplay Key =" buttons_64" VerticalAlignment =" Center" Margin =" 8 0 0 0" >
174
174
<ToggleButton Style =" {StaticResource MaterialDesignSwitchToggleButton}" ToolTip =" MaterialDesignSwitchToggleButton with Custom Track Background" >
175
175
<materialDesign : ToggleButtonAssist .SwitchTrackOnBackground>
176
- <SolidColorBrush Color =" Green" />
176
+ <SolidColorBrush Color =" Green" />
177
177
</materialDesign : ToggleButtonAssist .SwitchTrackOnBackground>
178
178
<materialDesign : ToggleButtonAssist .SwitchTrackOffBackground>
179
- <SolidColorBrush Color =" Red" />
179
+ <SolidColorBrush Color =" Red" />
180
180
</materialDesign : ToggleButtonAssist .SwitchTrackOffBackground>
181
181
</ToggleButton >
182
182
</smtx : XamlDisplay >
187
187
<materialDesign : PackIcon Kind =" Paperclip" Height =" 21" Width =" 21" />
188
188
</ToggleButton >
189
189
</smtx : XamlDisplay >
190
- <smtx : XamlDisplay Key =" buttons_54" Margin =" 8 0 0 0" VerticalAlignment =" Center" >
190
+ <smtx : XamlDisplay Key =" buttons_54" Margin =" 8 0 0 0" VerticalAlignment =" Center" >
191
191
<ToggleButton Style =" {StaticResource MaterialDesignFlatPrimaryToggleButton}"
192
- ToolTip =" MaterialDesignFlatPrimaryToggleButton"
193
- IsChecked =" True" >
192
+ ToolTip =" MaterialDesignFlatPrimaryToggleButton"
193
+ IsChecked =" True" >
194
194
<materialDesign : PackIcon Kind =" Heart" Height =" 21" Width =" 21" />
195
195
</ToggleButton >
196
196
</smtx : XamlDisplay >
197
197
<smtx : XamlDisplay Key =" buttons_55" Margin =" 8 0 0 0" VerticalAlignment =" Center" >
198
198
<ToggleButton Style =" {StaticResource MaterialDesignFlatPrimaryToggleButton}"
199
- ToolTip =" MaterialDesignFlatPrimaryToggleButton"
200
- IsEnabled =" False" >
199
+ ToolTip =" MaterialDesignFlatPrimaryToggleButton"
200
+ IsEnabled =" False" >
201
201
<materialDesign : PackIcon Kind =" Heart" Height =" 21" Width =" 21" />
202
202
</ToggleButton >
203
203
</smtx : XamlDisplay >
213
213
</StackPanel >
214
214
</ListBox .ToolTip>
215
215
<ListBoxItem >
216
- <materialDesign : PackIcon Kind =" FormatAlignLeft" />
216
+ <materialDesign : PackIcon Kind =" FormatAlignLeft" />
217
217
</ListBoxItem >
218
218
<ListBoxItem >
219
- <materialDesign : PackIcon Kind =" FormatAlignCenter" />
219
+ <materialDesign : PackIcon Kind =" FormatAlignCenter" />
220
220
</ListBoxItem >
221
221
<ListBoxItem >
222
- <materialDesign : PackIcon Kind =" FormatAlignRight" />
222
+ <materialDesign : PackIcon Kind =" FormatAlignRight" />
223
223
</ListBoxItem >
224
224
<ListBoxItem >
225
- <materialDesign : PackIcon Kind =" FormatAlignJustify" />
225
+ <materialDesign : PackIcon Kind =" FormatAlignJustify" />
226
226
</ListBoxItem >
227
227
</ListBox >
228
228
</smtx : XamlDisplay >
229
229
<smtx : XamlDisplay Key =" buttons_57" Grid.Column=" 1" Grid.Row=" 4" HorizontalAlignment =" Left" Margin =" 0 24 0 0" >
230
- <ListBox SelectionMode =" Extended" Style =" {StaticResource MaterialDesignToolToggleFlatListBox}" >
230
+ <ListBox SelectionMode =" Extended" Style =" {StaticResource MaterialDesignToolToggleFlatListBox}" >
231
231
<ListBox .ToolTip>
232
232
<StackPanel >
233
233
<TextBlock Text =" MaterialDesignToolToggleListBox" />
236
236
</StackPanel >
237
237
</ListBox .ToolTip>
238
238
<ListBoxItem >
239
- <materialDesign : PackIcon Kind =" FormatBold" />
239
+ <materialDesign : PackIcon Kind =" FormatBold" />
240
240
</ListBoxItem >
241
241
<ListBoxItem >
242
- <materialDesign : PackIcon Kind =" FormatItalic" />
242
+ <materialDesign : PackIcon Kind =" FormatItalic" />
243
243
</ListBoxItem >
244
- <ListBoxItem x : Name = " UnderlineCheckbox " >
245
- <materialDesign : PackIcon Kind =" FormatUnderline" />
244
+ <ListBoxItem >
245
+ <materialDesign : PackIcon Kind =" FormatUnderline" />
246
246
</ListBoxItem >
247
247
</ListBox >
248
248
</smtx : XamlDisplay >
249
249
<StackPanel Grid.Column=" 1" Grid.Row=" 5" Margin =" 0 24 0 0" >
250
250
<smtx : XamlDisplay Key =" buttons_60" HorizontalAlignment =" Left" >
251
251
<StackPanel Orientation =" Horizontal" Margin =" 4" >
252
- <RadioButton Style =" {StaticResource MaterialDesignTabRadioButton}" Margin =" 4" IsChecked =" True" Content =" FIRST" />
253
- <RadioButton Style =" {StaticResource MaterialDesignTabRadioButton}" Margin =" 4" IsChecked =" False" Content =" SECOND" />
254
- <RadioButton Style =" {StaticResource MaterialDesignTabRadioButton}" Margin =" 4" IsChecked =" False" Content =" THIRD" />
252
+ <RadioButton Style =" {StaticResource MaterialDesignTabRadioButton}" Margin =" 4" IsChecked =" True" Content =" FIRST" />
253
+ <RadioButton Style =" {StaticResource MaterialDesignTabRadioButton}" Margin =" 4" IsChecked =" False" Content =" SECOND" />
254
+ <RadioButton Style =" {StaticResource MaterialDesignTabRadioButton}" Margin =" 4" IsChecked =" False" Content =" THIRD" />
255
255
</StackPanel >
256
256
</smtx : XamlDisplay >
257
257
<smtx : XamlDisplay Key =" buttons_61" HorizontalAlignment =" Left" >
258
258
<materialDesign : ColorZone Mode =" PrimaryMid" >
259
- <StackPanel Orientation =" Horizontal" Margin =" 2" >
260
- <RadioButton Style =" {StaticResource MaterialDesignTabRadioButton}" Margin =" 4" IsChecked =" True" Content =" FIRST" />
261
- <RadioButton Style =" {StaticResource MaterialDesignTabRadioButton}" Margin =" 4" IsChecked =" False" Content =" SECOND" />
262
- <RadioButton Style =" {StaticResource MaterialDesignTabRadioButton}" Margin =" 4" IsChecked =" False" Content =" THIRD" />
259
+ <StackPanel Orientation =" Horizontal" Margin =" 2" >
260
+ <RadioButton Style =" {StaticResource MaterialDesignTabRadioButton}" Margin =" 4" IsChecked =" True" Content =" FIRST" />
261
+ <RadioButton Style =" {StaticResource MaterialDesignTabRadioButton}" Margin =" 4" IsChecked =" False" Content =" SECOND" />
262
+ <RadioButton Style =" {StaticResource MaterialDesignTabRadioButton}" Margin =" 4" IsChecked =" False" Content =" THIRD" />
263
263
</StackPanel >
264
264
</materialDesign : ColorZone >
265
265
</smtx : XamlDisplay >
266
266
267
267
</StackPanel >
268
- <Border Margin =" 0 24 0 0" BorderThickness =" 0 1 0 0" BorderBrush =" {DynamicResource MaterialDesignDivider}" Grid.Row=" 6" Grid.ColumnSpan=" 2" />
269
- <TextBlock Grid.Row=" 7" Style =" {StaticResource MaterialDesignHeadline5TextBlock}" Margin =" 0 24" >Checkboxes</TextBlock >
270
- <smtx : XamlDisplay Key =" fields_35 " Grid.Row=" 8" HorizontalAlignment =" Left" >
268
+ <Border Margin =" 0 24 0 0" BorderThickness =" 0 1 0 0" BorderBrush =" {DynamicResource MaterialDesignDivider}" Grid.Row=" 6" Grid.Column= " 0 " Grid. ColumnSpan=" 2" />
269
+ <TextBlock Grid.Row=" 7" Grid.Column= " 0 " Style =" {StaticResource MaterialDesignHeadline5TextBlock}" Margin =" 0 24" >Checkboxes</TextBlock >
270
+ <smtx : XamlDisplay Key =" checkboxes_1 " Grid.Row=" 8" Grid.Column= " 0 " HorizontalAlignment =" Left" >
271
271
<StackPanel Margin =" 8 0" >
272
272
<CheckBox IsChecked =" True" >Checked</CheckBox >
273
273
<CheckBox IsChecked =" False" >Unchecked</CheckBox >
277
277
<CheckBox IsChecked =" {x:Null}" IsEnabled =" False" >Disabled Indeterminate</CheckBox >
278
278
</StackPanel >
279
279
</smtx : XamlDisplay >
280
+ <smtx : XamlDisplay Key =" checkboxes_2" Grid.Row=" 8" Grid.Column=" 1" HorizontalAlignment =" Left" VerticalAlignment =" Top" >
281
+ <StackPanel Margin =" 8 0" >
282
+ <CheckBox IsChecked =" True" materialDesign:CheckBoxAssist.CheckBoxSize=" 30" >Custom Size</CheckBox >
283
+ </StackPanel >
284
+ </smtx : XamlDisplay >
280
285
</Grid >
281
- </UserControl >
282
-
286
+ </UserControl >
0 commit comments