File tree Expand file tree Collapse file tree 2 files changed +17
-0
lines changed Expand file tree Collapse file tree 2 files changed +17
-0
lines changed Original file line number Diff line number Diff line change 238
238
</Binding >
239
239
</TextBox .Text>
240
240
</TextBox >
241
+ <CheckBox Grid.Row=" 9" Grid.Column=" 4"
242
+ x : Name =" DisplaySelectedItemCheckBox"
243
+ Margin =" 0 8 0 0" >Display Selected Item In Drop Down</CheckBox >
244
+ <ComboBox Grid.Row=" 10" Grid.Column=" 4"
245
+ materialDesign:ComboBoxAssist.ShowSelectedItem=" {Binding ElementName=DisplaySelectedItemCheckBox, Path=IsChecked}"
246
+ Margin =" 0 8 0 8" HorizontalAlignment =" Left" >
247
+ <ComboBoxItem IsSelected =" True" >Apple</ComboBoxItem >
248
+ <ComboBoxItem >Banana</ComboBoxItem >
249
+ <ComboBoxItem >Pear</ComboBoxItem >
250
+ <ComboBoxItem >Orange</ComboBoxItem >
251
+ </ComboBox >
252
+
241
253
</Grid >
242
254
</UserControl >
Original file line number Diff line number Diff line change @@ -11,6 +11,11 @@ public static class ComboBoxAssist
11
11
{
12
12
#region ShowSelectedItem
13
13
14
+ /// <summary>
15
+ /// By default the selected item his hidden from the drop down list, as per Material Design specifications.
16
+ /// To revert to a more classic Windows desktop behaviour, and show the currently selected item again in the drop
17
+ /// down, set this attached propety to true.
18
+ /// </summary>
14
19
public static readonly DependencyProperty ShowSelectedItemProperty = DependencyProperty . RegisterAttached (
15
20
"ShowSelectedItem" ,
16
21
typeof ( bool ) ,
You can’t perform that action at this time.
0 commit comments