Partager via


Text tile (list folder) template (XAML)

[ This article is for Windows 8.x and Windows Phone 8.x developers writing Windows Runtime apps. If you’re developing for Windows 10, see the latest documentation ]

Use this item template with a GridView to display a folder list with a tile and text.

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

<DataTemplate x:Key="TextTileListFolderTemplate"> 
    <Grid Background="DarkGray" Width="300" Height="70">        
        <StackPanel Orientation="Horizontal" VerticalAlignment="Bottom"> 
            <TextBlock Text="Ay Lorem ipsum dolor " 
                       FontSize="16"  Margin="10,0,0,10" 
                       TextTrimming="WordEllipsis" HorizontalAlignment="Left" />                        
        </StackPanel>
    </Grid>                
</DataTemplate>
<GridView x:Name="TextTileListFolderGrid" 
          VerticalAlignment="Stretch" HorizontalAlignment="Left" 
          CanReorderItems="True" CanDragItems="True" 
          ItemTemplate="{StaticResource TextTileListFolderTemplate}">                        
    <GridView.ItemsPanel>
        <ItemsPanelTemplate>
            <ItemsWrapGrid MaximumRowsOrColumns="6"/>                      
        </ItemsPanelTemplate>
    </GridView.ItemsPanel>
</GridView>