<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:Fluent="clr-namespace:Fluent"
                    xmlns:converters="clr-namespace:Fluent.Converters">
    <ControlTemplate x:Key="StartScreenTabControlTemplate"
                     TargetType="{x:Type Fluent:StartScreenTabControl}">
        <ControlTemplate.Resources>
            <ResourceDictionary>
                <Style x:Key="{x:Type ScrollBar}"
                       TargetType="{x:Type ScrollBar}"
                       BasedOn="{StaticResource ScrollBarWhite}" />
                <Style x:Key="{x:Type Fluent:Button}"
                       TargetType="{x:Type Fluent:Button}"
                       BasedOn="{StaticResource Fluent.Ribbon.Styles.Backstage.Button}" />
                <Style x:Key="{x:Type Fluent:DropDownButton}"
                       TargetType="{x:Type Fluent:DropDownButton}"
                       BasedOn="{StaticResource Fluent.Ribbon.Styles.Backstage.DropDownButton}" />
                <Style x:Key="{x:Type Fluent:ComboBox}"
                       TargetType="{x:Type Fluent:ComboBox}"
                       BasedOn="{StaticResource Fluent.Ribbon.Styles.Backstage.ComboBox}" />
            </ResourceDictionary>
        </ControlTemplate.Resources>
        <Grid x:Name="grid">
            <Grid.ColumnDefinitions>
                <ColumnDefinition MinWidth="{TemplateBinding ItemsPanelMinWidth}"
                                  Width="Auto" />
                <ColumnDefinition Width="*" />
            </Grid.ColumnDefinitions>
            
            <Grid x:Name="PART_LeftContentGrid"
                  VerticalAlignment="Stretch"                  
                  Background="{TemplateBinding ItemsPanelBackground}"
                  Margin="{TemplateBinding LeftContentMargin}">
                <Border Padding="15,25">
                    <ContentPresenter HorizontalAlignment="Stretch"
                                      VerticalAlignment="Stretch"
                                      Height="Auto"
                                      Content="{TemplateBinding LeftContent}" />
                </Border>
                
                <Fluent:WindowSteeringHelperControl Height="{Binding SelectedContentMargin.Top, RelativeSource={RelativeSource TemplatedParent}}"
                                                    VerticalAlignment="Top"
                                                    IsEnabled="{TemplateBinding IsWindowSteeringHelperEnabled}" />
            </Grid>

            <Grid x:Name="PART_SelectedContentGrid"
                  Height="Auto"
                  Grid.Column="1"
                  Background="{DynamicResource WhiteBrush}"
                  Margin="{TemplateBinding SelectedContentMargin}">
                <Border Padding="33,16"
                        Background="{DynamicResource WhiteBrush}">
                    <ContentPresenter x:Name="PART_SelectedContentHost"
                                      HorizontalAlignment="Stretch"
                                      VerticalAlignment="Stretch"
                                      Height="Auto"
                                      Content="{TemplateBinding RightContent}" />
                </Border>
            </Grid>
        </Grid>
    </ControlTemplate>    
    
    <Style x:Key="StartScreenTabControlStyle"
           TargetType="{x:Type Fluent:StartScreenTabControl}"
           BasedOn="{StaticResource {x:Type Fluent:BackstageTabControl}}">
        <Setter Property="Template"
                Value="{DynamicResource StartScreenTabControlTemplate}" />
        <Setter Property="Background"
                Value="{Binding Background, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Fluent:StartScreen}}, FallbackValue=Red}" />
        <Setter Property="Margin"
                Value="0" />
    </Style>
</ResourceDictionary>