Currently I'm able to perform grouping using a CollectionViewSource instance that is being binded to a GridView ItemSource. All is working as aspected but I need to add Incremental Loading Support, and I managed to do this in other context using IncrementalLoadingCollection, but I'm not sure if this can be done together without making any UI tweaks.
Currently my code is looking like this :
<GridView
x:Name="test"
Margin="18,20,0,0"
Grid.Row="3"
Loaded="All_GridView_Loaded"
SelectionMode="Single"
ScrollViewer.VerticalScrollBarVisibility="Hidden"
HorizontalAlignment="Stretch">
<GridView.GroupStyle>
<GroupStyle>
<GroupStyle.HeaderTemplate>
<DataTemplate x:DataType="someType">
<TextBlock Text="{Binding Key}"/>
</DataTemplate>
</GroupStyle.HeaderTemplate>
</GroupStyle>
</GridView.GroupStyle>
<GridView.ItemTemplate>
<DataTemplate x:DataType="someType" x:DefaultBindMode="OneWay">
.........
</DataTemplate>
</GridView.ItemTemplate>
</GridView>
And the code behind for binding :
var cvs = new CollectionViewSource { IsSourceGrouped = true };
cvs.Source = some list ....;
gridView.ItemsSource = cvs.View;