Language: HTML | XAML

Text list (mail folder) template (XAML)

Use this item template with a ListView to display a list of text items similar to the folder list in an email app.

Mail folder list

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}"/>


 

 

Show:
© 2015 Microsoft