I am trying to create an ItemsControl that is tasked with displaying various items sorted by metadata. Each item can have multiple metadata. For example, an item of type "Conversation" may have metadata "Chapter", "Action" and "Volume".
After finding group work in WPF, I found out about GroupStyles and the PropertyGroupDescription class.
I created my own class that inherits from PropertyGroupDescription and returns an object of type Metadata.
Is there anyway that in my DataControl GroupStyle DataTemplate I can bind to the returned object (ie, the "Metadata" object) and then display its properties as I wish? Or am I forced to become attached to "Name"?
In other words:
<ItemsControl.GroupStyle> <GroupStyle> <GroupStyle.HeaderTemplate> <DataTemplate> Am I forced to bind to "Name" here ? </DataTemplate> </GroupStyle.HeaderTemplate> </GroupStyle> </ItemsControl.GroupStyle>
source share