I am trying to create a grid containing elements such as
| 1 | 4 | 7 |
| 2 | 5 | 8 | ===> extend
| 3 | 6 | 9 |
Since the data is very large, I need to use UI virtualization and what I see in most example is the VirtualizingStackPanel
Here is how I have setup my Gridview in XAML . The problem is that the following code creates a horizontal row of single element (which makes sense given it is just a stack panel).
| 1 | 2 | 3 | 4 | .....
<GridView
x:Name="itemGridView"
AutomationProperties.AutomationId="ItemsGridView"
AutomationProperties.Name="Items"
TabIndex="1"
Grid.RowSpan="3"
Padding="116,136,116,46"
ItemsSource="{Binding Source={StaticResource itemsViewSource}}"
ItemTemplateSelector="{StaticResource CellStyleSelector}"
ItemClick="ItemView_ItemClick"
IsItemClickEnabled="True"
SelectionMode="Extended"
SelectionChanged="ItemView_SelectionChanged"
IsSwipeEnabled="true">
<GridView.ItemsPanel>
<ItemsPanelTemplate>
<VirtualizingStackPanel Orientation="Horizontal"/>
</ItemsPanelTemplate>
</GridView.ItemsPanel>
</GridView>
How would one go about making it display a grid that extends horizontally using virtualizingstackpanel? I have no groups in my data so all the examples that show virtualizingstackpanel show this ? I am completely new at Windows Store app dev (mostly have been on iOS and Android ) so would appreciate any code sample or resources.
Thank you