<!-- The data template for web algo in portrait 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="Web.RichAlgo_Portrait_8_1_RP">
    <Grid Style="{CustomResource Resources.Shared.TopLevelDataTemplateRootStyle}">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="*" />
        </Grid.RowDefinitions>
        <!-- Title -->
        <TextBlock tm:RichText.Text="{Binding System_ItemNameDisplay}"
                   Grid.Row="0"
                   MaxLines="1"
                   Style="{CustomResource Resources.Shared.SerpPrimaryTextStyle}"
                   AutomationProperties.AutomationId="Title"
                   Margin="0, 0, 0, 5" />
        <!-- Metadata -->
        <ContentControl Grid.Row="1"
                        Margin="0, 0, 0, 16"
                        Content="{Binding Extended:metadata}"
                        Template="{Binding Path=Extended:metadata.System_ConnectedSearch_RenderingTemplate, Converter={CustomResource StringToResource}}"
                        Tag="1" />
        <Grid Grid.Row="2">
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto" />
                <RowDefinition Height="*" />
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="310" />
                <ColumnDefinition Width="*" />
            </Grid.ColumnDefinitions>
            <Grid Grid.Row="0"
                  Grid.Column="0"
                  Grid.RowSpan="2"
                  Height="160"
                  Margin="0, 0, 20, 0">
                <!-- Page preview image -->
                <sc:ResultContentControl Grid.Row="0"
                                         Tag="UniformToFill"
                                         Content="{Binding}"
                                         DataContext="{Binding Extended:pagePreview}" />
            </Grid>
            <!-- Facts Row -->
            <ContentControl Content="{Binding}"
                            DataContext="{Binding Extended:facts}"
                            ContentTemplateSelector="{CustomResource GenericDataTemplateSelector}"
                            Grid.Row="0"
                            Grid.Column="1" />
            <!-- Snippet -->
            <TextBlock tm:RichText.Text="{Binding System_Search_AutoSummary}"
                       MaxLines="8"
                       Style="{CustomResource Resources.Shared.SerpSecondaryTextStyle}"
                       AutomationProperties.AutomationId="Snippet"
                       Grid.Row="1"
                       Grid.Column="1" />
        </Grid>
    </Grid>
</DataTemplate>