With WPF 4.0, when an item in a collection was added or removed, the CollectionView
interface that it belonged to had its filtering, sorting, and ordering updated. However, this did not happen when we modified one of its item's properties.
Now, with WPF 4.5, we can implement this behavior in real-time with the new ICollectionViewLiveShaping
interface, so if the data is updated, so will its filtering, sorting, and ordering. Let's see how it's done.
Here we are going to see how to implement the ICollectionViewLiveShaping
interface to make our collection update its sorting of the collection of data and will make it change over time as well.
First open Visual Studio 2012 and create a new project. We will select the WPF Application template from the Visual C# category and name it
WPFLiveShaping
.We will add the
BaseClass.cs
from the...