I have this code in my xaml
<local:MyDataSource x:Key="MyData" />
<CollectionViewSource x:Key="ViewSource" Source="{Binding Source={StaticResource MyData}, Path=Summaries}">
<CollectionViewSource.GroupDescriptions>
<PropertyGroupDescription PropertyName="Name" />
</CollectionViewSource.GroupDescriptions>
</CollectionViewSource>
which I would like to transfer to my code behind.
MyDataSource is a public class, which I already have. It contains a collection which should fill the CollectionViewSource, in order to bind it to a listView.
I’ve been looking for a while now for some kind of tutorial or something but haven’t been able to find anything.
your summaries collection must be