Wpf combobox text not updating canadain dating
No errors were being thrown, it just wasn't storing the values!
The problem I have is that when the bound value changes, the selected value in the combobox's textbox does not update.
So you will need to ensure that you are setting the Data Context on Initialize (either externally or within the constructor) rather than Load.
If I sit in a break point and wait a few seconds it works as expected. End Update I have an application using in WPF using MVVM with a Combo Box. The issue I'm having is when we leave our page and migrate back the Combo Box is not selecting the current Value that is selected.
If you can restructure your View Model to expose the index of the selected item, and bind to that, you should be good to go. First add the following code to the View Is Synchronized With Current Item="True".
Next when ever you assign a new object in the View Model to that Property Selected Object should be saved to that Property and not the private member.
The viewmodel Proptery should look like this I was fighting with this issue for a while. To String())); private Key Type _Selected Key = new Key Type(); public Key Type Selected Key #endregion Selected Key I had this problem with a Combo Box displaying a list of colors ( List ).
In my case I was using in complex type (List) as the Item Source and was using a Key Type as the selected value. Selecting a color was possible but it wasnt displayed when the selection closed (although the property was changed!
(Note - the values in the combobox list do update).