I\'ve a combobox in WPF with 4 static values in it:
Since you don't add strings, but ComboBoxItems to your ComboBox, you would also have to set its SelectedValuePath
property:
Alt
Shift
Ctrl
Win
Alternatively add strings to the ComboBox, and use SelectedItem
instead of SelectedValue
:
xmlns:sys="clr-namespace:System;assembly=mscorlib"
...
Alt
Shift
Ctrl
Win
Note also that since WPF 4.5 you may write the Binding like this:
SelectedItem="{Binding Path=(properties:Settings.Default).KeyModifier, Mode=TwoWay}"