<ResourceDictionary
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:ui="http://schemas.modernwpf.com/2019"
    xmlns:local="clr-namespace:ModernWpf.Controls">

    <Style TargetType="local:AppBarToggleButton">
        <Setter Property="Background" Value="{DynamicResource AppBarToggleButtonBackground}" />
        <Setter Property="Foreground" Value="{DynamicResource AppBarToggleButtonForeground}" />
        <Setter Property="BorderBrush" Value="{DynamicResource AppBarToggleButtonBorderBrush}" />
        <Setter Property="HorizontalAlignment" Value="Left" />
        <Setter Property="VerticalAlignment" Value="Top" />
        <Setter Property="FontFamily" Value="{DynamicResource ContentControlThemeFontFamily}" />
        <Setter Property="FontWeight" Value="Normal" />
        <Setter Property="Width" Value="68" />
        <Setter Property="UseSystemFocusVisuals" Value="{DynamicResource UseSystemFocusVisuals}" />
        <Setter Property="FocusVisualMargin" Value="-3" />
        <Setter Property="FocusVisualStyle" Value="{DynamicResource {x:Static SystemParameters.FocusVisualStyleKey}}" />
        <Setter Property="CornerRadius" Value="{DynamicResource ControlCornerRadius}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="local:AppBarToggleButton">
                    <ControlTemplate.Resources>
                        <StreamGeometry x:Key="CheckMark">M 17.939453 5.439453 L 7.5 15.888672 L 2.060547 10.439453 L 2.939453 9.560547 L 7.5 14.111328 L 17.060547 4.560547 Z</StreamGeometry>
                    </ControlTemplate.Resources>
                    <Border
                        x:Name="Root"
                        Background="Transparent"
                        MinWidth="{TemplateBinding MinWidth}"
                        MaxWidth="{TemplateBinding MaxWidth}"
                        SnapsToDevicePixels="True">
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="ApplicationViewStates">
                                <ui:VisualStateGroupListener.Listener>
                                    <ui:VisualStateGroupListener x:Name="ApplicationViewStatesListener" />
                                </ui:VisualStateGroupListener.Listener>
                                <VisualState x:Name="FullSize" />
                                <VisualState x:Name="Compact" />
                                <VisualState x:Name="LabelOnRight" />
                                <VisualState x:Name="LabelCollapsed" />
                                <VisualState x:Name="Overflow" />
                                <VisualState x:Name="OverflowWithMenuIcons" />
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="CommonStates">
                                <ui:VisualStateGroupListener.Listener>
                                    <ui:VisualStateGroupListener x:Name="CommonStatesListener" />
                                </ui:VisualStateGroupListener.Listener>
                                <VisualState x:Name="Normal" />
                                <VisualState x:Name="PointerOver" />
                                <VisualState x:Name="Pressed" />
                                <VisualState x:Name="Disabled" />
                                <VisualState x:Name="Checked" />
                                <VisualState x:Name="CheckedPointerOver" />
                                <VisualState x:Name="CheckedPressed" />
                                <VisualState x:Name="CheckedDisabled" />
                                <VisualState x:Name="OverflowNormal" />
                                <VisualState x:Name="OverflowPointerOver" />
                                <VisualState x:Name="OverflowPressed" />
                                <VisualState x:Name="OverflowChecked" />
                                <VisualState x:Name="OverflowCheckedPointerOver" />
                                <VisualState x:Name="OverflowCheckedPressed" />
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="KeyboardAcceleratorTextVisibility">
                                <ui:VisualStateGroupListener.Listener>
                                    <ui:VisualStateGroupListener x:Name="KeyboardAcceleratorTextVisibilityListener" />
                                </ui:VisualStateGroupListener.Listener>
                                <VisualState x:Name="KeyboardAcceleratorTextCollapsed" />
                                <VisualState x:Name="KeyboardAcceleratorTextVisible" />
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Grid>
                            <Border x:Name="AppBarToggleButtonInnerBorder"                                       
                                    Margin="{DynamicResource AppBarButtonInnerBorderMargin}"
                                    Background="{TemplateBinding Background}"
                                    BorderBrush="{TemplateBinding BorderBrush}"
                                    BorderThickness="{TemplateBinding BorderThickness}"
                                    CornerRadius="{TemplateBinding CornerRadius}"
                                    ui:FocusVisualHelper.IsTemplateFocusTarget="True" />
                            
                            <Grid
                                x:Name="ContentRoot"
                                MinHeight="{DynamicResource AppBarThemeMinHeight}">

                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="*" />
                                    <ColumnDefinition Width="Auto" />
                                </Grid.ColumnDefinitions>

                                <Grid.RowDefinitions>
                                    <RowDefinition Height="Auto" />
                                    <RowDefinition Height="Auto" />
                                </Grid.RowDefinitions>
                                <ui:FontIconFallback
                                    x:Name="OverflowCheckGlyph"
                                    Data="{StaticResource CheckMark}"
                                    Foreground="{DynamicResource AppBarToggleButtonCheckGlyphForeground}"
                                    FontFamily="{DynamicResource SymbolThemeFontFamily}"
                                    FontSize="16"
                                    HorizontalAlignment="Left"
                                    VerticalAlignment="Center"
                                    Height="14"
                                    Width="14"
                                    Margin="{DynamicResource AppBarToggleButtonOverflowCheckMargin}"
                                    Opacity="0"
                                    Visibility="Collapsed" />
                                <Viewbox
                                    x:Name="ContentViewbox"
                                    Height="{DynamicResource AppBarButtonContentHeight}"
                                    Margin="{DynamicResource AppBarButtonContentViewboxCollapsedMargin}"
                                    HorizontalAlignment="Stretch">
                                    <ContentPresenter
                                        x:Name="Content"
                                        Content="{TemplateBinding Icon}"
                                        TextElement.Foreground="{TemplateBinding Foreground}" />
                                </Viewbox>
                                <TextBlock
                                    x:Name="TextLabel"
                                    Grid.Row="1"
                                    Text="{TemplateBinding Label}"
                                    Foreground="{TemplateBinding Foreground}"
                                    FontSize="12"
                                    FontFamily="{TemplateBinding FontFamily}"
                                    TextAlignment="Center"
                                    TextWrapping="Wrap"
                                    Margin="{DynamicResource AppBarToggleButtonTextLabelMargin}" />
                                <TextBlock
                                    x:Name="OverflowTextLabel"
                                    Text="{TemplateBinding Label}"
                                    Foreground="{TemplateBinding Foreground}"
                                    FontSize="{DynamicResource ControlContentThemeFontSize}"
                                    FontFamily="{TemplateBinding FontFamily}"
                                    TextAlignment="Left"
                                    TextWrapping="NoWrap"
                                    HorizontalAlignment="Stretch"
                                    VerticalAlignment="Center"
                                    Margin="38,0,12,0"
                                    Padding="{DynamicResource AppBarToggleButtonOverflowTextLabelPadding}"
                                    Visibility="Collapsed" />
                                <TextBlock
                                    x:Name="KeyboardAcceleratorTextLabel"
                                    Grid.Column="1"
                                    Style="{DynamicResource CaptionTextBlockStyle}"
                                    Text="{TemplateBinding InputGestureText}"
                                    MinWidth="34"
                                    Margin="24,0,12,0"
                                    Foreground="{DynamicResource AppBarToggleButtonKeyboardAcceleratorTextForeground}"
                                    HorizontalAlignment="Right"
                                    VerticalAlignment="Center"
                                    Visibility="Collapsed" />

                            </Grid>
                        </Grid>
                    </Border>
                    <ControlTemplate.Triggers>
                        <!--#region ApplicationViewStates-->
                        <!-- Compact -->
                        <Trigger SourceName="ApplicationViewStatesListener" Property="CurrentStateName" Value="Compact">
                            <Setter TargetName="AppBarToggleButtonInnerBorder" Property="Margin" Value="{StaticResource AppBarButtonInnerBorderCompactMargin}" />
                            <Setter TargetName="TextLabel" Property="Visibility" Value="Collapsed" />
                        </Trigger>
                        <!-- LabelOnRight -->
                        <Trigger SourceName="ApplicationViewStatesListener" Property="CurrentStateName" Value="LabelOnRight">
                            <Setter TargetName="ContentViewbox" Property="Margin" Value="{DynamicResource AppBarButtonContentViewboxMargin}" />
                            <Setter TargetName="ContentRoot" Property="MinHeight" Value="{DynamicResource AppBarThemeCompactHeight}" />
                            <Setter TargetName="TextLabel" Property="Grid.Row" Value="0" />
                            <Setter TargetName="TextLabel" Property="Grid.Column" Value="1" />
                            <Setter TargetName="TextLabel" Property="TextAlignment" Value="Left" />
                            <Setter TargetName="TextLabel" Property="Margin" Value="{DynamicResource AppBarToggleButtonTextLabelOnRightMargin}" />
                            <Setter Property="Width" Value="NaN" />
                        </Trigger>
                        <!-- LabelCollapsed -->
                        <Trigger SourceName="ApplicationViewStatesListener" Property="CurrentStateName" Value="LabelCollapsed">
                            <Setter TargetName="ContentRoot" Property="MinHeight" Value="{DynamicResource AppBarThemeCompactHeight}" />
                            <Setter TargetName="TextLabel" Property="Visibility" Value="Collapsed" />
                        </Trigger>
                        <!-- Overflow -->
                        <Trigger SourceName="ApplicationViewStatesListener" Property="CurrentStateName" Value="Overflow">
                            <Setter TargetName="ContentRoot" Property="MinHeight" Value="0" />
                            <Setter TargetName="AppBarToggleButtonInnerBorder" Property="Margin" Value="{DynamicResource AppBarButtonInnerBorderOverflowMargin}" />
                            <Setter TargetName="ContentViewbox" Property="Visibility" Value="Collapsed" />
                            <Setter TargetName="TextLabel" Property="Visibility" Value="Collapsed" />
                            <Setter TargetName="OverflowCheckGlyph" Property="Visibility" Value="Visible" />
                            <Setter TargetName="OverflowTextLabel" Property="Visibility" Value="Visible" />
                        </Trigger>
                        <!-- OverflowWithMenuIcons -->
                        <Trigger SourceName="ApplicationViewStatesListener" Property="CurrentStateName" Value="OverflowWithMenuIcons">
                            <Setter TargetName="ContentRoot" Property="MinHeight" Value="0" />
                            <Setter TargetName="AppBarToggleButtonInnerBorder" Property="Margin" Value="{DynamicResource AppBarButtonInnerBorderOverflowMargin}" />
                            <Setter TargetName="ContentViewbox" Property="Visibility" Value="Visible" />
                            <Setter TargetName="ContentViewbox" Property="HorizontalAlignment" Value="Left" />
                            <Setter TargetName="ContentViewbox" Property="VerticalAlignment" Value="Center" />
                            <Setter TargetName="ContentViewbox" Property="MaxWidth" Value="16" />
                            <Setter TargetName="ContentViewbox" Property="MaxHeight" Value="16" />
                            <Setter TargetName="ContentViewbox" Property="Margin" Value="38,0,12,0" />
                            <Setter TargetName="TextLabel" Property="Visibility" Value="Collapsed" />
                            <Setter TargetName="OverflowCheckGlyph" Property="Visibility" Value="Visible" />
                            <Setter TargetName="OverflowTextLabel" Property="Visibility" Value="Visible" />
                            <Setter TargetName="OverflowTextLabel" Property="Margin" Value="76,0,12,0" />
                        </Trigger>
                        <!--#endregion-->
                        <!--#region CommonStates-->
                        <!-- PointerOver -->
                        <Trigger SourceName="CommonStatesListener" Property="CurrentStateName" Value="PointerOver">
                            <Setter TargetName="AppBarToggleButtonInnerBorder" Property="Background" Value="{DynamicResource AppBarToggleButtonBackgroundPointerOver}" />
                            <Setter TargetName="AppBarToggleButtonInnerBorder" Property="BorderBrush" Value="{DynamicResource AppBarToggleButtonBorderBrushPointerOver}" />
                            <Setter TargetName="Content" Property="TextElement.Foreground" Value="{DynamicResource AppBarToggleButtonForegroundPointerOver}" />
                            <Setter TargetName="TextLabel" Property="Foreground" Value="{DynamicResource AppBarToggleButtonForegroundPointerOver}" />
                            <Setter TargetName="OverflowCheckGlyph" Property="Foreground" Value="{DynamicResource AppBarToggleButtonOverflowLabelForegroundPointerOver}" />
                            <Setter TargetName="OverflowTextLabel" Property="Foreground" Value="{DynamicResource AppBarToggleButtonOverflowLabelForegroundPointerOver}" />
                            <Setter TargetName="KeyboardAcceleratorTextLabel" Property="Foreground" Value="{DynamicResource AppBarToggleButtonKeyboardAcceleratorTextForegroundPointerOver}" />
                        </Trigger>
                        <!-- Pressed -->
                        <Trigger SourceName="CommonStatesListener" Property="CurrentStateName" Value="Pressed">
                            <Setter TargetName="AppBarToggleButtonInnerBorder" Property="Background" Value="{DynamicResource AppBarToggleButtonBackgroundPressed}" />
                            <Setter TargetName="AppBarToggleButtonInnerBorder" Property="BorderBrush" Value="{DynamicResource AppBarToggleButtonBorderBrushPressed}" />
                            <Setter TargetName="Content" Property="TextElement.Foreground" Value="{DynamicResource AppBarToggleButtonForegroundPressed}" />
                            <Setter TargetName="TextLabel" Property="Foreground" Value="{DynamicResource AppBarToggleButtonForegroundPressed}" />
                            <Setter TargetName="OverflowCheckGlyph" Property="Foreground" Value="{DynamicResource AppBarToggleButtonOverflowLabelForegroundPressed}" />
                            <Setter TargetName="OverflowTextLabel" Property="Foreground" Value="{DynamicResource AppBarToggleButtonOverflowLabelForegroundPressed}" />
                            <Setter TargetName="KeyboardAcceleratorTextLabel" Property="Foreground" Value="{DynamicResource AppBarToggleButtonKeyboardAcceleratorTextForegroundPressed}" />
                        </Trigger>
                        <!-- Disabled -->
                        <Trigger SourceName="CommonStatesListener" Property="CurrentStateName" Value="Disabled">
                            <Setter TargetName="AppBarToggleButtonInnerBorder" Property="Background" Value="{DynamicResource AppBarToggleButtonBackgroundDisabled}" />
                            <Setter TargetName="AppBarToggleButtonInnerBorder" Property="BorderBrush" Value="{DynamicResource AppBarToggleButtonBorderBrushDisabled}" />
                            <Setter TargetName="Content" Property="TextElement.Foreground" Value="{DynamicResource AppBarToggleButtonForegroundDisabled}" />
                            <Setter TargetName="TextLabel" Property="Foreground" Value="{DynamicResource AppBarToggleButtonForegroundDisabled}" />
                            <Setter TargetName="OverflowCheckGlyph" Property="Foreground" Value="{DynamicResource AppBarToggleButtonOverflowLabelForegroundDisabled}" />
                            <Setter TargetName="OverflowTextLabel" Property="Foreground" Value="{DynamicResource AppBarToggleButtonOverflowLabelForegroundDisabled}" />
                            <Setter TargetName="KeyboardAcceleratorTextLabel" Property="Foreground" Value="{DynamicResource AppBarToggleButtonKeyboardAcceleratorTextForegroundDisabled}" />
                        </Trigger>
                        <!-- Checked -->
                        <Trigger SourceName="CommonStatesListener" Property="CurrentStateName" Value="Checked">
                            <Setter TargetName="AppBarToggleButtonInnerBorder" Property="Background" Value="{DynamicResource AppBarToggleButtonBackgroundChecked}" />
                            <Setter TargetName="AppBarToggleButtonInnerBorder" Property="BorderBrush" Value="{DynamicResource AppBarToggleButtonBorderBrushChecked}" />
                            <Setter TargetName="Content" Property="TextElement.Foreground" Value="{DynamicResource AppBarToggleButtonForegroundChecked}" />
                            <Setter TargetName="TextLabel" Property="Foreground" Value="{DynamicResource AppBarToggleButtonForegroundChecked}" />
                            <Setter TargetName="KeyboardAcceleratorTextLabel" Property="Foreground" Value="{DynamicResource AppBarToggleButtonKeyboardAcceleratorTextForegroundChecked}" />
                            <Setter TargetName="OverflowCheckGlyph" Property="Opacity" Value="1" />
                        </Trigger>
                        <!-- CheckedPointerOver -->
                        <Trigger SourceName="CommonStatesListener" Property="CurrentStateName" Value="CheckedPointerOver">
                            <Setter TargetName="AppBarToggleButtonInnerBorder" Property="Background" Value="{DynamicResource AppBarToggleButtonBackgroundCheckedPointerOver}" />
                            <Setter TargetName="AppBarToggleButtonInnerBorder" Property="BorderBrush" Value="{DynamicResource AppBarToggleButtonBorderBrushCheckedPointerOver}" />
                            <Setter TargetName="Content" Property="TextElement.Foreground" Value="{DynamicResource AppBarToggleButtonForegroundCheckedPointerOver}" />
                            <Setter TargetName="TextLabel" Property="Foreground" Value="{DynamicResource AppBarToggleButtonForegroundCheckedPointerOver}" />
                            <Setter TargetName="OverflowCheckGlyph" Property="Foreground" Value="{DynamicResource AppBarToggleButtonOverflowLabelForegroundCheckedPointerOver}" />
                            <Setter TargetName="OverflowTextLabel" Property="Foreground" Value="{DynamicResource AppBarToggleButtonOverflowLabelForegroundCheckedPointerOver}" />
                            <Setter TargetName="KeyboardAcceleratorTextLabel" Property="Foreground" Value="{DynamicResource AppBarToggleButtonKeyboardAcceleratorTextForegroundCheckedPointerOver}" />
                            <Setter TargetName="OverflowCheckGlyph" Property="Opacity" Value="1" />
                        </Trigger>
                        <!-- CheckedPressed -->
                        <Trigger SourceName="CommonStatesListener" Property="CurrentStateName" Value="CheckedPressed">
                            <Setter TargetName="AppBarToggleButtonInnerBorder" Property="Background" Value="{DynamicResource AppBarToggleButtonBackgroundCheckedPressed}" />
                            <Setter TargetName="AppBarToggleButtonInnerBorder" Property="BorderBrush" Value="{DynamicResource AppBarToggleButtonBorderBrushCheckedPressed}" />
                            <Setter TargetName="Content" Property="TextElement.Foreground" Value="{DynamicResource AppBarToggleButtonForegroundCheckedPressed}" />
                            <Setter TargetName="TextLabel" Property="Foreground" Value="{DynamicResource AppBarToggleButtonForegroundCheckedPressed}" />
                            <Setter TargetName="OverflowCheckGlyph" Property="Foreground" Value="{DynamicResource AppBarToggleButtonOverflowLabelForegroundCheckedPressed}" />
                            <Setter TargetName="OverflowTextLabel" Property="Foreground" Value="{DynamicResource AppBarToggleButtonOverflowLabelForegroundCheckedPressed}" />
                            <Setter TargetName="KeyboardAcceleratorTextLabel" Property="Foreground" Value="{DynamicResource AppBarToggleButtonKeyboardAcceleratorTextForegroundCheckedPressed}" />
                            <Setter TargetName="OverflowCheckGlyph" Property="Opacity" Value="1" />
                        </Trigger>
                        <!-- CheckedDisabled -->
                        <Trigger SourceName="CommonStatesListener" Property="CurrentStateName" Value="CheckedDisabled">
                            <Setter TargetName="AppBarToggleButtonInnerBorder" Property="Background" Value="{DynamicResource AppBarToggleButtonBackgroundCheckedDisabled}" />
                            <Setter TargetName="AppBarToggleButtonInnerBorder" Property="BorderBrush" Value="{DynamicResource AppBarToggleButtonBorderBrushCheckedDisabled}" />
                            <Setter TargetName="Content" Property="TextElement.Foreground" Value="{DynamicResource AppBarToggleButtonForegroundCheckedDisabled}" />
                            <Setter TargetName="TextLabel" Property="Foreground" Value="{DynamicResource AppBarToggleButtonForegroundCheckedDisabled}" />
                            <Setter TargetName="OverflowCheckGlyph" Property="Foreground" Value="{DynamicResource AppBarToggleButtonOverflowLabelForegroundCheckedDisabled}" />
                            <Setter TargetName="OverflowTextLabel" Property="Foreground" Value="{DynamicResource AppBarToggleButtonOverflowLabelForegroundCheckedDisabled}" />
                            <Setter TargetName="KeyboardAcceleratorTextLabel" Property="Foreground" Value="{DynamicResource AppBarToggleButtonKeyboardAcceleratorTextForegroundCheckedDisabled}" />
                            <Setter TargetName="OverflowCheckGlyph" Property="Opacity" Value="1" />
                        </Trigger>
                        <!-- OverflowPointerOver -->
                        <Trigger SourceName="CommonStatesListener" Property="CurrentStateName" Value="OverflowPointerOver">
                            <Setter TargetName="AppBarToggleButtonInnerBorder" Property="Background" Value="{DynamicResource AppBarToggleButtonBackgroundHighLightOverlayPointerOver}" />
                            <Setter TargetName="AppBarToggleButtonInnerBorder" Property="BorderBrush" Value="{DynamicResource AppBarToggleButtonBorderBrushPointerOver}" />
                            <Setter TargetName="Content" Property="TextElement.Foreground" Value="{DynamicResource AppBarToggleButtonForegroundPointerOver}" />
                            <Setter TargetName="TextLabel" Property="Foreground" Value="{DynamicResource AppBarToggleButtonForegroundPointerOver}" />
                            <Setter TargetName="OverflowCheckGlyph" Property="Foreground" Value="{DynamicResource AppBarToggleButtonCheckGlyphForegroundPointerOver}" />
                            <Setter TargetName="OverflowTextLabel" Property="Foreground" Value="{DynamicResource AppBarToggleButtonOverflowLabelForegroundPointerOver}" />
                            <Setter TargetName="KeyboardAcceleratorTextLabel" Property="Foreground" Value="{DynamicResource AppBarToggleButtonKeyboardAcceleratorTextForegroundPointerOver}" />
                        </Trigger>
                        <!-- OverflowPressed -->
                        <Trigger SourceName="CommonStatesListener" Property="CurrentStateName" Value="OverflowPressed">
                            <Setter TargetName="AppBarToggleButtonInnerBorder" Property="Background" Value="{DynamicResource AppBarToggleButtonBackgroundHighLightOverlayPressed}" />
                            <Setter TargetName="AppBarToggleButtonInnerBorder" Property="BorderBrush" Value="{DynamicResource AppBarToggleButtonBorderBrushPressed}" />
                            <Setter TargetName="Content" Property="TextElement.Foreground" Value="{DynamicResource AppBarToggleButtonForegroundPressed}" />
                            <Setter TargetName="TextLabel" Property="Foreground" Value="{DynamicResource AppBarToggleButtonForegroundPressed}" />
                            <Setter TargetName="OverflowCheckGlyph" Property="Foreground" Value="{DynamicResource AppBarToggleButtonCheckGlyphForegroundPressed}" />
                            <Setter TargetName="OverflowTextLabel" Property="Foreground" Value="{DynamicResource AppBarToggleButtonOverflowLabelForegroundPressed}" />
                            <Setter TargetName="KeyboardAcceleratorTextLabel" Property="Foreground" Value="{DynamicResource AppBarToggleButtonKeyboardAcceleratorTextForegroundPressed}" />
                        </Trigger>
                        <!-- OverflowChecked -->
                        <Trigger SourceName="CommonStatesListener" Property="CurrentStateName" Value="OverflowChecked">
                            <Setter TargetName="AppBarToggleButtonInnerBorder" Property="BorderBrush" Value="{DynamicResource AppBarToggleButtonBorderBrushChecked}" />
                            <Setter TargetName="Content" Property="TextElement.Foreground" Value="{DynamicResource AppBarToggleButtonForeground}" />
                            <Setter TargetName="TextLabel" Property="Foreground" Value="{DynamicResource AppBarToggleButtonForeground}" />
                            <Setter TargetName="OverflowCheckGlyph" Property="Foreground" Value="{DynamicResource AppBarToggleButtonForeground}" />
                            <Setter TargetName="OverflowCheckGlyph" Property="Opacity" Value="1" />
                        </Trigger>
                        <!-- OverflowCheckedPointerOver -->
                        <Trigger SourceName="CommonStatesListener" Property="CurrentStateName" Value="OverflowCheckedPointerOver">
                            <Setter TargetName="AppBarToggleButtonInnerBorder" Property="Background" Value="{DynamicResource AppBarToggleButtonBackgroundHighLightOverlayCheckedPointerOver}" />
                            <Setter TargetName="Content" Property="TextElement.Foreground" Value="{DynamicResource AppBarToggleButtonOverflowLabelForegroundCheckedPointerOver}" />
                            <Setter TargetName="TextLabel" Property="Foreground" Value="{DynamicResource AppBarToggleButtonForegroundCheckedPointerOver}" />
                            <Setter TargetName="OverflowCheckGlyph" Property="Foreground" Value="{DynamicResource AppBarToggleButtonOverflowLabelForegroundCheckedPointerOver}" />
                            <Setter TargetName="OverflowTextLabel" Property="Foreground" Value="{DynamicResource AppBarToggleButtonOverflowLabelForegroundCheckedPointerOver}" />
                            <Setter TargetName="KeyboardAcceleratorTextLabel" Property="Foreground" Value="{DynamicResource AppBarToggleButtonKeyboardAcceleratorTextForegroundPointerOver}" />
                            <Setter TargetName="OverflowCheckGlyph" Property="Opacity" Value="1" />
                        </Trigger>
                        <!-- OverflowCheckedPressed -->
                        <Trigger SourceName="CommonStatesListener" Property="CurrentStateName" Value="OverflowCheckedPressed">
                            <Setter TargetName="AppBarToggleButtonInnerBorder" Property="Background" Value="{DynamicResource AppBarToggleButtonBackgroundHighLightOverlayCheckedPressed}" />
                            <Setter TargetName="AppBarToggleButtonInnerBorder" Property="BorderBrush" Value="{DynamicResource AppBarToggleButtonBorderBrushCheckedPressed}" />
                            <Setter TargetName="Content" Property="TextElement.Foreground" Value="{DynamicResource AppBarToggleButtonOverflowLabelForegroundCheckedPressed}" />
                            <Setter TargetName="TextLabel" Property="Foreground" Value="{DynamicResource AppBarToggleButtonForegroundCheckedPressed}" />
                            <Setter TargetName="OverflowCheckGlyph" Property="Foreground" Value="{DynamicResource AppBarToggleButtonOverflowLabelForegroundCheckedPressed}" />
                            <Setter TargetName="OverflowTextLabel" Property="Foreground" Value="{DynamicResource AppBarToggleButtonOverflowLabelForegroundCheckedPressed}" />
                            <Setter TargetName="KeyboardAcceleratorTextLabel" Property="Foreground" Value="{DynamicResource AppBarToggleButtonKeyboardAcceleratorTextForegroundPressed}" />
                            <Setter TargetName="OverflowCheckGlyph" Property="Opacity" Value="1" />
                        </Trigger>
                        <!--#endregion-->
                        <!-- KeyboardAcceleratorTextVisible -->
                        <Trigger SourceName="KeyboardAcceleratorTextVisibilityListener" Property="CurrentStateName" Value="KeyboardAcceleratorTextVisible">
                            <Setter TargetName="KeyboardAcceleratorTextLabel" Property="Visibility" Value="Visible" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Style.Triggers>
            <Trigger Property="ToolBar.IsOverflowItem" Value="True">
                <Setter Property="HorizontalAlignment" Value="Stretch" />
                <Setter Property="Width" Value="NaN" />
            </Trigger>
        </Style.Triggers>
    </Style>

</ResourceDictionary>