<!-- This template is used for Image Scope Answers Landscape that shows up in the first
     position of the second page results.-->
<DataTemplate xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
              xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
              xmlns:sc="using:SearchUI.Controls"
              xmlns:tm="using:SearchUI.TemplateManager"
              x:Key="Multimedia.EntryAnswer_Landscape_8_1_RP">
    <!-- This answer need baseline alignment to algo title.  Therefore different margin. -->
    <Grid Style="{CustomResource Resources.Shared.SuppressedTopLevelDataTemplateRootStyle}"
          Margin="6, 2">
        <Grid.Resources>
            <DataTemplate x:Key="Local.SingleEntry">
                <Grid Margin="6">
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="*" />
                    </Grid.RowDefinitions>

                    <TextBlock tm:RichText.Text="{Binding Extended:title}"
                               Style="{CustomResource Resources.Shared.SerpPrimaryTextStyle}"
                               MaxLines="1" />

                    <TextBlock tm:RichText.Text="{Binding Extended:text}"
                               Style="{CustomResource Resources.Shared.LinkTextStyle}"
                               MaxLines="2"
                               Margin="0, 18, 0, 0"
                               Grid.Row="1" />
                </Grid>
            </DataTemplate>
        </Grid.Resources>

        <sc:ResultGridView x:Name="EntryGridView"
                           ItemTemplate="{StaticResource Local.SingleEntry}"
                           ItemsSource="{Binding Extended:entries.Extended:entry}"
                           Style="{CustomResource Resources.Shared.NoSelectionNestedGridViewStyle}">
            <GridView.ItemsPanel>
                <ItemsPanelTemplate>
                    <VariableSizedWrapGrid Orientation="Vertical"
                                           ItemWidth="380"
                                           ItemHeight="120" />
                </ItemsPanelTemplate>
            </GridView.ItemsPanel>
            <GridView.ItemContainerStyle>
                <Style TargetType="GridViewItem"
                       BasedOn="{CustomResource Resources.Shared.NestedGridViewItemStyle}">
                    <Setter Property="tm:SetterBinding.Setters">
                        <Setter.Value>
                            <SetterBaseCollection>
                                <Setter Property="AutomationProperties.Name">
                                    <Setter.Value>
                                        <tm:SetterBinding Path="Extended:text" />
                                    </Setter.Value>
                                </Setter>
                            </SetterBaseCollection>
                        </Setter.Value>
                    </Setter>
                </Style>
            </GridView.ItemContainerStyle>
        </sc:ResultGridView>
    </Grid>
</DataTemplate>