Wpf combobox itemssource not updating

Rated 4.96/5 based on 792 customer reviews

Obviously you only have to call Notify Property Changed in the setter's of the properties that you bind to - the rest can remain the way they are.

What we need is a list that notifies any destinations of changes to its content, and fortunately, WPF provides a type of list that will do just that.This is a bit more cumbersome than just changing the list type, like we did above, but it's still one of the simplest way to accomplish these automatic updates.With the two changes described above, we now have an example that WILL reflect changes in the data source.The example is pretty simple, with a User class that will keep the name of the user, a List Box to show them in and some buttons to manipulate both the list and its contents.The Items Source of the list is assigned to a quick list of a couple of users that we create in the window constructor.

Leave a Reply