I have a list of "material" that needs to be filtered and then displayed in a grouped and sorted way. The data needed to calculate the grouping and sorting order is not available as simple properties - to calculate the order and groups, you need to do some work in the code.
CollectionViewSource allows me to define a custom filter and sorting logic - so far so good. It also allows you to bind GroupDescriptions to a value converter so that I can generate group names.
The last thing I want to do is to control the order in which the generated groups appear, and it hurts me!
Everything I see about CollectionViewSource.SortDescriptions says that it will sort the groups by property name, but I do not have the properties available for sorting. SortDescriptions cannot be attached to a value converter like GroupDescriptions, and I am not getting into other ideas.
So - how do you implement your own CollectionViewSource group sorting logic?
source share