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 238238 </Binding >
239239 </TextBox .Text>
240240 </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+
241253 </Grid >
242254</UserControl >
Original file line number Diff line number Diff line change @@ -11,6 +11,11 @@ public static class ComboBoxAssist
1111 {
1212 #region ShowSelectedItem
1313
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>
1419 public static readonly DependencyProperty ShowSelectedItemProperty = DependencyProperty . RegisterAttached (
1520 "ShowSelectedItem" ,
1621 typeof ( bool ) ,
You can’t perform that action at this time.
0 commit comments