<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">
    <Style TargetType="{x:Type Fluent:Button}"
           x:Key="Fluent.Ribbon.Styles.Backstage.Button">
        <Setter Property="Size" 
                Value="Large" />
        <Setter Property="BorderThickness" 
                Value="1" />
        <Setter Property="BorderBrush" 
                Value="{DynamicResource GrayBrush6}" />
        <Setter Property="Padding" 
                Value="0 9 0 0" />
        <Setter Property="Height"
                Value="81" />
        <Setter Property="Width"
                Value="85" />
    </Style>
       
    <Style TargetType="{x:Type Fluent:ToggleButton}"
           x:Key="Fluent.Ribbon.Styles.Backstage.ToggleButton">
        <Setter Property="Size" 
                Value="Large" />
        <Setter Property="BorderThickness" 
                Value="1" />
        <Setter Property="BorderBrush" 
                Value="{DynamicResource GrayBrush6}" />
        <Setter Property="Padding" 
                Value="0 9 0 0" />
        <Setter Property="Height"
                Value="81" />
        <Setter Property="Width"
                Value="85" />
    </Style>

    <Style TargetType="{x:Type Fluent:DropDownButton}"
           x:Key="Fluent.Ribbon.Styles.Backstage.DropDownButton">
        <Setter Property="Size" 
                Value="Large" />
        <Setter Property="BorderThickness" 
                Value="1" />
        <Setter Property="BorderBrush" 
                Value="{DynamicResource GrayBrush6}" />
        <Setter Property="Padding" 
                Value="0 9 0 0" />
        <Setter Property="Height"
                Value="81" />
        <Setter Property="Width"
                Value="85" />
    </Style>

    <Style TargetType="{x:Type Fluent:ComboBox}"
           x:Key="Fluent.Ribbon.Styles.Backstage.ComboBox">
        <Setter Property="Height"
                Value="42" />
        <Setter Property="Width"
                Value="229" />
        <Setter Property="IsReadOnly"
                Value="True" />
        <Setter Property="IsEditable"
                Value="False" />
    </Style>

    <!--Inner Backstage TabControl Style-->
    <Style TargetType="{x:Type Fluent:SeparatorTabItem}"
           x:Key="InnerBackstageSeparatorTabItemStyle">
        <Setter Property="Foreground"
                Value="{DynamicResource Fluent.Ribbon.Brushes.AccentBaseColorBrush}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Fluent:SeparatorTabItem}">
                    <Grid Margin="0,0,10,0">
                        <TextBlock Margin="0,5"
                                   TextWrapping="Wrap"
                                   Text="{TemplateBinding Header}"
                                   VerticalAlignment="Center"
                                   FontSize="17"
                                   FontFamily="Segoe UI Light, Lucida Sans Unicode, Verdana" />
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    
    <Style x:Key="InnerBackstageTabControlItem"
           TargetType="{x:Type TabItem}">
        <Setter Property="Foreground"
                Value="{DynamicResource BlackBrush}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type TabItem}">
                    <Grid Background="Transparent"
                          Margin="0,3">
                        <Border x:Name="border"
                                BorderBrush="Transparent"
                                BorderThickness="1"
                                Margin="0"
                                Background="Transparent">
                            <ContentPresenter Margin="5,5,50,5"
                                              ContentSource="Header" />
                        </Border>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="Selector.IsSelected"
                                 Value="True">
                            <Setter Property="Background"
                                    TargetName="border"
                                    Value="{DynamicResource Fluent.Ribbon.Brushes.Button.Pressed.Background}" />
                            <Setter Property="BorderBrush"
                                    TargetName="border"
                                    Value="{DynamicResource Fluent.Ribbon.Brushes.Button.Pressed.BorderBrush}" />
                        </Trigger>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsMouseOver"
                                           Value="True" />
                                <Condition Property="Selector.IsSelected"
                                           Value="False" />
                            </MultiTrigger.Conditions>
                            <Setter Property="Background"
                                    TargetName="border"
                                    Value="{DynamicResource Fluent.Ribbon.Brushes.Button.MouseOver.Background}" />
                            <Setter Property="BorderBrush"
                                    TargetName="border"
                                    Value="{DynamicResource Fluent.Ribbon.Brushes.Button.MouseOver.BorderBrush}" />
                        </MultiTrigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="InnerBackstageTabControlStyle"
           TargetType="{x:Type TabControl}">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type TabControl}">
                    <ControlTemplate.Resources>
                        <Style TargetType="{x:Type Fluent:SeparatorTabItem}"
                               BasedOn="{StaticResource InnerBackstageSeparatorTabItemStyle}" />
                        <Style TargetType="{x:Type TabItem}"
                               BasedOn="{StaticResource InnerBackstageTabControlItem}" />
                    </ControlTemplate.Resources>
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto" />
                            <ColumnDefinition Width="*" />
                        </Grid.ColumnDefinitions>
                        <Border BorderThickness="0,0,1,0"
                                HorizontalAlignment="Stretch"
                                Margin="0"
                                VerticalAlignment="Stretch"
                                BorderBrush="{DynamicResource GrayBrush7}" />
                        <StackPanel Grid.Column="0"
                                    HorizontalAlignment="Left"
                                    Margin="0"
                                    VerticalAlignment="Top"
                                    IsItemsHost="True" />
                        <ContentPresenter x:Name="PART_SelectedContentHost"
                                          Grid.Column="1"
                                          Margin="0"
                                          VerticalAlignment="Stretch"
                                          ContentSource="SelectedContent" />
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
</ResourceDictionary>