Note that there are some explanatory texts on larger screens.

plurals
  1. POWindows 8 Metro: ListView ignores ItemTemplate
    primarykey
    data
    text
    <p>I'm following <a href="http://msdn.microsoft.com/en-us/library/windows/apps/br211380.aspx" rel="nofollow">this</a> tutorial, but I'm faced with a weird problem. There's a part that says:</p> <blockquote> <p>In SplitPage.xaml, we also update the ItemTemplate property in itemListView to use our DefaultListItemTemplate resource instead of Standard130ItemTemplate, which is the default template. Here's the updated XAML for itemListView.</p> </blockquote> <p>However, no matter what I do, it displays the list with the default template, which looks like <a href="http://snag.gy/n8IMs.jpg" rel="nofollow">this</a>. Here's my code:</p> <pre><code>&lt;DataTemplate x:Key="DefaultListItemTemplate"&gt; &lt;Grid HorizontalAlignment="Stretch" Width="Auto" Height="110" Margin="10,10,10,0"&gt; &lt;Grid.ColumnDefinitions&gt; &lt;ColumnDefinition Width="Auto"/&gt; &lt;ColumnDefinition Width="*"/&gt; &lt;/Grid.ColumnDefinitions&gt; &lt;!-- Green date block --&gt; &lt;Border Background="{StaticResource BlockBackgroundBrush}" Width="110" Height="110" /&gt; &lt;ContentControl Template="{StaticResource DateBlockTemplate}" /&gt; &lt;StackPanel Grid.Column="1" HorizontalAlignment="Left" Margin="12,8,0,0"&gt; &lt;TextBlock Text="{Binding Title}" FontSize="26.667" TextWrapping="Wrap" MaxHeight="72" Foreground="#FFFE5815" /&gt; &lt;TextBlock Text="{Binding Author}" FontSize="18.667" /&gt; &lt;/StackPanel&gt; &lt;/Grid&gt; &lt;/DataTemplate&gt; </code></pre> <p>...in Page.Resources, and</p> <pre><code>&lt;ListView x:Name="itemListView" AutomationProperties.AutomationId="ItemsListView" AutomationProperties.Name="Items" TabIndex="1" Grid.Row="1" Margin="-10,-10,0,0" Padding="120,0,0,60" ItemsSource="{Binding Source={StaticResource itemsViewSource}}" IsSwipeEnabled="False" SelectionChanged="ItemListView_SelectionChanged" ItemTemplate="{StaticResource DefaultListItemTemplate}"/&gt; </code></pre> <p>...in the page's Grid.</p> <p>I've tried inlining the template and modifying Standard130ItemTemplate to no avail. Specifying a non-existent template throws a build error, though.</p> <p>Any ideas what I could be doing wrong?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload