I have a ComboBox that is bound to a list of items, and initially the first item in the list is selected:
<ComboBox ItemsSource="{StaticResource items}" SelectedIndex="0" IsEditable="False" />
This works fine.
I want to use the selection from the ComboBox to set a property on a CLR object. I thought to accomplish this with a OneWayToSource binding:
<ComboBox ItemsSource="{StaticResource items}" SelectedIndex="0" SelectedItem="{Binding Mode=OneWayToSource, Source={StaticResource clr_object}, Path=selected_item}" IsEditable="False" />
However when I do this, the ComboBox starts with no selection .. in other words, the effect of SelectedIndex="0" is inhibited. Is this expected behavior? I was hoping that the OneWayToSource binding would not interfere with item selection.
Thanks for any assistance or clarification,
Mark Z.