I have created a CollectionViewSource as follows:
<CollectionViewSource x:Key="MyGrouping" Source="{Binding MyCollection}">
<CollectionViewSource.SortDescriptions>
<componentModel:SortDescription PropertyName="Name"/>
</CollectionViewSource.SortDescriptions>
<CollectionViewSource.GroupDescriptions>
<PropertyGroupDescription PropertyName="Type"/>
</CollectionViewSource.GroupDescriptions>
</CollectionViewSource>
I then define a TabControl as follows:
<TabControl ItemsSource="{Binding Groups, Source={StaticResource MyGrouping}}">
<TabControl.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding Name}"/>
</DataTemplate>
</TabControl.ItemTemplate>
<TabControl.ContentTemplate>
<DataTemplate>
<DataGrid ItemsSource="{Binding Items}" AutoGenerateColumns="False">
<DataGrid.Resources>
.....
All of the grouping works perfectly. However, I wanted to add an additional Tab that contains ALL of the items (ungrouped).
Is there a simple mvvm approach to doing this? Any help would be greatly appreciated.