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.Scrollbar performance is often a big problem in larger WPF apps because of problems that seem trivial for small collections, but suddenly blow up with larger data sets.
If you change the selection mode property to multiple select , then you will retrieve a collection of items from List Box1. The following C# program initially fill seven days in a week while in the form load event and set the selection mode property to Multi Simple.
For views, you get the get a WPF notification that a viewmodel is about to go unused by a view.
Blend-style behaviors also have their own set of lifetime problems.
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.