<!-- The data template for Ads answer in landscape mode -->
<DataTemplate xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
              xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
              xmlns:tm="using:SearchUI.TemplateManager"
              xmlns:sc="using:SearchUI.Controls"
              x:Key="Ads.Medium_Landscape_8_1_RTM">
    <sc:ResultGridView Style="{CustomResource Resources.Shared.HorizontalModeNestedGridViewStyle}">
        <GridView.ItemsPanel>
            <ItemsPanelTemplate>
                <Grid>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="*" />
                    </Grid.RowDefinitions>
                </Grid>
            </ItemsPanelTemplate>
        </GridView.ItemsPanel>
        <sc:ResultGridViewItem Grid.Row="0"
                               Style="{CustomResource Resources.Ads.AdsTopLevelGridViewItemStyle}">
            <Grid Style="{CustomResource Resources.Shared.NestedTopLevelDataTemplateRootStyle}">
                <Grid.RowDefinitions>
                    <RowDefinition Height="200" />
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="*" />
                </Grid.RowDefinitions>
                <!-- Page preview image -->
                <Border Style="{CustomResource Resources.Shared.ImagePlaceholderBorderStyle}"
                        Grid.Row="0">
                    <ContentControl Content="{Binding}"
                                    DataContext="{Binding Extended:pagePreview}"
                                    HorizontalContentAlignment="Stretch"
                                    VerticalContentAlignment="Stretch"
                                    ContentTemplateSelector="{CustomResource GenericDataTemplateSelector}"
                                    IsTabStop="False" />
                </Border>
                <!-- Title -->
                <TextBlock tm:RichText.Text="{Binding System_ItemNameDisplay}"
                           Grid.Row="1"
                           MaxLines="2"
                           Style="{CustomResource Resources.Shared.SerpPrimaryTextStyle}"
                           AutomationProperties.AutomationId="Title"
                           Margin="0, 20, 0, 5" />
                <!-- Display URL -->
                <TextBlock tm:RichText.Text="{Binding Extended:displayUrl.System_Search_Contents}"
                           Grid.Row="2"
                           Margin="0, 0, 0, 5"
                           MaxLines="2"
                           Style="{CustomResource Resources.Shared.LinkTextStyle}"
                           AutomationProperties.AutomationId="DisplayUrl" />
                <!-- Facts Row -->
                <ContentControl Content="{Binding}"
                                DataContext="{Binding Extended:facts}"
                                ContentTemplateSelector="{CustomResource GenericDataTemplateSelector}"
                                Grid.Row="3" />
                <!-- Description -->
                <TextBlock tm:RichText.Text="{Binding System_Search_AutoSummary}"
                           Grid.Row="4"
                           MaxLines="3"
                           Style="{CustomResource Resources.Shared.SerpSecondaryTextStyle}"
                           Margin="0, 0, 0, 21" />
            </Grid>
        </sc:ResultGridViewItem>
        <sc:ResultGridViewItem Grid.Row="1"
                               Style="{CustomResource Resources.Shared.SuppressedGridViewItemStyle}">
            <!-- Extensions -->
            <sc:ResultGridView ItemsSource="{Binding Extended:extensions.Extended:extension}"
                               ItemTemplateSelector="{CustomResource GenericDataTemplateSelector}"
                               Tag="{Binding Tag, RelativeSource={RelativeSource TemplatedParent}}"
                               Style="{CustomResource Resources.Shared.HorizontalModeNestedGridViewStyle}"
                               ItemContainerStyle="{CustomResource Resources.Ads.AdsNestedGridViewItemStyle}"
                               Margin="8, 0, 10, 8"
                               x:Name="RootGrid">
                <sc:ResultGridView.ItemsPanel>
                    <ItemsPanelTemplate>
                        <sc:OverflowStackPanel Orientation="Vertical" />
                    </ItemsPanelTemplate>
                </sc:ResultGridView.ItemsPanel>
            </sc:ResultGridView>
        </sc:ResultGridViewItem>
    </sc:ResultGridView>
</DataTemplate>