<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:System="clr-namespace:System;assembly=mscorlib"
                    xmlns:local="clr-namespace:ForzaUI;assembly=">

    <DropShadowEffect x:Key="A_DropShadowEffect_HelpBar"
                      Color="{StaticResource A_Color_DropShadow}"
                      BlurRadius="0"
                      ShadowDepth="2" />

    <FZMaterialPresetGlassRoundtangle x:Key="A_FZMaterialPresetGlassRoundtangle_GlassPanel_KeyboardButtonBackground" 
                                      BasedOn="{StaticResource A_FZMaterialPresetGlassRoundtangle_GlassPanel_Base}" 
                                      CornerRadius="{StaticResource A_CornerRadius_KeyboardButtonBarBackground_All}" />

    <FZMaterialPresetGlassRoundtangle x:Key="A_FZMaterialPresetGlassRoundtangle_GlassPanel_ControllerButtonBackground" 
                                      BasedOn="{StaticResource A_FZMaterialPresetGlassRoundtangle_GlassPanel_Base}" 
                                      CornerRadius="{StaticResource A_CornerRadius_ConsoleButtonBarBackground_All}" />

    <Style x:Key="A_Style_ControllerButton_Background"
           TargetType="local:FZMaterial"
           BasedOn="{StaticResource A_Style_FZMaterial_FlatPanel_Base}">
        <Setter Property="Color" Value="{StaticResource A_Color_ButtonBar_Background}" />
    </Style>

    <local:MappingConverter x:Key="A_Converter_DisplayButtonToTexture_ControllerButtonIcon" Default="{StaticResource A_BitmapImage_ControllerButton_Unknown}">
        <local:MappingConverterEntry Key="{x:Static local:ControllerButtonType.A}" Value="{StaticResource A_BitmapImage_ControllerButton_A}" />
        <local:MappingConverterEntry Key="{x:Static local:ControllerButtonType.B}" Value="{StaticResource A_BitmapImage_ControllerButton_B}" />
        <local:MappingConverterEntry Key="{x:Static local:ControllerButtonType.X}" Value="{StaticResource A_BitmapImage_ControllerButton_X}" />
        <local:MappingConverterEntry Key="{x:Static local:ControllerButtonType.Y}" Value="{StaticResource A_BitmapImage_ControllerButton_Y}" />
        <local:MappingConverterEntry Key="{x:Static local:ControllerButtonType.Start}" Value="{StaticResource A_BitmapImage_ControllerButton_Menu}" />
        <local:MappingConverterEntry Key="{x:Static local:ControllerButtonType.Back}" Value="{StaticResource A_BitmapImage_ControllerButton_View}" />
        <local:MappingConverterEntry Key="{x:Static local:ControllerButtonType.LBumper}" Value="{StaticResource A_BitmapImage_ControllerButton_LB}" />
        <local:MappingConverterEntry Key="{x:Static local:ControllerButtonType.RBumper}" Value="{StaticResource A_BitmapImage_ControllerButton_RB}" />
        <local:MappingConverterEntry Key="{x:Static local:ControllerButtonType.LTrigger}" Value="{StaticResource A_BitmapImage_ControllerButton_LT}" />
        <local:MappingConverterEntry Key="{x:Static local:ControllerButtonType.RTrigger}" Value="{StaticResource A_BitmapImage_ControllerButton_RT}" />
        <local:MappingConverterEntry Key="{x:Static local:ControllerButtonType.L3}" Value="{StaticResource A_BitmapImage_ControllerButton_L3}" />
        <local:MappingConverterEntry Key="{x:Static local:ControllerButtonType.R3}" Value="{StaticResource A_BitmapImage_ControllerButton_R3}" />
        <local:MappingConverterEntry Key="{x:Static local:ControllerButtonType.DPadHorizontal}" Value="{StaticResource A_BitmapImage_ControllerButton_DPadLeftRight}" />
        <local:MappingConverterEntry Key="{x:Static local:ControllerButtonType.DPadVertical}" Value="{StaticResource A_BitmapImage_ControllerButton_DPadUpDown}" />
        <local:MappingConverterEntry Key="{x:Static local:ControllerButtonType.DPadUp}" Value="{StaticResource A_BitmapImage_ControllerButton_DPadUp}" />
        <local:MappingConverterEntry Key="{x:Static local:ControllerButtonType.DPadDown}" Value="{StaticResource A_BitmapImage_ControllerButton_DPadDown}" />
        <local:MappingConverterEntry Key="{x:Static local:ControllerButtonType.DPadLeft}" Value="{StaticResource A_BitmapImage_ControllerButton_DPadLeft}" />
        <local:MappingConverterEntry Key="{x:Static local:ControllerButtonType.DPadRight}" Value="{StaticResource A_BitmapImage_ControllerButton_DPadRight}" />
        <local:MappingConverterEntry Key="{x:Static local:ControllerButtonType.LThumb}" Value="{StaticResource A_BitmapImage_ControllerButton_LeftThumb}" />
        <local:MappingConverterEntry Key="{x:Static local:ControllerButtonType.LThumb_LeftRight}" Value="{StaticResource A_BitmapImage_ControllerButton_LeftThumb_LeftRight}" />
        <local:MappingConverterEntry Key="{x:Static local:ControllerButtonType.LThumb_UpDown}" Value="{StaticResource A_BitmapImage_ControllerButton_LeftThumb_UpDown}" />
        <local:MappingConverterEntry Key="{x:Static local:ControllerButtonType.LThumb_Up}" Value="{StaticResource A_BitmapImage_ControllerButton_LeftThumb_Up}" />
        <local:MappingConverterEntry Key="{x:Static local:ControllerButtonType.LThumb_Down}" Value="{StaticResource A_BitmapImage_ControllerButton_LeftThumb_Down}" />
        <local:MappingConverterEntry Key="{x:Static local:ControllerButtonType.LThumb_Left}" Value="{StaticResource A_BitmapImage_ControllerButton_LeftThumb_Left}" />
        <local:MappingConverterEntry Key="{x:Static local:ControllerButtonType.LThumb_Right}" Value="{StaticResource A_BitmapImage_ControllerButton_LeftThumb_Right}" />
        <local:MappingConverterEntry Key="{x:Static local:ControllerButtonType.RThumb}" Value="{StaticResource A_BitmapImage_ControllerButton_RightThumb}" />
        <local:MappingConverterEntry Key="{x:Static local:ControllerButtonType.RThumb_LeftRight}" Value="{StaticResource A_BitmapImage_ControllerButton_RightThumb_LeftRight}" />
        <local:MappingConverterEntry Key="{x:Static local:ControllerButtonType.RThumb_UpDown}" Value="{StaticResource A_BitmapImage_ControllerButton_RightThumb_UpDown}" />
        <local:MappingConverterEntry Key="{x:Static local:ControllerButtonType.RThumb_Up}" Value="{StaticResource A_BitmapImage_ControllerButton_RightThumb_Up}" />
        <local:MappingConverterEntry Key="{x:Static local:ControllerButtonType.RThumb_Down}" Value="{StaticResource A_BitmapImage_ControllerButton_RightThumb_Down}" />
        <local:MappingConverterEntry Key="{x:Static local:ControllerButtonType.RThumb_Left}" Value="{StaticResource A_BitmapImage_ControllerButton_RightThumb_Left}" />
        <local:MappingConverterEntry Key="{x:Static local:ControllerButtonType.RThumb_Right}" Value="{StaticResource A_BitmapImage_ControllerButton_RightThumb_Right}" />
    </local:MappingConverter>

    <local:MappingConverter x:Key="A_Converter_DisplayButtonToTexture_ControllerButtonIcon_Large" Default="{StaticResource A_BitmapImage_ControllerButton_Unknown_Large}">
        <local:MappingConverterEntry Key="{x:Static local:ControllerButtonType.A}" Value="{StaticResource A_BitmapImage_ControllerButton_A_Large}" />
        <local:MappingConverterEntry Key="{x:Static local:ControllerButtonType.B}" Value="{StaticResource A_BitmapImage_ControllerButton_B_Large}" />
        <local:MappingConverterEntry Key="{x:Static local:ControllerButtonType.X}" Value="{StaticResource A_BitmapImage_ControllerButton_X_Large}" />
        <local:MappingConverterEntry Key="{x:Static local:ControllerButtonType.Y}" Value="{StaticResource A_BitmapImage_ControllerButton_Y_Large}" />
        <local:MappingConverterEntry Key="{x:Static local:ControllerButtonType.Start}" Value="{StaticResource A_BitmapImage_ControllerButton_Menu_Large}" />
        <local:MappingConverterEntry Key="{x:Static local:ControllerButtonType.Back}" Value="{StaticResource A_BitmapImage_ControllerButton_View_Large}" />
        <local:MappingConverterEntry Key="{x:Static local:ControllerButtonType.LBumper}" Value="{StaticResource A_BitmapImage_ControllerButton_LB_Large}" />
        <local:MappingConverterEntry Key="{x:Static local:ControllerButtonType.RBumper}" Value="{StaticResource A_BitmapImage_ControllerButton_RB_Large}" />
        <local:MappingConverterEntry Key="{x:Static local:ControllerButtonType.LTrigger}" Value="{StaticResource A_BitmapImage_ControllerButton_LT_Large}" />
        <local:MappingConverterEntry Key="{x:Static local:ControllerButtonType.RTrigger}" Value="{StaticResource A_BitmapImage_ControllerButton_RT_Large}" />
        <local:MappingConverterEntry Key="{x:Static local:ControllerButtonType.L3}" Value="{StaticResource A_BitmapImage_ControllerButton_L3_Large}" />
        <local:MappingConverterEntry Key="{x:Static local:ControllerButtonType.R3}" Value="{StaticResource A_BitmapImage_ControllerButton_R3_Large}" />
        <local:MappingConverterEntry Key="{x:Static local:ControllerButtonType.DPadHorizontal}" Value="{StaticResource A_BitmapImage_ControllerButton_DPadLeftRight_Large}" />
        <local:MappingConverterEntry Key="{x:Static local:ControllerButtonType.DPadVertical}" Value="{StaticResource A_BitmapImage_ControllerButton_DPadUpDown_Large}" />
        <local:MappingConverterEntry Key="{x:Static local:ControllerButtonType.DPadUp}" Value="{StaticResource A_BitmapImage_ControllerButton_DPadUp_Large}" />
        <local:MappingConverterEntry Key="{x:Static local:ControllerButtonType.DPadDown}" Value="{StaticResource A_BitmapImage_ControllerButton_DPadDown_Large}" />
        <local:MappingConverterEntry Key="{x:Static local:ControllerButtonType.DPadLeft}" Value="{StaticResource A_BitmapImage_ControllerButton_DPadLeft_Large}" />
        <local:MappingConverterEntry Key="{x:Static local:ControllerButtonType.DPadRight}" Value="{StaticResource A_BitmapImage_ControllerButton_DPadRight_Large}" />
        <local:MappingConverterEntry Key="{x:Static local:ControllerButtonType.LThumb}" Value="{StaticResource A_BitmapImage_ControllerButton_LeftThumb_Large}" />
        <local:MappingConverterEntry Key="{x:Static local:ControllerButtonType.LThumb_LeftRight}" Value="{StaticResource A_BitmapImage_ControllerButton_LeftThumb_LeftRight_Large}" />
        <local:MappingConverterEntry Key="{x:Static local:ControllerButtonType.LThumb_UpDown}" Value="{StaticResource A_BitmapImage_ControllerButton_LeftThumb_UpDown_Large}" />
        <local:MappingConverterEntry Key="{x:Static local:ControllerButtonType.LThumb_Up}" Value="{StaticResource A_BitmapImage_ControllerButton_LeftThumb_Up_Large}" />
        <local:MappingConverterEntry Key="{x:Static local:ControllerButtonType.LThumb_Down}" Value="{StaticResource A_BitmapImage_ControllerButton_LeftThumb_Down_Large}" />
        <local:MappingConverterEntry Key="{x:Static local:ControllerButtonType.LThumb_Left}" Value="{StaticResource A_BitmapImage_ControllerButton_LeftThumb_Left_Large}" />
        <local:MappingConverterEntry Key="{x:Static local:ControllerButtonType.LThumb_Right}" Value="{StaticResource A_BitmapImage_ControllerButton_LeftThumb_Right_Large}" />
        <local:MappingConverterEntry Key="{x:Static local:ControllerButtonType.RThumb}" Value="{StaticResource A_BitmapImage_ControllerButton_RightThumb_Large}" />
        <local:MappingConverterEntry Key="{x:Static local:ControllerButtonType.RThumb_LeftRight}" Value="{StaticResource A_BitmapImage_ControllerButton_RightThumb_LeftRight_Large}" />
        <local:MappingConverterEntry Key="{x:Static local:ControllerButtonType.RThumb_UpDown}" Value="{StaticResource A_BitmapImage_ControllerButton_RightThumb_UpDown_Large}" />
        <local:MappingConverterEntry Key="{x:Static local:ControllerButtonType.RThumb_Up}" Value="{StaticResource A_BitmapImage_ControllerButton_RightThumb_Up_Large}" />
        <local:MappingConverterEntry Key="{x:Static local:ControllerButtonType.RThumb_Down}" Value="{StaticResource A_BitmapImage_ControllerButton_RightThumb_Down_Large}" />
        <local:MappingConverterEntry Key="{x:Static local:ControllerButtonType.RThumb_Left}" Value="{StaticResource A_BitmapImage_ControllerButton_RightThumb_Left_Large}" />
        <local:MappingConverterEntry Key="{x:Static local:ControllerButtonType.RThumb_Right}" Value="{StaticResource A_BitmapImage_ControllerButton_RightThumb_Right_Large}" />
    </local:MappingConverter>

    <local:MappingConverter x:Key="A_Converter_DisplayButtonToTexture_RawGameControllerButtonIcon" Default="{StaticResource A_BitmapImage_RawController_Button_Small}">
        <local:MappingConverterEntry Key="{x:Static local:ControllerButtonType.DPadHorizontal}" Value="{StaticResource A_BitmapImage_ControllerButton_DPadLeftRight}"/>
        <local:MappingConverterEntry Key="{x:Static local:ControllerButtonType.DPadVertical}" Value="{StaticResource A_BitmapImage_ControllerButton_DPadUpDown}"/>
        <local:MappingConverterEntry Key="{x:Static local:ControllerButtonType.DPadUp}" Value="{StaticResource A_BitmapImage_ControllerButton_DPadUp}"/>
        <local:MappingConverterEntry Key="{x:Static local:ControllerButtonType.DPadDown}" Value="{StaticResource A_BitmapImage_ControllerButton_DPadDown}"/>
        <local:MappingConverterEntry Key="{x:Static local:ControllerButtonType.DPadLeft}" Value="{StaticResource A_BitmapImage_ControllerButton_DPadLeft}"/>
        <local:MappingConverterEntry Key="{x:Static local:ControllerButtonType.DPadRight}" Value="{StaticResource A_BitmapImage_ControllerButton_DPadRight}"/>
        <local:MappingConverterEntry Key="{x:Static local:ControllerButtonType.Invalid}" Value="{StaticResource A_BitmapImage_ControllerButton_Unknown}"/>
    </local:MappingConverter>

    <local:MappingConverter x:Key="A_Converter_DisplayButtonToTexture_RawGameControllerButtonIcon_Large" Default="{StaticResource A_BitmapImage_RawController_Button_Medium}">
        <local:MappingConverterEntry Key="{x:Static local:ControllerButtonType.DPadHorizontal}" Value="{StaticResource A_BitmapImage_ControllerButton_DPadLeftRight_Large}"/>
        <local:MappingConverterEntry Key="{x:Static local:ControllerButtonType.DPadVertical}" Value="{StaticResource A_BitmapImage_ControllerButton_DPadUpDown_Large}"/>
        <local:MappingConverterEntry Key="{x:Static local:ControllerButtonType.DPadUp}" Value="{StaticResource A_BitmapImage_ControllerButton_DPadUp_Large}"/>
        <local:MappingConverterEntry Key="{x:Static local:ControllerButtonType.DPadDown}" Value="{StaticResource A_BitmapImage_ControllerButton_DPadDown_Large}"/>
        <local:MappingConverterEntry Key="{x:Static local:ControllerButtonType.DPadLeft}" Value="{StaticResource A_BitmapImage_ControllerButton_DPadLeft_Large}"/>
        <local:MappingConverterEntry Key="{x:Static local:ControllerButtonType.DPadRight}" Value="{StaticResource A_BitmapImage_ControllerButton_DPadRight_Large}"/>
        <local:MappingConverterEntry Key="{x:Static local:ControllerButtonType.Invalid}" Value="{StaticResource A_BitmapImage_ControllerButton_Unknown_Large}"/>
    </local:MappingConverter>

    <local:MappingConverter x:Key="A_Converter_DisplayButtonToTexture_KeyboardButton">
        <local:MappingConverterEntry Key="{x:Static local:ControllerButtonType.DPadUp}" Value="{StaticResource A_BitmapImage_KeyboardKey_ArrowUp}" />
        <local:MappingConverterEntry Key="{x:Static local:ControllerButtonType.DPadDown}" Value="{StaticResource A_BitmapImage_KeyboardKey_ArrowDown}" />
        <local:MappingConverterEntry Key="{x:Static local:ControllerButtonType.DPadLeft}" Value="{StaticResource A_BitmapImage_KeyboardKey_ArrowLeft}" />
        <local:MappingConverterEntry Key="{x:Static local:ControllerButtonType.DPadRight}" Value="{StaticResource A_BitmapImage_KeyboardKey_ArrowRight}" />
        <local:MappingConverterEntry Key="{x:Static local:ControllerButtonType.Invalid}" Value="{StaticResource A_BitmapImage_KeyboardKey_Unknown}" />
    </local:MappingConverter>

    <local:MappingConverter x:Key="A_Converter_DisplayButtonToTexture_KeyboardButton_Large">
        <local:MappingConverterEntry Key="{x:Static local:ControllerButtonType.DPadUp}" Value="{StaticResource A_BitmapImage_KeyboardKey_ArrowUp_Large}" />
        <local:MappingConverterEntry Key="{x:Static local:ControllerButtonType.DPadDown}" Value="{StaticResource A_BitmapImage_KeyboardKey_ArrowDown_Large}" />
        <local:MappingConverterEntry Key="{x:Static local:ControllerButtonType.DPadLeft}" Value="{StaticResource A_BitmapImage_KeyboardKey_ArrowLeft_Large}" />
        <local:MappingConverterEntry Key="{x:Static local:ControllerButtonType.DPadRight}" Value="{StaticResource A_BitmapImage_KeyboardKey_ArrowRight_Large}" />
        <local:MappingConverterEntry Key="{x:Static local:ControllerButtonType.Invalid}" Value="{StaticResource A_BitmapImage_KeyboardKey_Unknown_Large}" />
    </local:MappingConverter>

    <Style x:Key="A_Style_ControllerButtonControl_ControllerInputIcon"
           TargetType="local:FZMaterial"
           BasedOn="{StaticResource A_Style_FZMaterial_FlatPanel_Base}">
        <Setter Property="StretchDirection" Value="Both" />
        <Setter Property="Stretch" Value="Uniform" />
        <Setter Property="ImageSource" Value="{Binding DisplayButton, Converter={StaticResource A_Converter_DisplayButtonToTexture_ControllerButtonIcon}, RelativeSource={RelativeSource AncestorType=local:ControllerButtonControl}}" />
        <Style.Triggers>
            <DataTrigger Binding="{Binding Desaturate, RelativeSource={RelativeSource AncestorType=local:ControllerButtonControl}}" Value="True">
                <Setter Property="Preset" Value="{StaticResource A_FZMaterialPreset_AlphaOnly}"/>
            </DataTrigger>
            <DataTrigger Binding="{Binding UseLargeIcon, RelativeSource={RelativeSource AncestorType=local:ControllerButtonControl}}" Value="True">
                <Setter Property="ImageSource" Value="{Binding DisplayButton, Converter={StaticResource A_Converter_DisplayButtonToTexture_ControllerButtonIcon_Large}, RelativeSource={RelativeSource AncestorType=local:ControllerButtonControl}}" />
            </DataTrigger>
            <DataTrigger Binding="{Binding InputDeviceType, RelativeSource={RelativeSource AncestorType=local:ControllerButtonControl}}" Value="{x:Static local:XAMLInputDeviceType.RawGameController}">
                <Setter Property="ImageSource" Value="{Binding DisplayButton, Converter={StaticResource A_Converter_DisplayButtonToTexture_RawGameControllerButtonIcon}, RelativeSource={RelativeSource AncestorType=local:ControllerButtonControl}}" />
            </DataTrigger>
            <MultiDataTrigger>
                <MultiDataTrigger.Conditions>
                    <Condition Binding="{Binding InputDeviceType, RelativeSource={RelativeSource AncestorType=local:ControllerButtonControl}}" Value="{x:Static local:XAMLInputDeviceType.RawGameController}" />
                    <Condition Binding="{Binding UseLargeIcon, RelativeSource={RelativeSource AncestorType=local:ControllerButtonControl}}" Value="True" />
                </MultiDataTrigger.Conditions>
                <Setter Property="ImageSource" Value="{Binding DisplayButton, Converter={StaticResource A_Converter_DisplayButtonToTexture_RawGameControllerButtonIcon_Large}, RelativeSource={RelativeSource AncestorType=local:ControllerButtonControl}}" />
            </MultiDataTrigger>
        </Style.Triggers>
    </Style>

    <Style x:Key="A_Style_ControllerButtonControl_KeyboardInputIcon"
           TargetType="local:FZMaterial"
           BasedOn="{StaticResource A_Style_ControllerButtonControl_ControllerInputIcon}">
        <Setter Property="Width" Value="12" />
        <Setter Property="Height" Value="12" />
        <Setter Property="Color" Value="{StaticResource H_Color_Primary_Black}" />
        <Setter Property="ImageSource" Value="{Binding DisplayButton, Converter={StaticResource A_Converter_DisplayButtonToTexture_KeyboardButton}, RelativeSource={RelativeSource AncestorType=local:ControllerButtonControl}}" />
        <Style.Triggers>
            <DataTrigger Binding="{Binding UseLargeIcon, RelativeSource={RelativeSource AncestorType=local:ControllerButtonControl}}" Value="True">
                <Setter Property="ImageSource" Value="{Binding DisplayButton, Converter={StaticResource A_Converter_DisplayButtonToTexture_KeyboardButton_Large}, RelativeSource={RelativeSource AncestorType=local:ControllerButtonControl}}" />
            </DataTrigger>
        </Style.Triggers>
    </Style>

    <Style x:Key="A_Style_FZTextBlock_ButtonBarDescription"
           BasedOn="{StaticResource A_Style_FZTextBlock_HorizonD}"
           TargetType="{x:Type local:FZTextBlock}">
        <Setter Property="CapHeight" Value="15" />
        <Setter Property="VerticalAlignment" Value="Center" />
        <Setter Property="Stretch" Value="Uniform" />
        <Setter Property="StretchDirection" Value="DownOnly" />
        <Setter Property="Margin" Value="7,-10, 29, -10" />
        <Setter Property="Color" Value="{StaticResource H_Color_Primary_White}" />
        <Setter Property="Text" Value="{Binding Description, RelativeSource={RelativeSource TemplatedParent}}" />
        <Setter Property="Visibility" Value="{Binding Description, Converter={StaticResource A_StringVisConverter}, RelativeSource={RelativeSource AncestorType=ControllerButtonControl}}" />
        <Style.Triggers>
            <DataTrigger Binding="{Binding HideShadow, RelativeSource={RelativeSource TemplatedParent}, FallbackValue=True}" Value="False">
                <Setter Property="Effect" Value="{StaticResource A_DropShadowEffect_HelpBar}"/>
            </DataTrigger>
        </Style.Triggers>
    </Style>

    <CircleEase x:Key="A_EasingFunction_ControllerButtonControl_EaseInOut" EasingMode="EaseInOut"/>
    <Storyboard x:Key="A_Storyboard_ControllerButtonControl_Shine">
        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleX)" Storyboard.TargetName="BtnContainer" FillBehavior="Stop">
            <EasingDoubleKeyFrame KeyTime="0:0:0.0" Value="1"/>
            <EasingDoubleKeyFrame KeyTime="0:0:0.1" Value="1.2"/>
            <EasingDoubleKeyFrame KeyTime="0:0:1.3" Value="1"/>
        </DoubleAnimationUsingKeyFrames>
        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleY)" Storyboard.TargetName="BtnContainer" FillBehavior="Stop">
            <EasingDoubleKeyFrame KeyTime="0:0:0.0" Value="1"/>
            <EasingDoubleKeyFrame KeyTime="0:0:0.1" Value="1.2"/>
            <EasingDoubleKeyFrame KeyTime="0:0:1.3" Value="1"/>
        </DoubleAnimationUsingKeyFrames>
        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="Shine" FillBehavior="Stop">
            <DiscreteDoubleKeyFrame KeyTime="0:0:0.0" Value="0"/>
            <DiscreteDoubleKeyFrame KeyTime="0:0:0.1" Value="1"/>
            <DiscreteDoubleKeyFrame KeyTime="0:0:1.3" Value="1"/>
        </DoubleAnimationUsingKeyFrames>
        <SingleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Effect).(FadeInStart)" Storyboard.TargetName="Shine" FillBehavior="Stop">
            <EasingSingleKeyFrame KeyTime="0:0:0.0" Value="-0.25"/>
            <EasingSingleKeyFrame KeyTime="0:0:0.9" Value="1" EasingFunction="{StaticResource A_EasingFunction_ControllerButtonControl_EaseInOut}"/>
            <DiscreteSingleKeyFrame KeyTime="0:0:1.3" Value="1"/>
        </SingleAnimationUsingKeyFrames>
        <SingleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Effect).(FadeInEnd)" Storyboard.TargetName="Shine" FillBehavior="Stop">
            <EasingSingleKeyFrame KeyTime="0:0:0.0" Value="-0.14"/>
            <EasingSingleKeyFrame KeyTime="0:0:0.9" Value="1.11" EasingFunction="{StaticResource A_EasingFunction_ControllerButtonControl_EaseInOut}"/>
            <DiscreteSingleKeyFrame KeyTime="0:0:1.3" Value="1"/>
        </SingleAnimationUsingKeyFrames>
        <SingleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Effect).(FadeOutStart)" Storyboard.TargetName="Shine" FillBehavior="Stop">
            <EasingSingleKeyFrame KeyTime="0:0:0.0" Value="0"/>
            <EasingSingleKeyFrame KeyTime="0:0:0.9" Value="1.25" EasingFunction="{StaticResource A_EasingFunction_ControllerButtonControl_EaseInOut}"/>
            <DiscreteSingleKeyFrame KeyTime="0:0:1.3" Value="1"/>
        </SingleAnimationUsingKeyFrames>
        <SingleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Effect).(FadeOutEnd)" Storyboard.TargetName="Shine" FillBehavior="Stop">
            <EasingSingleKeyFrame KeyTime="0:0:0.0" Value="0.11"/>
            <EasingSingleKeyFrame KeyTime="0:0:0.9" Value="1.36" EasingFunction="{StaticResource A_EasingFunction_ControllerButtonControl_EaseInOut}"/>
            <DiscreteSingleKeyFrame KeyTime="0:0:1.3" Value="1"/>
        </SingleAnimationUsingKeyFrames>
    </Storyboard>

    <ControlTemplate x:Key="A_ControlTemplate_ControllerButtonControl_Controller"
                     TargetType="{x:Type local:ControllerButtonControl}">
        <StackPanel Orientation="Horizontal">
            <Grid MinHeight="25"
                  MinWidth="{Binding ActualHeight, RelativeSource={RelativeSource Self}}"
                  x:Name="BtnContainer"
                  RenderTransformOrigin="0.5,0.5">
                  <Grid.RenderTransform>
                    <ScaleTransform />
                  </Grid.RenderTransform>
                <local:FZTextBlock x:Name="DummyTextScaler"
                                   Text="{}H"
                                   VerticalAlignment="Center"
                                   Visibility="Hidden"
                                   Color="#00000000"
                                   Opacity="0"
                                   CapHeight="0"
                                   Stretch="None"
                                   VerifyTextSize="False">
                    <local:FZTextBlock.ResizableTextSettings>
                        <ResizableTextSettings
                            MinimumFontSize="0"
                            MinimumCapHeight="25"
                            MinimumBodyHeight="0"
                            MinimumXHeight="0"
                            ScaleMinimumSize="True"
                            ScaleOriginalSize="False"/>
                    </local:FZTextBlock.ResizableTextSettings>
                </local:FZTextBlock>
                <local:FZMaterial x:Name="DropShadow"
                                  Style="{StaticResource A_Style_ControllerButtonControl_ControllerInputIcon}"
                                  Margin="1,1,-1,-1"
                                  Preset="{StaticResource A_FZMaterialPreset_AlphaOnly}"
                                  Color="{StaticResource A_Color_DropShadow}"
                                  Visibility="{Binding HideShadow, Converter={StaticResource A_FZBooleanToVisibilityConverter_UseHidden_Inverse}, RelativeSource={RelativeSource AncestorType=local:ControllerButtonControl}}" />
                <local:FZMaterial x:Name="Icon"
                                  Style="{StaticResource A_Style_ControllerButtonControl_ControllerInputIcon}"/>
                <local:FZMaterial x:Name="Shine"
                                  Style="{StaticResource A_Style_ControllerButtonControl_ControllerInputIcon}"
                                  Opacity="0">
                    <local:FZMaterial.Preset>
                        <FZMaterialPresetAlphaOnly AlphaMode="Additive"/>
                    </local:FZMaterial.Preset>
                    <local:FZMaterial.Effect>
                        <local:TextureMaskEffect>
                            <local:TextureMaskEffect.Mask>
                                <ImageBrush ImageSource="/ForzaUI;component/Textures/Anthem/TextureMaskGradients/Diagonal_Gradient.png" />
                            </local:TextureMaskEffect.Mask>
                        </local:TextureMaskEffect>
                    </local:FZMaterial.Effect>
                </local:FZMaterial>

                <Decorator Width="0" Height="0" VerticalAlignment="Center" HorizontalAlignment="Center">
                    <Decorator RenderTransformOrigin="0.5,0.5"
                        HorizontalAlignment="Center" VerticalAlignment="Center"
                        Visibility="{Binding RawControllerForegroundText, RelativeSource={RelativeSource AncestorType=local:ControllerButtonControl}, Converter={StaticResource A_StringVisConverter}}" Height="{Binding ActualHeight, ElementName=Icon}" Width="{Binding ActualWidth, ElementName=Icon}">
                        <Decorator.RenderTransform>
                            <ScaleTransform ScaleX="0.6" ScaleY="0.6"/>
                        </Decorator.RenderTransform>
                        <Viewbox Stretch="Uniform">
                            <Decorator Width="200" Height="200">
                                <Decorator Height="200"
                                    Width="220"
                                    VerticalAlignment="Center"
                                    HorizontalAlignment="Center">
                                    <local:FZTextBlock Text="{Binding RawControllerForegroundText, RelativeSource={RelativeSource AncestorType=local:ControllerButtonControl}}"
                                        Style="{StaticResource A_Style_FZTextBlock_HorizonA}"
                                        Color="{StaticResource H_Color_Primary_Black}"
                                        CapHeight="200"
                                        Stretch="Uniform"
                                        VerticalAlignment="Center"
                                        HorizontalAlignment="Center"
                                        TextAlignment="Center" >
                                    </local:FZTextBlock>
                                </Decorator>
                            </Decorator>
                        </Viewbox>
                    </Decorator>
                </Decorator>
            </Grid>

            <local:FZTextBlock x:Name="DescriptionText"
                               Style="{StaticResource A_Style_FZTextBlock_ButtonBarDescription}"/>
            <EventFire.FzTriggers>
                <BeginStoryboard EventFireTrigger.Event="Shine" Storyboard="{StaticResource A_Storyboard_ControllerButtonControl_Shine}"/>
            </EventFire.FzTriggers>
        </StackPanel>
    </ControlTemplate>

    <Double x:Key="A_Double_One">1</Double>
    <Double x:Key="A_Double_Invert">-1</Double>
    <Thickness x:Key="A_Thickness_KeyboardButtonBorder">3</Thickness>
    <Style x:Key="A_Style_FZMaterial_KeyboardButtonBorder" TargetType="local:FZMaterial">
        <Setter Property="Color" Value="{StaticResource H_Color_Primary_White}" />
        <Setter Property="Margin" Value="{Convert {StaticResource A_Thickness_KeyboardButtonBorder}, Converter={MathOperationConverter Operation=Multiply}, Parameter={StaticResource A_Double_Invert}}"/>
        <Setter Property="Visibility" Value="Hidden"/>
        <Setter Property="Preset">
            <Setter.Value>
                <FZMaterialPresetRoundtangleStroke Thickness="{Convert {StaticResource A_Thickness_KeyboardButtonBorder}, Converter={MathOperationConverter Operation=Add}, Parameter={StaticResource A_Double_One}}"
                                                   CornerRadius="{Convert {StaticResource A_CornerRadius_KeyboardButtonBarBackground_All}, Converter={MathOperationConverter Operation=Add}, Parameter={StaticResource A_Thickness_KeyboardButtonBorder}}"/>
            </Setter.Value>
        </Setter>
        <Style.Triggers>
            <MultiDataTrigger>
                <MultiDataTrigger.Conditions>
                    <Condition Binding="{Binding IsEnabled, RelativeSource={RelativeSource Self}}" Value="True" />
                    <Condition Binding="{Binding IsMouseOver, RelativeSource={RelativeSource AncestorType=local:ControllerButtonControl}}" Value="True"/>
                </MultiDataTrigger.Conditions>
                <Setter Property="Visibility" Value="Visible" />
        </MultiDataTrigger>
        </Style.Triggers>
    </Style>

    <ControlTemplate x:Key="A_ControlTemplate_ControllerButtonControl_Keyboard"
                     TargetType="{x:Type local:ControllerButtonControl}">
        <ControlTemplate.Resources>
            <Style x:Key="A_Style_FZTextBlock_ButtonBarDescription_Dynamic"
                           BasedOn="{StaticResource A_Style_FZTextBlock_ButtonBarDescription}"
                           TargetType="{x:Type local:FZTextBlock}">
                <Setter Property="Margin" Value="7,-10" />
            </Style>
        </ControlTemplate.Resources>
        <Grid x:Name="Container" Margin="0,0,20,0">
            <local:FZMaterial x:Name="MouseRolloverStroke"
                              Style="{StaticResource A_Style_FZMaterial_KeyboardButtonBorder}"
                              IsEnabled="{Binding AllowMouseClick, RelativeSource={RelativeSource AncestorType=ControllerButtonControl}}"/>
            <local:FZMaterial x:Name="Background"
                              Style="{StaticResource A_Style_ControllerButton_Background}"
                              Preset="{StaticResource A_FZMaterialPresetGlassRoundtangle_GlassPanel_KeyboardButtonBackground}"/>
            <DockPanel x:Name="Contents"
                       Margin="5,10">
                <Grid DockPanel.Dock="Left"
                      MinHeight="25"
                      MinWidth="{Binding ActualHeight, RelativeSource={RelativeSource Self}}"
                      VerticalAlignment="Center"
                      RenderTransformOrigin="0.5,0.5"
                      x:Name="BtnContainer">
                      <Grid.RenderTransform>
                        <ScaleTransform />
                      </Grid.RenderTransform>
                    <local:FZMaterial x:Name="OutlineShadow"
                                      Preset="{StaticResource A_FZMaterialPresetRoundtangleStroke_FlatPanel_Thin_Inner_All}"
                                      Color="{StaticResource A_Color_DropShadow}"
                                      Margin="1,1,-1,-1"
                                      VerticalAlignment="Center"/>
                    <local:FZMaterial Color="{StaticResource H_Color_Primary_White}"
                                      Preset="{StaticResource A_FZMaterialPresetRoundtangle_FlatPanel_InnerAll}" VerticalAlignment="Center">
                        <Grid>
                            <local:FZMaterial Preset="{StaticResource A_FZMaterialPresetRoundtangleStroke_FlatPanel_Medium_Inner_All}"
                                              Color="{StaticResource H_Color_Primary_Black}" Margin="-0.5"/>
                            <Grid Margin="5,5">
                                <local:FZTextBlock x:Name="KeyText"
                                                   Text="{Binding KeyboardKeyText, RelativeSource={RelativeSource AncestorType=local:ControllerButtonControl}}"
                                                   Visibility="{Binding KeyboardKeyText, RelativeSource={RelativeSource AncestorType=local:ControllerButtonControl}, Converter={StaticResource A_StringVisConverter}}"
                                                   Style="{StaticResource A_Style_FZTextBlock_HorizonC}"
                                                   Color="{StaticResource H_Color_Primary_Black}"
                                                   HorizontalAlignment="Center"
                                                   VerticalAlignment="Center">
                                </local:FZTextBlock>
                                <Grid Visibility="{Binding KeyboardKeyText, RelativeSource={RelativeSource AncestorType=local:ControllerButtonControl}, Converter={StaticResource A_StringVisConverter_Inverse}}">
                                    <local:FZMaterial x:Name="KeyIconShadow"
                                                      Style="{StaticResource A_Style_ControllerButtonControl_KeyboardInputIcon}"
                                                      Color="{StaticResource A_Color_DropShadow}"
                                                      Margin="2,2,0,0"/>
                                    <local:FZMaterial x:Name="KeyIcon"
                                                      Style="{StaticResource A_Style_ControllerButtonControl_KeyboardInputIcon}" />
                                </Grid>
                            </Grid>
                            <local:FZMaterial x:Name="Shine" Margin="-0.5" Opacity="0">
                                <local:FZMaterial.Preset>
                                    <FZMaterialPresetRoundtangle BasedOn="{StaticResource A_FZMaterialPresetRoundtangle_FlatPanel_InnerAll}" AlphaMode="Additive"/>
                                </local:FZMaterial.Preset>
                                <local:FZMaterial.Effect>
                                    <local:TextureMaskEffect>
                                        <local:TextureMaskEffect.Mask>
                                            <ImageBrush ImageSource="/ForzaUI;component/Textures/Anthem/TextureMaskGradients/Diagonal_Gradient.png" />
                                        </local:TextureMaskEffect.Mask>
                                    </local:TextureMaskEffect>
                                </local:FZMaterial.Effect>
                            </local:FZMaterial>
                        </Grid>
                    </local:FZMaterial>
                </Grid>
                <local:FZTextBlock x:Name="DescriptionText"
                                   Style="{DynamicResource A_Style_FZTextBlock_ButtonBarDescription_Dynamic}" />
            </DockPanel>
            <EventFire.FzTriggers>
                <BeginStoryboard EventFireTrigger.Event="Shine" Storyboard="{StaticResource A_Storyboard_ControllerButtonControl_Shine}"/>
            </EventFire.FzTriggers>
        </Grid>
        <ControlTemplate.Triggers>
            <Trigger Property="IsValid" Value="False">
                <Setter TargetName="KeyIconShadow" Property="Visibility" Value="Collapsed"/>
                <Setter TargetName="KeyIcon" Property="Margin" Value="-5"/>
                <Setter TargetName="KeyIcon" Property="Height" Value="24"/>
                <Setter TargetName="KeyIcon" Property="Width" Value="24"/>
            </Trigger>
            <Trigger Property="Visibility" SourceName="DescriptionText" LogicalOp="NotEquals" Value="Visible">
                <Setter TargetName="Container"
                        Property="Margin"
                        Value="0,0,0,0" />
            </Trigger>
            <DataTrigger Binding="{Binding HideBackground, RelativeSource={RelativeSource Self}}" Value="True">
                <Setter TargetName="Contents"
                        Property="Margin"
                        Value="0" />
                <Setter TargetName="Container"
                        Property="Margin"
                        Value="0" />
                <Setter TargetName="Background"
                        Property="Visibility"
                        Value="Collapsed" />
            </DataTrigger>
            <DataTrigger Binding="{Binding HideShadow, RelativeSource={RelativeSource Self}}"
                         Value="True">
                <Setter TargetName="OutlineShadow"
                        Property="Visibility"
                        Value="Hidden"/>
                <Setter TargetName="KeyIconShadow"
                        Property="Visibility"
                        Value="Hidden"/>
                <Setter TargetName="KeyText"
                        Property="Effect"
                        Value="{x:Null}"/>
            </DataTrigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>

    <Style x:Key="A_Style_ControllerButtonControl_Default"
           TargetType="{x:Type local:ControllerButtonControl}">
        <Setter Property="Focusable"
                Value="False" />
        <Setter Property="Reusable"
                Value="False" />
        <Setter Property="MinHeight"
                Value="25" />
        <Setter Property="VerticalAlignment"
                Value="Center" />
        <Setter Property="HideShadow"
                Value="True"/>
        <Setter Property="Template"
                Value="{StaticResource A_ControlTemplate_ControllerButtonControl_Controller}" />
        <Setter Property="Visibility"
                Value="{Binding Description, RelativeSource={RelativeSource Self}, Converter={StaticResource A_StringVisConverter}}" />
        <Setter Property="local:MultiStringFormatter.Format" Value="{local:Loc Main.IDS_ScreenReader_Format_ButtonControl_NameAndDescription}"/>
        <Setter Property="local:MultiStringFormatter.Param0" Value="{Binding ScreenReaderName, RelativeSource={RelativeSource Self}}"/>
        <Setter Property="local:MultiStringFormatter.Param1" Value="{Binding Description, RelativeSource={RelativeSource Self}}"/>
        <Style.Triggers>
            <Trigger Property="InputDeviceType"
                     Value="{Static XAMLInputDeviceType.KeyboardAndMouse}">
                <Setter Property="Template"
                        Value="{StaticResource A_ControlTemplate_ControllerButtonControl_Keyboard}" />
            </Trigger>
            <DataTrigger Binding="{Binding ScreenReaderName, RelativeSource={RelativeSource Self}, Converter={StaticResource A_StringVisConverter}}" Value="{x:Static Visibility.Collapsed}">
                <Setter Property="local:MultiStringFormatter.Format" Value="{local:Loc Main.IDS_ScreenReader_Format_ButtonControl_DescriptionOnly}"/>
            </DataTrigger>
            <DataTrigger Binding="{Binding Description, RelativeSource={RelativeSource Self}, Converter={StaticResource A_StringVisConverter}}" Value="{x:Static Visibility.Collapsed}">
                <Setter Property="local:MultiStringFormatter.Format" Value="{local:Loc Main.IDS_ScreenReader_Format_ButtonControl_NameOnly}"/>
            </DataTrigger>
            <MultiDataTrigger>
                <MultiDataTrigger.Conditions>
                    <Condition Binding="{Binding IsValid, RelativeSource={RelativeSource Self}}" Value="True"/>
                    <Condition Binding="{Binding Visibility, RelativeSource={RelativeSource Self}}" Value="{x:Static Visibility.Visible}"/>
                    <Condition Binding="{Binding Command.Enabled, RelativeSource={RelativeSource Self}}" Value="false" />
                </MultiDataTrigger.Conditions>
                <Setter Property="Opacity" Value="0.5"/>
            </MultiDataTrigger>
            <MultiDataTrigger>
                <MultiDataTrigger.Conditions>
                    <Condition Binding="{Binding IsValid, RelativeSource={RelativeSource Self}}" Value="True"/>
                    <Condition Binding="{Binding Visibility, RelativeSource={RelativeSource Self}}" Value="{x:Static Visibility.Visible}"/>
                </MultiDataTrigger.Conditions>
                <Setter Property="local:ControllerButtonPanel.ScreenReaderText" Value="{Binding (local:MultiStringFormatter.Output), RelativeSource={RelativeSource Self}}"/>
            </MultiDataTrigger>
        </Style.Triggers>
    </Style>

    <Style x:Key="A_Style_ControllerButtonControl_Standalone"
           TargetType="{x:Type local:ControllerButtonControl}"
           BasedOn="{StaticResource A_Style_ControllerButtonControl_Default}">
        <Setter Property="Visibility"
                Value="Visible" />
        <Setter Property="MinHeight"
                Value="25" />
        <Setter Property="HideShadow"
                Value="False"/>
        <Setter Property="HideBackground"
                Value="True"/>
    </Style>

    <Style x:Key="A_Style_ControllerButtonControl_ActivationButton"
           BasedOn="{StaticResource A_Style_ControllerButtonControl_Standalone}"
           TargetType="local:ControllerButtonControl">
        <Setter Property="InputOverride"
                Value="{local:Input Command=INPUTCMD_ACTIVATE, Context=INPUTCONTEXT_RACING}" />
        <Setter Property="HideBackground" Value="True"/>
        <Setter Property="AllowMouseClick"
                Value="False" />
        <Setter Property="HideShadow"
                Value="True" />
    </Style>

    <Style TargetType="{x:Type local:ControllerButtonControl}"
           BasedOn="{StaticResource A_Style_ControllerButtonControl_Default}">
    </Style>

    <Style x:Key="A_Style_ControllerButtonPanel_Default" TargetType="local:ControllerButtonPanel">
        <Setter Property="Canvas.Bottom" Value="0" />
        <Setter Property="Canvas.Left" Value="0" />
        <Setter Property="Layout" Value="RightToLeft" />
        <Setter Property="HorizontalAlignment" Value="Left" />
        <Setter Property="Margin" Value="0,0,0,0" />
        <Setter Property="Background" Value="{x:Null}" />
        <Setter Property="local:ScreenReader.Line" Value="{Binding ChildScreenReaderTexts, RelativeSource={RelativeSource Self}}" />
        <Setter Property="local:ScreenReader.Event" Value="OnChange" />
        <Setter Property="local:ScreenReader.LineType" Value="ButtonBar" />
    </Style>

    <Style TargetType="{x:Type local:ControllerButtonPanel}"
           BasedOn="{StaticResource A_Style_ControllerButtonPanel_Default}" >
    </Style>

    <Style x:Key="A_Style_PlayerAdornmentControl_Default"
           TargetType="{x:Type PlayerAdornmentControl}">
        <Setter
            Property="Focusable"
            Value="False" />
        <Setter
            Property="Height"
            Value="25" />
        <Setter
            Property="Width"
            Value="30" />
        <Setter
            Property="Visibility"
            Value="{Binding BadgeImageSource, RelativeSource={RelativeSource Self}, Converter={StaticResource A_FZBooleanToVisibilityConverter}}" />
        <Setter
            Property="Template">
            <Setter.Value>
                <ControlTemplate
                    TargetType="Control">
                    <Grid>
                        <local:FZMaterial ImageSource="{Binding BadgeImageSource, RelativeSource={RelativeSource AncestorType=local:PlayerAdornmentControl}}" 
                                          Visibility="{Binding Downloaded, RelativeSource={RelativeSource Self}, Converter={StaticResource A_FZBooleanToVisibilityConverter}}"/>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="A_Style_PlayerAdornmentControl_CarLabel"
           TargetType="{x:Type PlayerAdornmentControl}">
        <Setter
            Property="Focusable"
            Value="False" />
        <Setter
            Property="Height"
            Value="70" />
        <Setter
            Property="Width"
            Value="84" />
        <Setter
            Property="Visibility"
            Value="{Binding BadgeImageSource, RelativeSource={RelativeSource Self}, Converter={StaticResource A_FZBooleanToVisibilityConverter}}" />
        <Setter
            Property="Template">
            <Setter.Value>
                <ControlTemplate
                    TargetType="Control">
                    <Grid>
                        <local:FZMaterial ImageSource="{Binding BadgeImageSource, RelativeSource={RelativeSource AncestorType=local:PlayerAdornmentControl}}" 
                                          Visibility="{Binding Downloaded, RelativeSource={RelativeSource Self}, Converter={StaticResource A_FZBooleanToVisibilityConverter}}">
                            <local:FZMaterial.Preset>
                                <local:FZMaterialPreset DepthTest="{Binding IsLightweightLabelFeatureEnabled, Converter={StaticResource A_Converter_Boolean_Invert}}" />
                            </local:FZMaterial.Preset>
                        </local:FZMaterial>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style TargetType="{x:Type local:PlayerAdornmentControl}"
           BasedOn="{StaticResource A_Style_PlayerAdornmentControl_Default}">
    </Style>

    <BadgeIdToPathConverter x:Key="BadgeIdToPathConverter"/>

    <Style x:Key="H_Style_FZMaterial_Adornment_Default" TargetType="{x:Type FZMaterial}">
        <Setter
            Property="Focusable"
            Value="False" />
        <Setter
            Property="Height"
            Value="25" />
        <Setter
            Property="Width"
            Value="30" />
        <Setter
            Property="ImageSource"
            Value="{Binding Tag, RelativeSource={RelativeSource Self}, Converter={StaticResource BadgeIdToPathConverter}}"/>
        <Setter
            Property="Visibility"
            Value="{Binding ImageSource, RelativeSource={RelativeSource Self}, Converter={StaticResource A_FZBooleanToVisibilityConverter}}" />
        <Style.Triggers>
            <DataTrigger Binding="{Binding Downloaded, RelativeSource={RelativeSource Self}}" Value="False">
                <Setter
                    Property="Visibility"
                    Value="Collapsed" />
            </DataTrigger>
        </Style.Triggers>
    </Style>

    <CornerRadius x:Key="A_CornerRadius_RoundtangleSheen_Default">0</CornerRadius>

    <ControlTemplate x:Key="A_ControlTemplate_RoundtangleSheenWrapper" TargetType="{Type ContentControl}">
        <ControlTemplate.Resources>
            
            <CircleEase x:Key="A_EasingFunction_EaseInOut" EasingMode="EaseInOut"/>
            <Storyboard x:Key="A_Storyboard_Shine">
                <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="Shine" FillBehavior="Stop">
                    <DiscreteDoubleKeyFrame KeyTime="0:0:0.0" Value="0"/>
                    <DiscreteDoubleKeyFrame KeyTime="0:0:0.1" Value="1"/>
                    <DiscreteDoubleKeyFrame KeyTime="0:0:1.3" Value="1"/>
                </DoubleAnimationUsingKeyFrames>
                <SingleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Effect).(FadeInStart)" Storyboard.TargetName="Shine" FillBehavior="Stop">
                    <EasingSingleKeyFrame KeyTime="0:0:0.0" Value="-0.25"/>
                    <EasingSingleKeyFrame KeyTime="0:0:0.9" Value="1" EasingFunction="{StaticResource A_EasingFunction_EaseInOut}"/>
                    <DiscreteSingleKeyFrame KeyTime="0:0:1.3" Value="1"/>
                </SingleAnimationUsingKeyFrames>
                <SingleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Effect).(FadeInEnd)" Storyboard.TargetName="Shine" FillBehavior="Stop">
                    <EasingSingleKeyFrame KeyTime="0:0:0.0" Value="-0.14"/>
                    <EasingSingleKeyFrame KeyTime="0:0:0.9" Value="1.11" EasingFunction="{StaticResource A_EasingFunction_EaseInOut}"/>
                    <DiscreteSingleKeyFrame KeyTime="0:0:1.3" Value="1"/>
                </SingleAnimationUsingKeyFrames>
                <SingleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Effect).(FadeOutStart)" Storyboard.TargetName="Shine" FillBehavior="Stop">
                    <EasingSingleKeyFrame KeyTime="0:0:0.0" Value="0"/>
                    <EasingSingleKeyFrame KeyTime="0:0:0.9" Value="1.25" EasingFunction="{StaticResource A_EasingFunction_EaseInOut}"/>
                    <DiscreteSingleKeyFrame KeyTime="0:0:1.3" Value="1"/>
                </SingleAnimationUsingKeyFrames>
                <SingleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Effect).(FadeOutEnd)" Storyboard.TargetName="Shine" FillBehavior="Stop">
                    <EasingSingleKeyFrame KeyTime="0:0:0.0" Value="0.11"/>
                    <EasingSingleKeyFrame KeyTime="0:0:0.9" Value="1.36" EasingFunction="{StaticResource A_EasingFunction_EaseInOut}"/>
                    <DiscreteSingleKeyFrame KeyTime="0:0:1.3" Value="1"/>
                </SingleAnimationUsingKeyFrames>
            </Storyboard>
        </ControlTemplate.Resources>
        <Grid>
            <ContentPresenter/>
            <FZMaterial x:Name="Shine" Opacity="0">
                <FZMaterial.Preset>
                    <FZMaterialPresetRoundtangle CornerRadius="{Binding (BindingProxy.A), RelativeSource={RelativeSource TemplatedParent}, FallbackValue={StaticResource A_CornerRadius_RoundtangleSheen_Default}}" AlphaMode="Additive"/>
                </FZMaterial.Preset>
                <FZMaterial.Effect>
                    <TextureMaskEffect>
                        <TextureMaskEffect.Mask>
                            <ImageBrush ImageSource="/ForzaUI;component/Textures/Anthem/TextureMaskGradients/Diagonal_Gradient.png" />
                        </TextureMaskEffect.Mask>
                    </TextureMaskEffect>
                </FZMaterial.Effect>
            </FZMaterial>
            <EventFire.FzTriggers>
                <BeginStoryboard EventFireTrigger.Event="Shine" Storyboard="{StaticResource A_Storyboard_Shine}"/>
            </EventFire.FzTriggers>
        </Grid>
    </ControlTemplate>

    <Style x:Key="A_Style_ContentControl_RoundtangleSheenWrapper" TargetType="{Type ContentControl}">
        <Setter Property="BindingProxy.A" Value="{StaticResource A_CornerRadius_RoundtangleSheen_Default}"/>
        <Setter Property="VerticalAlignment" Value="Center"/>
        <Setter Property="HorizontalAlignment" Value="Center"/>
        <Setter Property="Template" Value="{StaticResource A_ControlTemplate_RoundtangleSheenWrapper}"/>
    </Style>
</ResourceDictionary>