I would like to create a page a bit like the Grouped Items page in the Cookbook Contoso application (if you saw it). Basically, this GridView is bound to CollectionViewSource.
<CollectionViewSource x:Name="groupedItemsViewSource" Source="{Binding Groups}" IsSourceGrouped="true" ItemsPath="TopItems" d:Source="{Binding AllGroups, Source={d:DesignInstance Type=data:SampleDataSource, IsDesignTimeCreatable=True}}"/>
GridView seems to bind groups to the highest level CVS data source with the Source attribute, and then bind each individual section with the ItemsPath attribute.
However, my page is different in that my groups are static, these are: Times, Categories, List. The first will have a listview, the second will have a grid, and the third will be a different list.
In addition, each section of the group has a different layout. These are not just repeating groups and repeating layouts of elements. I expected that I could define βstaticβ groups and layout for each group directly in XAML and maybe even add test data to these elements, but GridView seems to require data binding, even if only for a dummy data source at design time .
So how would you do that? Essentially, this requires exactly the same horizontal scrolling and flow around as the GridView, but groups have completely different layouts, and each group should ideally be defined directly in XAML?
I'm going to create a regular grid enclosed in a scroll viewer ... what do you think? What would you do?
source share