Gridview works great in Windows Phone apps. Here is the code from one of my apps in the app store. You need to set the size of the outermost βgridβ of the DataTemplate. You will not be able to get meshes to fit the screen unless you make a dynamic size after loading the user interface.
<GridView Grid.Row="2" Margin="0,0,0,0" ItemsSource="{Binding InfoTypeList}" SelectionMode="None" IsItemClickEnabled="True" ItemClick="GridView_ItemClick"> <GridView.ItemTemplate> <DataTemplate> <Grid HorizontalAlignment="Left" Width="120" Height="120"> <Border Background="{ThemeResource PhoneAccentBrush}"> <Image Source="{Binding ImagePath}" Stretch="Uniform" Margin="10,10,10,20"/> </Border> <StackPanel VerticalAlignment="Bottom"> <TextBlock Text="{Binding Name}" Foreground="{ThemeResource ListViewItemOverlayForegroundThemeBrush}" Style="{StaticResource BaseTextBlockStyle}" FontSize="18" HorizontalAlignment="Center" FontWeight="SemiBold" IsTextScaleFactorEnabled="False"/> </StackPanel> </Grid> </DataTemplate> </GridView.ItemTemplate> <GridView.ItemContainerStyle> <Style TargetType="FrameworkElement"> <Setter Property="Margin" Value="20 20 0 0"/> </Style> </GridView.ItemContainerStyle> </GridView>
EDIT: I played with it, and you can make it look more like your photo (fit the elements to the screen) by wrapping the GridView in the viewport and then limiting the number of rows by adding this to your GridView:
<GridView.ItemsPanel> <ItemsPanelTemplate> <WrapGrid Orientation="Vertical" MaximumRowsOrColumns="2" /> </ItemsPanelTemplate> </GridView.ItemsPanel>
You will need to play with the fields to get the correct spacing.
source share