How to handle them may vary, depending on what you're doing and what you're looking to accomplish, but WPF comes with two very easy solutions that you can use: The Observable Collection and the INotify Property Changed interface.
The following example will show you why we need these two things: Try running it for yourself and watch how even though you add something to the list or change the name of one of the users, nothing in the UI is updated.
So, let's try binding some data to a List View: We populate a list of our own User objects, each user having a name and an age.
The data binding process happens automatically as soon as we assign the list to the Items Source property of the List View, but the result is a bit discouraging: Each user is represented by their type name in the List View. NET doesn't have a clue about how you want your data to be displayed, so it just calls the To String() method on each object and uses that to represent the item.
In the previous article, we manually populated a List View control through XAML code, but in WPF, it's all about data binding.
The concept of data binding is explained in detail in another part of this tutorial, but generally speaking it's about separating data from layout.
Windows Presentation Foundation (WPF) data binding provides a simple and consistent way for applications to present and interact with data.
There are two different scenarios that you may or may not want to handle when dealing with data source changes: Changes to the list of items and changes in the bound properties in each of the data objects.
Then there are some problems (like this and this) where WPF leaks for you too.
Finally, there are things (this, this, this, this, this, and this) that simply perform worse than you likely expect.
Instead, this is meant to be a slightly more practical guide to squeezing performance out of WPF in ways that are probably more likely affecting you.
and its subclasses List Box and List View exacerbate performance problems because these controls are highly dynamic (resolution happens “late”), involve WPF collections (which are slow), and have difficult and unpredictable lifetimes for their child controls.