<commit_before>﻿<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"
                    xmlns:styleSelectors="clr-namespace:Fluent.StyleSelectors">
    <ControlTemplate x:Key="Fluent.Ribbon.Templates.BackstageTabControl.Button"
                     TargetType="{x:Type Fluent:Button}">
        <Grid Background="Transparent">
            <Border x:Name="border"
                    Visibility="Collapsed"
                    Background="{TemplateBinding Background}" />
                <StackPanel Orientation="Horizontal"
                            Margin="25,0,15,0"
                            HorizontalAlignment="Left"
                            VerticalAlignment="Center">
                <TextBlock Text="{TemplateBinding Header}"
                           TextWrapping="NoWrap"
                           VerticalAlignment="Center"
                           HorizontalAlignment="Left"
                           TextTrimming="CharacterEllipsis"
                           x:Name="controlLabel" />
            </StackPanel>
        </Grid>
        <ControlTemplate.Triggers>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition Property="IsMouseOver"
                               Value="True" />
                    <Condition Property="IsEnabled"
                               Value="True" />
                </MultiTrigger.Conditions>
                <Setter Property="Visibility"
                        TargetName="border"
                        Value="Visible" />
            </MultiTrigger>
            <Trigger Property="IsEnabled"
                     Value="False">
                <Setter Property="Opacity"
                        TargetName="controlLabel"
                        Value="0.5" />
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>

    <Style x:Key="Fluent.Ribbon.Styles.BackstageTabControl.Button"
           TargetType="{x:Type Fluent:Button}">
        <Setter Property="FocusVisualStyle"
                Value="{DynamicResource ControlStyleEmptyFocus}" />
        <Setter Property="Height"
                Value="38" />
        <Setter Property="Margin"
                Value="0" />
        <Setter Property="Template"
                Value="{DynamicResource Fluent.Ribbon.Templates.BackstageTabControl.Button}" />
        <Setter Property="Background"
                Value="Transparent" />
        <Setter Property="Foreground"
                Value="{DynamicResource Fluent.Ribbon.Brushes.IdealForegroundColorBrush}" />
        <Setter Property="Fluent:RibbonProperties.AppTheme"
                Value="{DynamicResource Fluent.Ribbon.AppTheme}" />
        <Style.Triggers>
            <Trigger Property="Fluent:RibbonProperties.AppTheme"
                     Value="BaseLight">
                <Setter Property="Background"
                        Value="{DynamicResource BlackBrush20}" />
            </Trigger>
            <Trigger Property="Fluent:RibbonProperties.AppTheme"
                     Value="BaseDark">
                <Setter Property="Background"
                        Value="{DynamicResource Fluent.Ribbon.Brushes.AccentBaseColorBrush}" />
            </Trigger>
        </Style.Triggers>    
    </Style>

    <ControlTemplate x:Key="BackstageBackButtonTemplate"
                     TargetType="Button">
        <Grid x:Name="ContentGrid"
              Background="Transparent"
              Fluent:FrameworkHelper.UseLayoutRounding="False">
            <ContentControl Margin="{TemplateBinding Padding}"
                            HorizontalAlignment="Left">
                <Grid>
                    <Path x:Name="arrowpath"
                          Width="16"
                          Height="12"
                          Stretch="Uniform"
                          Fill="{TemplateBinding Foreground}"
                          Data="F1 M 36,22L 36,26L 19.75,26L 27,33L 20.5,33L 11,24L 20.5,15L 27,15L 19.75,22L 36,22 Z " />

                    <Ellipse x:Name="backellipse"
                             Stroke="{TemplateBinding Foreground}"
                             Height="34"
                             Width="34"
                             StrokeThickness="2" />

                    <Path Data="M0,0 C0,35 0,35 0,35 C0,35 35,35 35,35 L35,0 z"
                          Fill="Transparent"
                          HorizontalAlignment="Stretch"
                          Margin="0"
                          Stretch="None"
                          Width="Auto" />
                </Grid>
            </ContentControl>
        </Grid>
        <ControlTemplate.Triggers>
            <Trigger Property="IsMouseOver"
                     Value="True">
                <Setter Property="Background"
                        TargetName="ContentGrid"
                        Value="{Binding Background, RelativeSource={RelativeSource TemplatedParent}}" />
                <Setter Property="Opacity"
                        TargetName="arrowpath"
                        Value="0.5" />
                <Setter Property="Opacity"
                        TargetName="backellipse"
                        Value="0.5" />
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>

    <Style x:Key="BackstageBackButtonStyle"
           TargetType="{x:Type Button}">
        <Setter Property="Height"
                Value="48" />
        <Setter Property="HorizontalAlignment"
                Value="Stretch" />
        <Setter Property="Template"
                Value="{DynamicResource BackstageBackButtonTemplate}" />
        <Setter Property="Fluent:RibbonProperties.AppTheme"
                Value="{DynamicResource Fluent.Ribbon.AppTheme}" />
        <Style.Triggers>
            <Trigger Property="Fluent:RibbonProperties.AppTheme"
                     Value="BaseLight">
                <Setter Property="Background"
                        Value="Transparent" />
                <Setter Property="Foreground"
                        Value="{DynamicResource Fluent.Ribbon.Brushes.IdealForegroundColorBrush}" />
            </Trigger>
            <Trigger Property="Fluent:RibbonProperties.AppTheme"
                     Value="BaseDark">
                <Setter Property="Background"
                        Value="{DynamicResource Fluent.Ribbon.Brushes.AccentBaseColorBrush}" />
                <Setter Property="Foreground"
                        Value="{DynamicResource BlackBrush}" />
            </Trigger>
        </Style.Triggers>
    </Style>

    <Style TargetType="{x:Type Fluent:SeparatorTabItem}"
           x:Key="Fluent.Ribbon.Styles.BackstageTabControl.SeparatorTabItem">
        <Setter Property="Margin"
                Value="25,10,20,10" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Fluent:SeparatorTabItem}">
                    <StackPanel>
                        <TextBlock x:Name="header"
                                   Margin="10,5"
                                   TextWrapping="Wrap"
                                   Text="{TemplateBinding Header}"
                                   VerticalAlignment="Center"
                                   FontSize="14"
                                   FontWeight="SemiBold"
                                   Foreground="{DynamicResource Fluent.Ribbon.Brushes.IdealForegroundColorBrush}"
                                   Visibility="Visible" />
                        <Line MinWidth="75"
                              Height="1"
                              X2="1"
                              Stroke="{DynamicResource HighTransparentWhiteBrush}"
                              Stretch="Uniform" />
                    </StackPanel>
                    <ControlTemplate.Triggers>
                        <Trigger Property="HasHeader"
                                 Value="False">
                            <Setter TargetName="header"
                                    Property="Visibility"
                                    Value="Collapsed" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <ControlTemplate x:Key="BackstageControlTemplate"
                     TargetType="{x:Type Fluent:BackstageTabControl}">
        <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:ToggleButton}"
                       TargetType="{x:Type Fluent:ToggleButton}"
                       BasedOn="{StaticResource Fluent.Ribbon.Styles.Backstage.ToggleButton}" />
                <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}" />

                <Storyboard x:Key="OnIsOpenTrueStoryboard">
                    <ThicknessAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.Margin)"
                                                      Storyboard.TargetName="grid">
                        <EasingThicknessKeyFrame KeyTime="0"
                                                 Value="-125,0,0,0" />
                        <EasingThicknessKeyFrame KeyTime="0:0:0.5"
                                                 Value="0">
                            <EasingThicknessKeyFrame.EasingFunction>
                                <CubicEase EasingMode="EaseOut" />
                            </EasingThicknessKeyFrame.EasingFunction>
                        </EasingThicknessKeyFrame>
                    </ThicknessAnimationUsingKeyFrames>
                </Storyboard>
                <Storyboard x:Key="OnIsOpenFalseStoryboard">
                    <ThicknessAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.Margin)"
                                                      Storyboard.TargetName="grid">
                        <EasingThicknessKeyFrame KeyTime="0"
                                                 Value="0" />
                        <EasingThicknessKeyFrame KeyTime="0:0:0.3"
                                                 Value="-125,0,0,0">
                            <EasingThicknessKeyFrame.EasingFunction>
                                <CubicEase EasingMode="EaseOut" />
                            </EasingThicknessKeyFrame.EasingFunction>
                        </EasingThicknessKeyFrame>
                    </ThicknessAnimationUsingKeyFrames>
                </Storyboard>
            </ResourceDictionary>
        </ControlTemplate.Resources>
        <Grid x:Name="grid" Background="{DynamicResource WhiteBrush}">
            <Grid.ColumnDefinitions>
                <ColumnDefinition MinWidth="{TemplateBinding ItemsPanelMinWidth}"
                                  Width="Auto" />
                <ColumnDefinition Width="*" />
            </Grid.ColumnDefinitions>

            <Grid x:Name="PART_ItemsPanelGrid"
                  VerticalAlignment="Stretch"
                  Background="{TemplateBinding ItemsPanelBackground}">
                <Fluent:WindowSteeringHelperControl Height="{Binding SelectedContentMargin.Top, RelativeSource={RelativeSource TemplatedParent}}"
                                                    VerticalAlignment="Top"
                                                    IsEnabled="{TemplateBinding IsWindowSteeringHelperEnabled}" />                
                
                <Button x:Name="backbutton"
                        Style="{DynamicResource BackstageBackButtonStyle}"
                        Command="{x:Static Fluent:RibbonCommands.OpenBackstage}"
                        Visibility="{Binding Path=IsBackButtonVisible, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource boolToVisibilityConverter}}"
                        Margin="0,16,0,0"
                        Padding="22,7,0,7"
                        VerticalAlignment="Top">
                </Button>

                <ItemsPresenter Margin="0,77,0,0"
                                Height="Auto" />
            </Grid>

            <Grid x:Name="PART_SelectedContentGrid"
                  Height="Auto"
                  Grid.Column="1"
                  Background="{TemplateBinding Background}"
                  Margin="{TemplateBinding SelectedContentMargin}">
                <ContentPresenter x:Name="PART_SelectedContentHost"
                                  HorizontalAlignment="Stretch"
                                  VerticalAlignment="Stretch"
                                  Height="Auto"
                                  ContentSource="SelectedContent" />
            </Grid>
        </Grid>
        <ControlTemplate.Triggers>
            <MultiDataTrigger>
                <MultiDataTrigger.Conditions>
                    <Condition Binding="{Binding ParentBackstage.IsOpen, RelativeSource={RelativeSource Self}}"
                               Value="True" />
                    <Condition Binding="{Binding ParentBackstage.IsOpenAnimationEnabled, RelativeSource={RelativeSource Self}}"
                               Value="True" />
                </MultiDataTrigger.Conditions>
                <MultiDataTrigger.EnterActions>
                    <BeginStoryboard x:Name="IsOpenBeginStoryboard"
                                     Storyboard="{StaticResource OnIsOpenTrueStoryboard}" />
                </MultiDataTrigger.EnterActions>
                <MultiDataTrigger.ExitActions>
                    <RemoveStoryboard BeginStoryboardName="IsOpenBeginStoryboard" />
                </MultiDataTrigger.ExitActions>
            </MultiDataTrigger>
            <MultiDataTrigger>
                <MultiDataTrigger.Conditions>
                    <Condition Binding="{Binding ParentBackstage.IsOpen, RelativeSource={RelativeSource Self}}"
                               Value="False" />
                    <Condition Binding="{Binding ParentBackstage.IsOpenAnimationEnabled, RelativeSource={RelativeSource Self}}"
                               Value="True" />
                </MultiDataTrigger.Conditions>
                <MultiDataTrigger.EnterActions>
                    <BeginStoryboard x:Name="IsClosedBeginStoryboard"
                                     Storyboard="{StaticResource OnIsOpenFalseStoryboard}" />
                </MultiDataTrigger.EnterActions>
                <MultiDataTrigger.ExitActions><commit_msg>Fixed issue with opaque background on BackstageTabControl<commit_after>﻿<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"
                    xmlns:styleSelectors="clr-namespace:Fluent.StyleSelectors">
    <ControlTemplate x:Key="Fluent.Ribbon.Templates.BackstageTabControl.Button"
                     TargetType="{x:Type Fluent:Button}">
        <Grid Background="Transparent">
            <Border x:Name="border"
                    Visibility="Collapsed"
                    Background="{TemplateBinding Background}" />
                <StackPanel Orientation="Horizontal"
                            Margin="25,0,15,0"
                            HorizontalAlignment="Left"
                            VerticalAlignment="Center">
                <TextBlock Text="{TemplateBinding Header}"
                           TextWrapping="NoWrap"
                           VerticalAlignment="Center"
                           HorizontalAlignment="Left"
                           TextTrimming="CharacterEllipsis"
                           x:Name="controlLabel" />
            </StackPanel>
        </Grid>
        <ControlTemplate.Triggers>
            <MultiTrigger>
                <MultiTrigger.Conditions>
                    <Condition Property="IsMouseOver"
                               Value="True" />
                    <Condition Property="IsEnabled"
                               Value="True" />
                </MultiTrigger.Conditions>
                <Setter Property="Visibility"
                        TargetName="border"
                        Value="Visible" />
            </MultiTrigger>
            <Trigger Property="IsEnabled"
                     Value="False">
                <Setter Property="Opacity"
                        TargetName="controlLabel"
                        Value="0.5" />
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>

    <Style x:Key="Fluent.Ribbon.Styles.BackstageTabControl.Button"
           TargetType="{x:Type Fluent:Button}">
        <Setter Property="FocusVisualStyle"
                Value="{DynamicResource ControlStyleEmptyFocus}" />
        <Setter Property="Height"
                Value="38" />
        <Setter Property="Margin"
                Value="0" />
        <Setter Property="Template"
                Value="{DynamicResource Fluent.Ribbon.Templates.BackstageTabControl.Button}" />
        <Setter Property="Background"
                Value="Transparent" />
        <Setter Property="Foreground"
                Value="{DynamicResource Fluent.Ribbon.Brushes.IdealForegroundColorBrush}" />
        <Setter Property="Fluent:RibbonProperties.AppTheme"
                Value="{DynamicResource Fluent.Ribbon.AppTheme}" />
        <Style.Triggers>
            <Trigger Property="Fluent:RibbonProperties.AppTheme"
                     Value="BaseLight">
                <Setter Property="Background"
                        Value="{DynamicResource BlackBrush20}" />
            </Trigger>
            <Trigger Property="Fluent:RibbonProperties.AppTheme"
                     Value="BaseDark">
                <Setter Property="Background"
                        Value="{DynamicResource Fluent.Ribbon.Brushes.AccentBaseColorBrush}" />
            </Trigger>
        </Style.Triggers>    
    </Style>

    <ControlTemplate x:Key="BackstageBackButtonTemplate"
                     TargetType="Button">
        <Grid x:Name="ContentGrid"
              Background="Transparent"
              Fluent:FrameworkHelper.UseLayoutRounding="False">
            <ContentControl Margin="{TemplateBinding Padding}"
                            HorizontalAlignment="Left">
                <Grid>
                    <Path x:Name="arrowpath"
                          Width="16"
                          Height="12"
                          Stretch="Uniform"
                          Fill="{TemplateBinding Foreground}"
                          Data="F1 M 36,22L 36,26L 19.75,26L 27,33L 20.5,33L 11,24L 20.5,15L 27,15L 19.75,22L 36,22 Z " />

                    <Ellipse x:Name="backellipse"
                             Stroke="{TemplateBinding Foreground}"
                             Height="34"
                             Width="34"
                             StrokeThickness="2" />

                    <Path Data="M0,0 C0,35 0,35 0,35 C0,35 35,35 35,35 L35,0 z"
                          Fill="Transparent"
                          HorizontalAlignment="Stretch"
                          Margin="0"
                          Stretch="None"
                          Width="Auto" />
                </Grid>
            </ContentControl>
        </Grid>
        <ControlTemplate.Triggers>
            <Trigger Property="IsMouseOver"
                     Value="True">
                <Setter Property="Background"
                        TargetName="ContentGrid"
                        Value="{Binding Background, RelativeSource={RelativeSource TemplatedParent}}" />
                <Setter Property="Opacity"
                        TargetName="arrowpath"
                        Value="0.5" />
                <Setter Property="Opacity"
                        TargetName="backellipse"
                        Value="0.5" />
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>

    <Style x:Key="BackstageBackButtonStyle"
           TargetType="{x:Type Button}">
        <Setter Property="Height"
                Value="48" />
        <Setter Property="HorizontalAlignment"
                Value="Stretch" />
        <Setter Property="Template"
                Value="{DynamicResource BackstageBackButtonTemplate}" />
        <Setter Property="Fluent:RibbonProperties.AppTheme"
                Value="{DynamicResource Fluent.Ribbon.AppTheme}" />
        <Style.Triggers>
            <Trigger Property="Fluent:RibbonProperties.AppTheme"
                     Value="BaseLight">
                <Setter Property="Background"
                        Value="Transparent" />
                <Setter Property="Foreground"
                        Value="{DynamicResource Fluent.Ribbon.Brushes.IdealForegroundColorBrush}" />
            </Trigger>
            <Trigger Property="Fluent:RibbonProperties.AppTheme"
                     Value="BaseDark">
                <Setter Property="Background"
                        Value="{DynamicResource Fluent.Ribbon.Brushes.AccentBaseColorBrush}" />
                <Setter Property="Foreground"
                        Value="{DynamicResource BlackBrush}" />
            </Trigger>
        </Style.Triggers>
    </Style>

    <Style TargetType="{x:Type Fluent:SeparatorTabItem}"
           x:Key="Fluent.Ribbon.Styles.BackstageTabControl.SeparatorTabItem">
        <Setter Property="Margin"
                Value="25,10,20,10" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Fluent:SeparatorTabItem}">
                    <StackPanel>
                        <TextBlock x:Name="header"
                                   Margin="10,5"
                                   TextWrapping="Wrap"
                                   Text="{TemplateBinding Header}"
                                   VerticalAlignment="Center"
                                   FontSize="14"
                                   FontWeight="SemiBold"
                                   Foreground="{DynamicResource Fluent.Ribbon.Brushes.IdealForegroundColorBrush}"
                                   Visibility="Visible" />
                        <Line MinWidth="75"
                              Height="1"
                              X2="1"
                              Stroke="{DynamicResource HighTransparentWhiteBrush}"
                              Stretch="Uniform" />
                    </StackPanel>
                    <ControlTemplate.Triggers>
                        <Trigger Property="HasHeader"
                                 Value="False">
                            <Setter TargetName="header"
                                    Property="Visibility"
                                    Value="Collapsed" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <ControlTemplate x:Key="BackstageControlTemplate"
                     TargetType="{x:Type Fluent:BackstageTabControl}">
        <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:ToggleButton}"
                       TargetType="{x:Type Fluent:ToggleButton}"
                       BasedOn="{StaticResource Fluent.Ribbon.Styles.Backstage.ToggleButton}" />
                <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}" />

                <Storyboard x:Key="OnIsOpenTrueStoryboard">
                    <ThicknessAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.Margin)"
                                                      Storyboard.TargetName="grid">
                        <EasingThicknessKeyFrame KeyTime="0"
                                                 Value="-125,0,0,0" />
                        <EasingThicknessKeyFrame KeyTime="0:0:0.5"
                                                 Value="0">
                            <EasingThicknessKeyFrame.EasingFunction>
                                <CubicEase EasingMode="EaseOut" />
                            </EasingThicknessKeyFrame.EasingFunction>
                        </EasingThicknessKeyFrame>
                    </ThicknessAnimationUsingKeyFrames>
                </Storyboard>
                <Storyboard x:Key="OnIsOpenFalseStoryboard">
                    <ThicknessAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.Margin)"
                                                      Storyboard.TargetName="grid">
                        <EasingThicknessKeyFrame KeyTime="0"
                                                 Value="0" />
                        <EasingThicknessKeyFrame KeyTime="0:0:0.3"
                                                 Value="-125,0,0,0">
                            <EasingThicknessKeyFrame.EasingFunction>
                                <CubicEase EasingMode="EaseOut" />
                            </EasingThicknessKeyFrame.EasingFunction>
                        </EasingThicknessKeyFrame>
                    </ThicknessAnimationUsingKeyFrames>
                </Storyboard>
            </ResourceDictionary>
        </ControlTemplate.Resources>
        <Grid x:Name="grid">
            <Grid.ColumnDefinitions>
                <ColumnDefinition MinWidth="{TemplateBinding ItemsPanelMinWidth}"
                                  Width="Auto" />
                <ColumnDefinition Width="*" />
            </Grid.ColumnDefinitions>

            <Grid x:Name="PART_ItemsPanelGrid"
                  VerticalAlignment="Stretch"
                  Background="{DynamicResource WhiteBrush}">
                <Grid Background="{TemplateBinding ItemsPanelBackground}">
                    <Fluent:WindowSteeringHelperControl Height="{Binding SelectedContentMargin.Top, RelativeSource={RelativeSource TemplatedParent}}"
                                                        VerticalAlignment="Top"
                                                        IsEnabled="{TemplateBinding IsWindowSteeringHelperEnabled}" />

                    <Button x:Name="backbutton"
                            Style="{DynamicResource BackstageBackButtonStyle}"
                            Command="{x:Static Fluent:RibbonCommands.OpenBackstage}"
                            Visibility="{Binding Path=IsBackButtonVisible, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource boolToVisibilityConverter}}"
                            Margin="0,16,0,0"
                            Padding="22,7,0,7"
                            VerticalAlignment="Top">
                    </Button>

                    <ItemsPresenter Margin="0,77,0,0"
                                    Height="Auto" />
                </Grid>
            </Grid>

            <Grid x:Name="PART_SelectedContentGrid"
                  Height="Auto"
                  Grid.Column="1"
                  Margin="{TemplateBinding SelectedContentMargin}"
                  Background="{DynamicResource WhiteBrush}">
                <Border Background="{TemplateBinding Background}">
                    <ContentPresenter x:Name="PART_SelectedContentHost"
                                      HorizontalAlignment="Stretch"
                                      VerticalAlignment="Stretch"
                                      Height="Auto"
                                      ContentSource="SelectedContent" />
                </Border>
            </Grid>
        </Grid>
        <ControlTemplate.Triggers>
            <MultiDataTrigger>
                <MultiDataTrigger.Conditions>
                    <Condition Binding="{Binding ParentBackstage.IsOpen, RelativeSource={RelativeSource Self}}"
                               Value="True" />
                    <Condition Binding="{Binding ParentBackstage.IsOpenAnimationEnabled, RelativeSource={RelativeSource Self}}"
                               Value="True" />
                </MultiDataTrigger.Conditions>
                <MultiDataTrigger.EnterActions>
                    <BeginStoryboard x:Name="IsOpenBeginStoryboard"
                                     Storyboard="{StaticResource OnIsOpenTrueStoryboard}" />
                </MultiDataTrigger.EnterActions>
                <MultiDataTrigger.ExitActions>
                    <RemoveStoryboard BeginStoryboardName="IsOpenBeginStoryboard" />
                </MultiDataTrigger.ExitActions>
            </MultiDataTrigger>
            <MultiDataTrigger>
                <MultiDataTrigger.Conditions>
                    <Condition Binding="{Binding ParentBackstage.IsOpen, RelativeSource={RelativeSource Self}}"
                               Value="False" />
                    <Condition Binding="{Binding ParentBackstage.IsOpenAnimationEnabled, RelativeSource={RelativeSource Self}}"
                               Value="True" />
                </MultiDataTrigger.Conditions>
                <MultiDataTrigger.EnterActions>
                    <BeginStoryboard x:Name="IsClosedBeginStoryboard"
                                     Storyboard="{StaticResource OnIsOpenFalseStoryboard}" />
                </MultiDataTrigger.EnterActions>
                <MultiDataTrigger.ExitActions>
{'fraction_non_alphanumeric': 0.09543314197252145, 'fraction_numerical': 0.010772108624137263, 'mean_word_length': 1.366043494849294, 'pattern_counts': {'":': 0, '<': 321, '<?xml version=': 0, '>': 321, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 10}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 69, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '9452', 'n_tokens_mistral': 7506, 'n_tokens_neox': 6677, 'n_words': 941}