Language: HTML | XAML

Text tile (landing) template (XAML)

Use this item template with a GridView to create a landing page that displays a collection with a tile and text.

Tile grid for a landing page

This example shows the image gallery DataTemplate and a GridView that uses the template.


<DataTemplate x:Key="TextTileLandingTemplate"> 
    <Grid Background="DarkGray" Width="250" Height="250">        
        <StackPanel Orientation="Vertical" VerticalAlignment="Bottom" Margin="0,0,0,10"> 
            <TextBlock Text="Ay Lorem ipsum dolor site amet yed diam nonumy" 
                       FontSize="24"  Margin="10,0,0,0" 
                       TextTrimming="WordEllipsis" TextWrapping="Wrap" 
                       HorizontalAlignment="Left"/>                        
            <TextBlock Text="Ay Phasellus faucibus" 
                       FontSize="11" Margin="10,0,0,0" 
                       TextTrimming="WordEllipsis" TextWrapping="Wrap" 
                       HorizontalAlignment="Left"/>
        </StackPanel>
    </Grid>                
</DataTemplate>



<GridView x:Name="TextTileLandingGrid" 
          VerticalAlignment="Stretch" HorizontalAlignment="Left" 
          CanReorderItems="True" CanDragItems="True" 
          ItemTemplate="{StaticResource TextTileLandingTemplate}">
    <GridView.ItemsPanel>
        <ItemsPanelTemplate>
            <ItemsWrapGrid MaximumRowsOrColumns="2"/>                      
        </ItemsPanelTemplate>
    </GridView.ItemsPanel>
</GridView>


 

 

Show:
© 2015 Microsoft