<ResourceDictionary
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:core="using:CharacterMap.Core"
    xmlns:h="using:CharacterMap.Helpers">

    <ResourceDictionary.ThemeDictionaries>
        <ResourceDictionary x:Key="Dark">
            <SolidColorBrush x:Key="HoverBackgroundBrush" Color="#19ffffff" />
            <SolidColorBrush x:Key="PressedBackgroundBrush" Color="#33ffffff" />
        </ResourceDictionary>

        <ResourceDictionary x:Key="Light">
            <SolidColorBrush x:Key="HoverBackgroundBrush" Color="#19000000" />
            <SolidColorBrush x:Key="PressedBackgroundBrush" Color="#33000000" />
        </ResourceDictionary>
    </ResourceDictionary.ThemeDictionaries>

    <Style x:Key="ThemeTextBlockButtonStyle" TargetType="ButtonBase">
        <Setter Property="Background" Value="{ThemeResource HyperlinkButtonBackground}" />
        <Setter Property="Foreground" Value="{ThemeResource SystemControlForegroundAccentBrush}" />
        <Setter Property="MinWidth" Value="0" />
        <Setter Property="MinHeight" Value="0" />
        <Setter Property="CornerRadius" Value="{ThemeResource ControlCornerRadius}" />
        <Setter Property="UseSystemFocusVisuals" Value="{StaticResource UseSystemFocusVisuals}" />
        <Setter Property="h:FluentAnimation.Pressed" Value="Text" />
        <Setter Property="h:FluentAnimation.PointerOver" Value="Text" />
        <Setter Property="h:FluentAnimation.PointerOverOffset" Value="-2" />
        <Setter Property="h:FluentAnimation.UsePointerOver" Value="True" />
        <Setter Property="core:Properties.ToolTipStyleKey" Value="DefaultThemeToolTipStyle" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="ButtonBase">
                    <Grid
                        x:Name="Presenter"
                        Padding="{TemplateBinding Padding}"
                        Background="{TemplateBinding Background}"
                        BackgroundTransition="{StaticResource BackgroundTransition}"
                        CornerRadius="{TemplateBinding CornerRadius}">
                        <ContentPresenter
                            x:Name="Text"
                            HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                            VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                            Content="{TemplateBinding Content}" />

                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal" />

                                <VisualState x:Name="PointerOver">
                                    <VisualState.Setters>
                                        <Setter Target="Presenter.Background" Value="{ThemeResource HyperlinkButtonBackgroundPointerOver}" />
                                        <Setter Target="Presenter.BorderBrush" Value="{ThemeResource HyperlinkButtonBorderBrushPointerOver}" />
                                    </VisualState.Setters>

                                </VisualState>

                                <VisualState x:Name="Pressed">

                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Text" Storyboard.TargetProperty="Foreground">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource HyperlinkButtonForegroundPressed}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Presenter" Storyboard.TargetProperty="Background">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource HyperlinkButtonBackgroundPressed}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Presenter" Storyboard.TargetProperty="BorderBrush">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource HyperlinkButtonBorderBrushPressed}" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>

                                <VisualState x:Name="Disabled">

                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Text" Storyboard.TargetProperty="Foreground">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource HyperlinkButtonForegroundDisabled}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Presenter" Storyboard.TargetProperty="Background">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource HyperlinkButtonBackgroundDisabled}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Presenter" Storyboard.TargetProperty="BorderBrush">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource HyperlinkButtonBorderBrushDisabled}" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>

                            </VisualStateGroup>

                        </VisualStateManager.VisualStateGroups>

                    </Grid>

                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="SmolButton" TargetType="Button">
        <Setter Property="Width" Value="{ThemeResource InkToolbarButtonWidth}" />
        <Setter Property="Height" Value="{ThemeResource InkToolbarButtonHeight}" />
        <Setter Property="BorderThickness" Value="{ThemeResource InkToolbarButtonBorderThemeThickness}" />
        <Setter Property="Background" Value="{ThemeResource InkToolbarButtonBackground}" />
        <Setter Property="Foreground" Value="{ThemeResource InkToolbarButtonForeground}" />
        <Setter Property="BorderBrush" Value="{ThemeResource InkToolbarButtonBorderBrush}" />
        <Setter Property="VerticalAlignment" Value="Center" />
        <Setter Property="UseSystemFocusVisuals" Value="True" />
        <Setter Property="FontFamily" Value="{ThemeResource SymbolThemeFontFamily}" />
        <Setter Property="FocusVisualMargin" Value="-3" />
        <Setter Property="CornerRadius" Value="4" />
        <Setter Property="Padding" Value="0,0,0,0" />
        <Setter Property="UseSystemFocusVisuals" Value="{StaticResource UseSystemFocusVisuals}" />
        <Setter Property="h:FluentAnimation.PointerDownScale" Value="0.87" />
        <Setter Property="core:Properties.ToolTipStyleKey" Value="DefaultThemeToolTipStyle" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="Button">
                    <Grid
                        x:Name="RootElement"
                        h:CompositionFactory.OpacityDuration="0:0:0.12"
                        Background="{TemplateBinding Background}"
                        BackgroundTransition="{StaticResource BackgroundTransition}"
                        BorderBrush="{TemplateBinding BorderBrush}"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        CornerRadius="{TemplateBinding CornerRadius}">
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup
                                x:Name="CommonStates"
                                h:FluentAnimation.PointerOver="{Binding ElementName=Content}"
                                h:FluentAnimation.Pressed="{Binding ElementName=Content}">
                                <VisualState x:Name="Normal" />
                                <VisualState x:Name="PointerOver">
                                    <VisualState.Setters>
                                        <Setter Target="RootElement.(RevealBrush.State)" Value="PointerOver" />
                                        <Setter Target="RootElement.Background" Value="{ThemeResource InkToolbarButtonBackgroundPointerOver}" />
                                        <Setter Target="RootElement.BorderBrush" Value="{ThemeResource InkToolbarButtonBorderBrushPointerOver}" />
                                        <Setter Target="Content.Foreground" Value="{ThemeResource InkToolbarButtonForegroundPointerOver}" />
                                    </VisualState.Setters>
                                </VisualState>
                                <VisualState x:Name="Pressed">
                                    <VisualState.Setters>
                                        <Setter Target="RootElement.(RevealBrush.State)" Value="Pressed" />
                                        <Setter Target="RootElement.Background" Value="{ThemeResource InkToolbarButtonBackgroundPressed}" />
                                        <Setter Target="RootElement.BorderBrush" Value="{ThemeResource InkToolbarButtonBorderBrushPressed}" />
                                        <Setter Target="Content.Foreground" Value="{ThemeResource InkToolbarButtonForegroundPressed}" />
                                    </VisualState.Setters>
                                </VisualState>
                                <VisualState x:Name="Disabled">
                                    <VisualState.Setters>
                                        <Setter Target="RootElement.Opacity" Value="0.4" />
                                    </VisualState.Setters>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <ContentPresenter
                            x:Name="Content"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            HighContrastAdjustment="None"
                            IsTextScaleFactorEnabled="False" />
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="ChromelessButtonStyle" TargetType="Button">
        <Setter Property="Background" Value="Transparent" />
        <Setter Property="Foreground" Value="{ThemeResource ButtonForeground}" />
        <Setter Property="BorderBrush" Value="Transparent" />
        <Setter Property="BorderThickness" Value="0" />
        <Setter Property="Padding" Value="0" />
        <Setter Property="HorizontalAlignment" Value="Stretch" />
        <Setter Property="HorizontalContentAlignment" Value="Stretch" />
        <Setter Property="VerticalAlignment" Value="Stretch" />
        <Setter Property="VerticalContentAlignment" Value="Stretch" />
        <Setter Property="FontFamily" Value="{ThemeResource ContentControlThemeFontFamily}" />
        <Setter Property="FontWeight" Value="Normal" />
        <Setter Property="FontSize" Value="{ThemeResource ControlContentThemeFontSize}" />
        <Setter Property="FocusVisualMargin" Value="-3" />
        <Setter Property="UseSystemFocusVisuals" Value="True" />
        <Setter Property="core:Properties.ToolTipStyleKey" Value="DefaultThemeToolTipStyle" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="Button">
                    <ContentPresenter
                        x:Name="ContentPresenter"
                        Padding="{TemplateBinding Padding}"
                        HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
                        VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
                        AutomationProperties.AccessibilityView="Raw"
                        Background="{TemplateBinding Background}"
                        Content="{TemplateBinding Content}"
                        ContentTemplate="{TemplateBinding ContentTemplate}"
                        ContentTransitions="{TemplateBinding ContentTransitions}">
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal">
                                    <Storyboard>
                                        <PointerUpThemeAnimation Storyboard.TargetName="ContentPresenter" />
                                    </Storyboard>
                                </VisualState>

                                <VisualState x:Name="PointerOver">
                                    <Storyboard>
                                        <PointerUpThemeAnimation Storyboard.TargetName="ContentPresenter" />
                                    </Storyboard>
                                </VisualState>

                                <VisualState x:Name="Pressed">
                                    <Storyboard>
                                        <PointerDownThemeAnimation Storyboard.TargetName="ContentPresenter" />
                                    </Storyboard>
                                </VisualState>

                                <VisualState x:Name="Disabled">
                                    <VisualState.Setters>
                                        <Setter Target="ContentPresenter.Opacity" Value="0.5" />
                                    </VisualState.Setters>
                                    <Storyboard>
                                        <PointerUpThemeAnimation Storyboard.TargetName="ContentPresenter" />
                                    </Storyboard>
                                </VisualState>

                            </VisualStateGroup>

                        </VisualStateManager.VisualStateGroups>
                    </ContentPresenter>

                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="IconButton" BasedOn="{StaticResource ButtonRevealStyle}" TargetType="Button">
        <Setter Property="Background" Value="{ThemeResource ListViewItemRevealBackground}" />
        <Setter Property="Foreground" Value="{ThemeResource ButtonForeground}" />
        <Setter Property="BorderBrush" Value="{ThemeResource ButtonRevealBorderBrush}" />
        <Setter Property="BorderThickness" Value="1" />
        <Setter Property="Padding" Value="0,4,8,5" />
        <Setter Property="HorizontalAlignment" Value="Stretch" />
        <Setter Property="HorizontalContentAlignment" Value="Stretch" />
        <Setter Property="VerticalAlignment" Value="Center" />
        <Setter Property="FontFamily" Value="{ThemeResource ContentControlThemeFontFamily}" />
        <Setter Property="FontWeight" Value="Normal" />
        <Setter Property="FontSize" Value="{ThemeResource ControlContentThemeFontSize}" />
        <Setter Property="FocusVisualMargin" Value="-3" />
        <Setter Property="Height" Value="40" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="Button">
                    <Grid
                        x:Name="RootGrid"
                        core:Properties.ToolTip="{TemplateBinding Content}"
                        Background="{TemplateBinding Background}">

                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal">
                                    <Storyboard>
                                        <PointerUpThemeAnimation Storyboard.TargetName="ContentRoot" />
                                    </Storyboard>
                                </VisualState>

                                <VisualState x:Name="PointerOver">
                                    <VisualState.Setters>
                                        <Setter Target="RootGrid.(RevealBrush.State)" Value="PointerOver" />
                                        <Setter Target="RootGrid.Background" Value="{ThemeResource ListViewItemBackgroundPointerOver}" />
                                        <Setter Target="BorderElement.BorderBrush" Value="{ThemeResource ListViewItemRevealBorderBrushPointerOver}" />
                                    </VisualState.Setters>
                                    <Storyboard>
                                        <PointerUpThemeAnimation Storyboard.TargetName="ContentRoot" />
                                    </Storyboard>
                                </VisualState>

                                <VisualState x:Name="Pressed">
                                    <VisualState.Setters>
                                        <Setter Target="RootGrid.(RevealBrush.State)" Value="Pressed" />
                                        <Setter Target="RootGrid.Background" Value="{ThemeResource ButtonRevealBackgroundPressed}" />
                                        <Setter Target="BorderElement.BorderBrush" Value="{ThemeResource ButtonRevealBorderBrushPressed}" />
                                    </VisualState.Setters>
                                    <Storyboard>
                                        <PointerDownThemeAnimation Storyboard.TargetName="ContentRoot" />
                                    </Storyboard>
                                </VisualState>

                                <VisualState x:Name="Disabled">
                                    <VisualState.Setters>
                                        <Setter Target="RootGrid.Opacity" Value="0.5" />
                                    </VisualState.Setters>
                                </VisualState>

                            </VisualStateGroup>
                            <VisualStateGroup x:Name="SelectedStates">
                                <VisualState x:Name="NotSelectedState" />
                                <VisualState x:Name="SelectedState">
                                    <VisualState.Setters>
                                        <Setter Target="ContentPresenter.FontWeight" Value="Bold" />
                                        <!--<Setter Target="ContentPresenter.Foreground" Value="{ThemeResource SystemAccentColor}" />-->
                                        <Setter Target="IconPresenter.Foreground" Value="{ThemeResource SystemAccentColor}" />
                                    </VisualState.Setters>
                                </VisualState>
                            </VisualStateGroup>

                        </VisualStateManager.VisualStateGroups>

                        <Border
                            x:Name="BorderElement"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}">
                            <Grid x:Name="ContentRoot">
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="48" />
                                    <ColumnDefinition Width="*" />
                                </Grid.ColumnDefinitions>

                                <Viewbox Margin="10,12,16,12">
                                    <ContentPresenter x:Name="IconPresenter" Content="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=(core:Properties.Icon)}" />
                                </Viewbox>

                                <ContentPresenter
                                    x:Name="ContentPresenter"
                                    Grid.Column="1"
                                    Padding="{TemplateBinding Padding}"
                                    HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
                                    VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
                                    AutomationProperties.AccessibilityView="Raw"
                                    Content="{TemplateBinding Content}"
                                    ContentTemplate="{TemplateBinding ContentTemplate}"
                                    ContentTransitions="{TemplateBinding ContentTransitions}" />
                            </Grid>
                        </Border>

                    </Grid>

                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="IconToggleButtonStyle" BasedOn="{StaticResource TextBlockButtonStyle}" TargetType="ToggleButton">
        <Setter Property="FontFamily" Value="{ThemeResource SymbolThemeFontFamily}" />
        <Setter Property="FontSize" Value="20" />
        <Setter Property="Foreground" Value="{ThemeResource SystemControlForegroundBaseHighBrush}" />
        <Setter Property="Width" Value="48" />
        <Setter Property="Height" Value="48" />
        <Setter Property="Padding" Value="0" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="ButtonBase">
                    <Border x:Name="Border" Background="{TemplateBinding Background}">
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal">
                                    <Storyboard>
                                        <PointerUpThemeAnimation TargetName="Container" />
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="PointerOver">
                                    <Storyboard>
                                        <PointerUpThemeAnimation TargetName="Container" />
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Border" Storyboard.TargetProperty="Background">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SystemControlBackgroundListLowBrush}" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Pressed">
                                    <Storyboard>
                                        <PointerDownThemeAnimation TargetName="Container" />
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Border" Storyboard.TargetProperty="Background">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SystemControlBackgroundListMediumBrush}" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Disabled">
                                    <Storyboard>
                                        <PointerUpThemeAnimation TargetName="Container" />
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Border" Storyboard.TargetProperty="Opacity">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="0.4" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Checked">
                                    <VisualState.Setters>
                                        <Setter Target="Text.Visibility" Value="Collapsed" />
                                        <Setter Target="CheckedContent.Visibility" Value="Visible" />
                                    </VisualState.Setters>
                                    <Storyboard>
                                        <PointerUpThemeAnimation TargetName="Container" />
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="CheckedPointerOver">
                                    <VisualState.Setters>
                                        <Setter Target="Border.Background" Value="{ThemeResource SystemControlBackgroundListLowBrush}" />
                                        <Setter Target="Text.Visibility" Value="Collapsed" />
                                        <Setter Target="CheckedContent.Visibility" Value="Visible" />
                                    </VisualState.Setters>
                                    <Storyboard>
                                        <PointerUpThemeAnimation TargetName="Container" />
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="CheckedPressed">
                                    <VisualState.Setters>
                                        <Setter Target="Border.Background" Value="{ThemeResource SystemControlBackgroundListLowBrush}" />
                                        <Setter Target="Text.Visibility" Value="Collapsed" />
                                        <Setter Target="CheckedContent.Visibility" Value="Visible" />
                                    </VisualState.Setters>
                                    <Storyboard>
                                        <PointerUpThemeAnimation TargetName="Container" />
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Grid x:Name="Container">
                            <ContentPresenter
                                x:Name="Text"
                                HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
                                VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
                                Content="{TemplateBinding Content}"
                                FontSize="{TemplateBinding FontSize}"
                                Foreground="{TemplateBinding Foreground}"
                                IsTextScaleFactorEnabled="False" />

                            <ContentPresenter
                                x:Name="CheckedContent"
                                x:Load="False"
                                HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
                                VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
                                Content="{TemplateBinding Tag}"
                                FontSize="{TemplateBinding FontSize}"
                                Foreground="{TemplateBinding Foreground}"
                                IsTextScaleFactorEnabled="False"
                                Visibility="Collapsed" />
                        </Grid>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="TitleBarButtonStyle" BasedOn="{StaticResource TextBlockButtonStyle}" TargetType="Button">
        <Setter Property="FontFamily" Value="{ThemeResource SymbolThemeFontFamily}" />
        <Setter Property="FontSize" Value="14" />
        <Setter Property="Foreground" Value="{ThemeResource SystemControlForegroundBaseHighBrush}" />
        <Setter Property="Width" Value="45" />
        <Setter Property="VerticalAlignment" Value="Stretch" />
        <Setter Property="Padding" Value="0" />
        <Setter Property="Background" Value="Transparent" />
        <Setter Property="BorderBrush" Value="Transparent" />
        <Setter Property="core:Properties.ToolTipStyleKey" Value="DefaultThemeToolTipStyle" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="ButtonBase">
                    <Border
                        x:Name="Border"
                        Background="{TemplateBinding Background}"
                        BackgroundTransition="{StaticResource QuickBackgroundTransition}">
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup
                                x:Name="CommonStates"
                                h:FluentAnimation.PointerOver="{Binding ElementName=Text}"
                                h:FluentAnimation.Pressed="{Binding ElementName=Text}">
                                <VisualState x:Name="Normal" />
                                <VisualState x:Name="PointerOver">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Border" Storyboard.TargetProperty="Background">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SystemControlBackgroundListLowBrush}" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Pressed">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Border" Storyboard.TargetProperty="Background">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SystemControlBackgroundListMediumBrush}" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Disabled">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Border" Storyboard.TargetProperty="Opacity">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="0.4" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <ContentPresenter
                            x:Name="Text"
                            HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
                            VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
                            Content="{TemplateBinding Content}"
                            FontSize="{TemplateBinding FontSize}"
                            Foreground="{TemplateBinding Foreground}"
                            IsTextScaleFactorEnabled="False" />
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

</ResourceDictionary>
