In the XAML code in the resources is registered CollectionViewSource
<CollectionViewSource x:Key="viewCollection" Source="{Binding Path=MyCollecthion,Mode=OneWay}"> <CollectionViewSource.GroupDescriptions> <PropertyGroupDescription PropertyName="MyEnum"/> </CollectionViewSource.GroupDescriptions> </CollectionViewSource>
How to make it so that when the MyEnum property changes, the element is automatically moved to the appropriate group
The MyCollection property returns ObservebleCollecthion <MyType>
The MyEnum property of the MyType class has one of the previously known values.