Use a ListView
with a UniformGrid
in the ItemsPanelTemplate
. I used the following to display 52 playing cards. You need, of course, to fill the collection first. This is for a WPF application
<Grid HorizontalAlignment="Center" >
<ListView ItemsSource="{Binding CardCollection }" >
<ListView.ItemTemplate>
<DataTemplate >
<Grid HorizontalAlignment="Center" >
<Image Source="{Binding CardGraphic}" />
</Grid>
</DataTemplate>
</ListView.ItemTemplate>
<ListView.ItemsPanel >
<ItemsPanelTemplate>
<UniformGrid Columns="13" HorizontalAlignment="Center" />
</ItemsPanelTemplate>
</ListView.ItemsPanel>
</ListView>
</Grid>