WPF Combobox textbox not updating when binding changes.
- by WillH
I have a WPF CombBox as follows:
<ComboBox
ItemsSource="{Binding Source={StaticResource myList}}"
SelectedItem="{Binding Path=mySelectedItem}"
/>
The problem I have is that when the bound value changes, the selected value in the combobox's textbox does not update. (Note - the values in the combobox list do update).
I am using MVVM so I can detect in the view model when the binding changes and call a property changed event and this is updating the combobox, but not the value displayed within the textbox.
I think this could be done in the template of the combobox - somehow make the textbox be bound to the selecteditem of the combobox, or always update when it updates?
I don't know how to do this though so any advice would be most appreciated.