Partager via


Text list (mail 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 ListView to display a list of text items similar to the folder list in an email app.

This example shows the DataTemplate and a ListView that uses the template.

<DataTemplate x:Key="ImageTextListMailFolderTemplate">
    <Grid Width="280">
        <TextBlock Text="Ay Lorem Ipsum Dolor" FontSize="24" FontWeight="Light" 
                   Margin="10,10,0,0" HorizontalAlignment="Left"
                   TextTrimming="WordEllipsis" TextWrapping="Wrap"/>
    </Grid>
</DataTemplate>
<ListView x:Name="ImageTextListMailFolderGrid" Width="292" 
          VerticalAlignment="Stretch" HorizontalAlignment="Left" 
          CanReorderItems="True" CanDragItems="True" 
          ItemTemplate="{StaticResource ImageTextListMailFolderTemplate}"/>