Hello All,
The following appears in a data template:
<ComboBox IsSynchronizedWithCurrentItem="False"
SelectedIndex="0"
SelectedItem="{Binding Path=Value, Mode=OneWayToSource}"
ItemsSource="{Binding Path=EnumeratedValues, Mode=OneTime}"/>
With SelectedIndex
being set (as shown above), the OneWayToSource
binding to Value
does not work. If I do not set SelectedIndex
the binding to Value
is fine.
However, I'd really like to set SelectedIndex
to 0 because if I omit setting it, no item is selected by default in the ComboBox
.
Can anybody see a way that I can keep my binding to Value
working while at the same time ensuring that the first item in the ComboBox
is selected by default?