Wpf combobox selecteditem not updating
Based on what I have read, I have this set up right.The combo gets the collection and I can change the values via the UI. Also, just an FYI, I have 4 collections which were populated by enumerations and I can set the Selected Item property just fine and it updates the UI. No matter what I do, I cannot get the UI to change when I set the Selected Item property via the View Model.I have tried Selected Item, Selected Index, Text and nothing works for me.That is, the point of this screen is to edit the user, not roles or any other peripheral data.So, what I’m actually doing here is trying to bind a reference in another object to one of the items in the list. And after a good bit of reading and head scratching, I figured out why.Let’s call it a user for the sake of this post, since the actual work I’m doing is nominally proprietary.So, let’s say that user has a first name and a last name and that user also has a role.
Once I removed the property changed event from my view model, everything worked just fine.The Binding Mode needs to be One Way To Source or Two Way since the source is what you want updated.