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

    <System:Double x:Key="A_Double_LoadingSpinner_Height">59</System:Double>
    <System:Double x:Key="A_Double_LoadingSpinner_Height_Neg">-59</System:Double>

    <Style x:Key="A_Style_BlankVisualStyle" />

    <!-- Styles -->
    <Style x:Key="A_Style_Control_ScreenBackground"
        TargetType="{x:Type Control}">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="Control">
                    <Grid>
                        <local:FZMaterial Style="{StaticResource A_Style_FZMaterial_Glass_ScreenBackground}"/>
                        <local:FZMaterialGlassCapture />
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="A_Style_Control_ScreenBackground_WhitespaceTintOnly"
        TargetType="{x:Type Control}">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="Control">
                    <Grid>
                        <local:FZMaterial Style="{StaticResource A_Style_FZMaterial_ScreenBackground_WhitespaceTintOnly}"/>
                        <local:FZMaterialGlassCapture />
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="A_Style_FZTextBlock_ScreenTitleBlockText" TargetType="local:FZTextBlock" BasedOn="{StaticResource A_Style_FZTextBlock_Title}">
        <Setter Property="Color" Value="{StaticResource A_Color_ScreenTitle_Text}" />
        <Setter Property="FontSize"
                Value="46" />
        <Setter Property="TrackingAdjust" Value="0.02" />
    </Style>

    <Style x:Key="A_Style_FZTextBlock_TitleBlock_Event"
                   BasedOn="{StaticResource A_Style_FZTextBlock_ScreenTitleBlockText}"
                   TargetType="local:FZTextBlock">
        <Setter Property="Color" Value="{StaticResource A_Color_Header_Text}" />
        <Setter Property="TrackingAdjust" Value="0" />
    </Style>

    <Style x:Key="A_Style_FZTextBlock_TitleBlock_CurrentEvent"
                   BasedOn="{StaticResource A_Style_FZTextBlock_ScreenTitleBlockText}"
                   TargetType="local:FZTextBlock">
        <Setter Property="Color" Value="{StaticResource A_Color_Tile_LiveText}" />
    </Style>

    <Style x:Key="A_Style_FZTextBlock_TitleBlock_OfTotalEvents"
                   TargetType="local:FZTextBlock"
                   BasedOn="{StaticResource A_Style_FZTextBlock_ScreenTitleBlockText}">
        <Setter Property="Color" Value="{StaticResource A_Color_ScreenTitle_Text}"/>
    </Style>

    <Style x:Key="A_Style_FZMaterial_ShadowBase"
           TargetType="{x:Type local:FZMaterial}">
        <Setter Property="RenderTransformOrigin"
                Value="0.5,0.5" />
        <Setter Property="IsHitTestVisible"
                Value="False" />
        <Setter Property="Preset">
            <Setter.Value>
                <local:FZMaterialPresetSelfShadow Softness="30" />
            </Setter.Value>
        </Setter>
        <Setter Property="Margin"
                Value="-10,-10,-10,-10" />
        <Setter Property="Color"
                Value="{StaticResource A_Color_UISelfShadow}" />
    </Style>

    <Style x:Key="A_Style_FZMaterial_ShadowBase_ForSubgraph"
           TargetType="{x:Type local:FZMaterial}">
        <Setter Property="RenderTransformOrigin"
                Value="0.5,0.5" />
        <Setter Property="IsHitTestVisible"
                Value="False" />
        <Setter Property="Preset">
            <Setter.Value>
                <local:FZMaterialPresetRoundtangle Softness="30" CornerRadius="20" AlphaMode="MultiplyInvColorOnly" Unlit="True" />
            </Setter.Value>
        </Setter>
        <Setter Property="Margin"
                Value="-16,-16,-16,-16" />
        <Setter Property="Color"
                Value="{StaticResource A_Color_UISelfShadow_ForSubgraph}" />
    </Style>
    
    <Thickness x:Key="A_Thickness_ShadowMargin_Dynamic">-25,-25,-25,-25</Thickness>
    
    <Style x:Key="A_Style_FZMaterial_ShadowBase_Dynamic"
           TargetType="{x:Type local:FZMaterial}"
           BasedOn="{StaticResource A_Style_FZMaterial_ShadowBase}">
        <Setter Property="Preset">
            <Setter.Value>
                <local:FZMaterialPresetSelfShadow Softness="20" CornerRadius="25" />
            </Setter.Value>
        </Setter>
        <Setter Property="Margin"
                Value="{DynamicResource A_Thickness_ShadowMargin_Dynamic}" />
        <Setter Property="Color"
                Value="{StaticResource A_Color_UISelfShadow_ForSubgraph}" />
    </Style>
    
    <!-- Use this for custom content panels -->
    <Style x:Key="A_Style_ContentControl_Header_Custom" TargetType="ContentControl">
        <Setter Property="HorizontalContentAlignment" Value="Center" />
        <Setter Property="VerticalContentAlignment" Value="Center" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="ContentControl">
                    <local:FZMaterial Style="{StaticResource A_Style_FZMaterial_FlatPanel_HeaderPanel}" >
                        <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                            VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
                    </local:FZMaterial>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!-- Use this for single text-only header panels -->
    <Style x:Key="A_Style_ContentControl_Header" TargetType="ContentControl">
        <Setter Property="Height" Value="72" />
        <Setter Property="HorizontalContentAlignment" Value="Center" />
        <Setter Property="VerticalContentAlignment" Value="Center" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="ContentControl">
                    <ContentControl Style="{StaticResource A_Style_ContentControl_Header_Custom}"
                        HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
                        VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}">
                        <local:FZTextBlock Style="{StaticResource A_Style_FZTextBlock_HeaderBlock}" Text="{TemplateBinding Content, Converter={StaticResource A_StringToUpper}}" />
                    </ContentControl>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="A_Style_StackPanel_DescriptionBlock" TargetType="StackPanel" BasedOn="{StaticResource A_Style_FrameworkElement_DefaultTransition}">
        <Setter Property="Canvas.Bottom" Value="254" />
        <Setter Property="Width" Value="436" />
        <Setter Property="Orientation" Value="Vertical" />
    </Style>

    <Style x:Key="A_Style_FZTextBlock_IconBarText"
       TargetType="local:FZTextBlock" BasedOn="{StaticResource A_Style_FZTextBlock_HorizonA}">
        <Setter Property="CapHeight"
                Value="30" />
        <Setter Property="Color"
                Value="{StaticResource A_Color_CarDetails_Text}" />
        <Setter Property="HorizontalAlignment"
                Value="Center" />
        <Setter Property="VerticalAlignment"
                Value="Center" />
        <Setter Property="Margin"
                Value="18,18" />
    </Style>
    
    <Style x:Key="A_Style_IconValueBar" TargetType="Control">
        <Style.Resources>
            <!-- Text Block Style-->
            <Style x:Key="A_Style_FZTextBlock_IconValueBar" TargetType="local:FZTextBlock" BasedOn="{StaticResource A_Style_FZTextBlock_IconBarText}">
                <Setter Property="Text" Value="{Binding Tag, RelativeSource={RelativeSource TemplatedParent}}" />
            </Style>
            
            <!-- Icon Background -->
            <Style x:Key="A_Style_IconBackground" TargetType="local:FZMaterial" BasedOn="{StaticResource A_Style_FZMaterial_FlatPanel_Base}">
                <Setter Property="Color" Value="{StaticResource A_Color_CarDetails_Icon_Background}"/>
                <Setter Property="Preset" Value="{StaticResource A_FZMaterialPresetRoundtangle_FlatPanel_OuterLeftOnly}"/>
            </Style>
            
            <!--Icon Style-->
            <Style x:Key="A_Style_IconColor" TargetType="local:FZMaterial">
                <Setter Property="Color" Value="{StaticResource A_Color_CarDetails_IconColor}" />
                <Setter Property="ImageSourceNoPreload" Value="/ForzaUI;component/Textures/Anthem/Icons/Garage/Credits.png" />
            </Style>
        
        </Style.Resources>
      <Setter Property="Template">
        <Setter.Value>
          <ControlTemplate TargetType="Control">
            <StackPanel Margin="6,0,0,0" Orientation="Horizontal">
              <!--Icon-->
              <local:FZMaterial Style="{DynamicResource A_Style_IconBackground}">
                <local:FZMaterial Style="{DynamicResource A_Style_IconColor}"
                                  Width="64"
                                  Height="64"/>
              </local:FZMaterial>
              <!--TextBlock-->
                <local:FZMaterial   Preset="{StaticResource A_FZMaterialPresetRoundtangle_FlatPanel_OuterRightOnly}"
                                    Color="{StaticResource A_Color_Tile_Background}" Margin="-0.5,0,0,0">
                    <local:FZTextBlock Style="{DynamicResource A_Style_FZTextBlock_IconValueBar}"/>
                </local:FZMaterial>
            </StackPanel>
          </ControlTemplate>
        </Setter.Value>
      </Setter>
    </Style>

    <!-- Styles using Templates -->
    <Style x:Key="A_Style_ContentControl_ScreenTitleBlock" TargetType="ContentControl">
        <Setter Property="Focusable" Value="False" />
        <Setter Property="local:BindingProxy.A"
                Value="/ForzaUI;component/Textures/Anthem/Icons/Titles/GenericFallback.png" />
        <Setter Property="Height" Value="66"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="ContentControl">
                    <DockPanel local:ScreenReader.Line="{Binding Content, RelativeSource={RelativeSource TemplatedParent}}"
                               local:ScreenReader.Event="OnLoad"
                               local:ScreenReader.LineType="ScreenTitle">
                        <local:FZMaterial x:Name="ImageTile" 
                                          Width="66"
                                          DockPanel.Dock="Left" 
                                          Style="{StaticResource A_Style_FZMaterial_ScreenTitleBlockIcon}" >
                            <local:FZMaterial ImageSource="{Binding (local:BindingProxy.A), RelativeSource={RelativeSource TemplatedParent}}"/>
                        </local:FZMaterial>
                        <local:FZMaterial x:Name="TextBacking" 
                                          Style="{StaticResource A_Style_FZMaterial_ScreenTitleBlockBacking}">
                            <local:FZMaterial Style="{StaticResource A_Style_FZMaterial_TitleShadow}">
                                <local:FZTextBlock Style="{StaticResource A_Style_FZTextBlock_ScreenTitleBlockText}"
                                               Text="{TemplateBinding Content}"
                                               VerticalAlignment="Center"
                                               Margin="18,0,66,0" />
                            </local:FZMaterial>
                        </local:FZMaterial>
                    </DockPanel>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="Margin" Value="0,0,0,12" />
    </Style>

    <System:Double x:Key="A_Double_DividerSize_RibbonDivider">2</System:Double>

    <System:Double x:Key="A_Double_Size_TabMenuItemHeight">39</System:Double>
    <System:Double x:Key="A_Double_Size_TabMenuEndWidth">80</System:Double>
    <System:Double x:Key="A_Double_FontSize_TabMenu">24</System:Double>

    <Style x:Key="A_Style_FZMaterial_MouseRollOverVisual_Default"
           TargetType="local:FZMaterial">
        <Setter Property="Visibility"
                Value="Collapsed" />
        <Setter Property="Preset"
                Value="{StaticResource A_FZMaterialPresetRoundtangleStroke_Rollover_Outer_All}" />
    </Style>

    <Style x:Key="A_Style_FZMaterial_MouseRollOverVisual_Dynamic"
           BasedOn="{StaticResource A_Style_FZMaterial_MouseRollOverVisual_Default}"
           TargetType="local:FZMaterial" />

    <Style TargetType="{x:Type Control}"
           x:Key="A_Style_Control_MouseRollover">
        <Setter Property="Visibility"
                Value="Collapsed" />
        <Setter Property="IsHitTestVisible"
                Value="False" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Control}">
                    <local:FZMaterial Preset="{StaticResource A_FZMaterialPresetRoundtangleStroke_Rollover}"/>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="A_Style_Control_MouseRollover_Outer_All"
           TargetType="{x:Type Control}">
        <Setter Property="local:BindingProxy.A">
            <Setter.Value>
                <System:Boolean>False</System:Boolean>
            </Setter.Value>
        </Setter>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Control}">
                    <Grid>
                        <local:FZMaterial x:Name="Visual"
                                          Style="{DynamicResource A_Style_FZMaterial_MouseRollOverVisual_Dynamic}"
                                          Visibility="Collapsed" />
                        <local:FZMaterial Color="#00000000"
                                          x:Name="HitTestHelper"/>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <DataTrigger Binding="{Binding (local:BindingProxy.A), RelativeSource={RelativeSource Self}}">
                            <DataTrigger.Value>
                                <System:Boolean>True</System:Boolean>
                            </DataTrigger.Value>
                            <Setter TargetName="Visual"
                                    Property="Visibility"
                                    Value="Visible" />
                        </DataTrigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style TargetType="{x:Type Control}"
           BasedOn="{StaticResource A_Style_Control_MouseRollover_Outer_All}"
           x:Key="A_Style_Control_MouseRollover_Outer_Left">
        <Style.Resources>
            <Style x:Key="A_Style_FZMaterial_MouseRollOverVisual_Dynamic"
                   BasedOn="{StaticResource A_Style_FZMaterial_MouseRollOverVisual_Default}"
                   TargetType="{x:Type local:FZMaterial}">
                <Setter Property="Preset"
                        Value="{StaticResource A_FZMaterialPresetRoundtangleStroke_Rollover_Outer_Left}" />
            </Style>
        </Style.Resources>
    </Style>

    <Style TargetType="{x:Type Control}"
           BasedOn="{StaticResource A_Style_Control_MouseRollover_Outer_All}"
           x:Key="A_Style_Control_MouseRollover_Outer_Right">
        <Style.Resources>
            <Style x:Key="A_Style_FZMaterial_MouseRollOverVisual_Dynamic"
                   BasedOn="{StaticResource A_Style_FZMaterial_MouseRollOverVisual_Default}"
                   TargetType="{x:Type local:FZMaterial}">
                <Setter Property="Preset"
                        Value="{StaticResource A_FZMaterialPresetRoundtangleStroke_Rollover_Outer_Right}" />
            </Style>
        </Style.Resources>
    </Style>

    <Style TargetType="local:FZMaterial"
           x:Key="A_Style_FZMaterial_TabBar_ScrollPageArrow">
        <Setter Property="HorizontalAlignment"
                Value="Center" />
        <Setter Property="VerticalAlignment"
                Value="Center" />
        <Setter Property="Width"
                Value="21" />
        <Setter Property="Height"
                Value="23" />
        <Setter Property="Color"
                Value="#FF000000" />
        <Style.Triggers>
            <DataTrigger Binding="{Binding IsPressed, RelativeSource={RelativeSource AncestorType=Button}}"
                         Value="True">
                <Setter Property="Color"
                        Value="{StaticResource A_Color_Acrylic_Highlight}" />
            </DataTrigger>
            <MultiDataTrigger>
                <MultiDataTrigger.Conditions>
                    <Condition Binding="{Binding IsEnabled, RelativeSource={RelativeSource AncestorType=Button}}"
                               Value="False" />
                    <Condition Binding="{Binding IsControllerActiveInput, RelativeSource={RelativeSource AncestorType=Page}}"
                               Value="False" />
                </MultiDataTrigger.Conditions>
                <Setter Property="Opacity"
                        Value="0.25" />
            </MultiDataTrigger>
        </Style.Triggers>
    </Style>

    <Style x:Key="A_Style_Button_TabTitleLB" TargetType="{x:Type local:FZButton}">
        <Setter Property="MinWidth" Value="{StaticResource A_Double_Size_TabMenuEndWidth}" />
        <Setter Property="OnClickSoundName" Value="/Master/UI/PauseMenu/HZ2_SFX_UI_PauseMenu_ChangeTab_01" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type local:FZButton}">
                    <local:FZMaterial x:Name="BackgroundStyle"
                                      Style="{StaticResource A_Style_FZMaterial_GlassPanel_TabBarLeft}"
                                      Height="{StaticResource A_Double_Size_TabMenuItemHeight}"
                                      HorizontalAlignment="Stretch"
                                      VerticalAlignment="Center">
                        <Grid>
                            <ContentControl Style="{StaticResource A_Style_Control_MouseRollover_Outer_Left}"
                                            Focusable="False"
                                            local:BindingProxy.A="{Binding IsMouseOver, RelativeSource={RelativeSource TemplatedParent}}" />
                            <local:FZTextBlock Color="{StaticResource A_Color_Tile_Title_Alternate}"
                                               FontSize="{StaticResource A_Double_FontSize_TabMenu}"
                                               Style="{StaticResource A_Style_FZTextBlock_HorizonA}"
                                               Text="LB"
                                               TextWrapping="NoWrap"
                                               VerticalAlignment="Center"
                                               HorizontalAlignment="Center"
                                               x:Name="Textblock_Title"
                                               Visibility="{Binding IsControllerActiveInput, Converter={StaticResource A_FZBooleanToVisibilityConverter}}" />
                            <local:FZMaterial ImageSource="/ForzaUI;component/Textures/Anthem/Icons/scroll_page_arrow_left_small.png"
                                              Style="{StaticResource A_Style_FZMaterial_TabBar_ScrollPageArrow}"
                                              x:Name="Arrow_Title"
                                              Visibility="{Binding IsControllerActiveInput, Converter={StaticResource A_FZBooleanToVisibilityConverter_Inverse}}" />
                        </Grid>
                    </local:FZMaterial>

                    <ControlTemplate.Triggers>
                        <MultiDataTrigger>
                            <MultiDataTrigger.Conditions>
                                <Condition Binding="{Binding Path=IsPC, RelativeSource={RelativeSource FindAncestor, AncestorType=Page}}" Value="True" />
                                <Condition Binding="{Binding IsEnabled, RelativeSource={RelativeSource Self}}" Value="True" />
                            </MultiDataTrigger.Conditions>
                            <Setter TargetName="BackgroundStyle"
                                    Property="Style"
                                    Value="{StaticResource A_Style_FZMaterial_FlatPanel_TabBarLeft}" />
                            <Setter TargetName="Textblock_Title"
                                    Property="Color"
                                    Value="{StaticResource A_Color_TabBar_ItemText}" />
                            <Setter TargetName="Arrow_Title"
                                    Property="Color"
                                    Value="{StaticResource A_Color_TabBar_ItemText}" />
                        </MultiDataTrigger>
                        <Trigger Property="IsEnabled"
                                 Value="False">
                            <Setter TargetName="Textblock_Title"
                                    Property="Opacity"
                                    Value="0.25" />
                            <Setter TargetName="Arrow_Title"
                                    Property="Opacity"
                                    Value="0.25" />
                            <Setter TargetName="Arrow_Title"
                                    Property="Color"
                                    Value="{StaticResource A_Color_Tile_Title_Alternate}"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="A_Style_Button_TabTitleRB" TargetType="{x:Type local:FZButton}">
        <Setter Property="MinWidth" Value="{StaticResource A_Double_Size_TabMenuEndWidth}" />
        <Setter Property="OnClickSoundName" Value="/Master/UI/PauseMenu/HZ2_SFX_UI_PauseMenu_ChangeTab_01" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type local:FZButton}">
                    <local:FZMaterial x:Name="BackgroundStyle"
                                          Style="{StaticResource A_Style_FZMaterial_GlassPanel_TabBarRight}"
                                          Height="{StaticResource A_Double_Size_TabMenuItemHeight}"
                                          HorizontalAlignment="Stretch"
                                          VerticalAlignment="Center">
                        <Grid>
                            <ContentControl Style="{StaticResource A_Style_Control_MouseRollover_Outer_Right}"
                                            Focusable="False"
                                            local:BindingProxy.A="{Binding IsMouseOver, RelativeSource={RelativeSource TemplatedParent}}" />
                            <local:FZTextBlock Style="{StaticResource A_Style_FZTextBlock_HorizonA}"
                                                   Color="{StaticResource A_Color_Tile_Title_Alternate}"
                                                   FontSize="{StaticResource A_Double_FontSize_TabMenu}"
                                                   Text="RB"
                                                   TextWrapping="NoWrap"
                                                   VerticalAlignment="Center"
                                                   HorizontalAlignment="Center"
                                                   x:Name="Textblock_Title"
                                                   Visibility="{Binding IsControllerActiveInput, Converter={StaticResource A_FZBooleanToVisibilityConverter}}" />

                            <local:FZMaterial ImageSource="/ForzaUI;component/Textures/Anthem/Icons/scroll_page_arrow_right_small.png"
                                                  Style="{StaticResource A_Style_FZMaterial_TabBar_ScrollPageArrow}"
                                                  x:Name="Arrow_Title"
                                                  Visibility="{Binding IsControllerActiveInput, Converter={StaticResource A_FZBooleanToVisibilityConverter_Inverse}}" />
                        </Grid>
                    </local:FZMaterial>
                    <ControlTemplate.Triggers>
                        <MultiDataTrigger>
                            <MultiDataTrigger.Conditions>
                                <Condition Binding="{Binding Path=IsPC, RelativeSource={RelativeSource FindAncestor, AncestorType=Page}}" Value="True" />
                                <Condition Binding="{Binding IsEnabled, RelativeSource={RelativeSource Self}}" Value="True" />
                            </MultiDataTrigger.Conditions>
                            <Setter TargetName="BackgroundStyle"
                                    Property="Style"
                                    Value="{StaticResource A_Style_FZMaterial_FlatPanel_TabBarRight}" />
                            <Setter TargetName="Textblock_Title"
                                    Property="Color"
                                    Value="{StaticResource A_Color_TabBar_ItemText}" />
                            <Setter TargetName="Arrow_Title"
                                    Property="Color"
                                    Value="{StaticResource A_Color_TabBar_ItemText}" />
                        </MultiDataTrigger>
                        <Trigger Property="IsEnabled"
                                 Value="False">
                            <Setter TargetName="Textblock_Title"
                                    Property="Opacity"
                                    Value="0.25" />
                            <Setter TargetName="Arrow_Title"
                                    Property="Opacity"
                                    Value="0.25" />
                            <Setter TargetName="Arrow_Title"
                                    Property="Color"
                                    Value="{StaticResource A_Color_Tile_Title_Alternate}"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <DataTemplate x:Key="A_DataTemplate_TabTitleItem">
        <ContentControl Content="{Binding Title}"
                        Style="{StaticResource A_Style_ContentControl_TabTitle_Default}"
                VerticalAlignment="Center"
                Tag="{Binding NumUnread}"/>
    </DataTemplate>

    <Style x:Key="A_Style_ItemsSelector_TabTitle" TargetType="local:ItemsSelector">
        <Setter Property="FocusVisualStyle" Value="{StaticResource A_Style_BlankVisualStyle}" />
        <Setter Property="IsTabStop" Value="True" />
        <Setter Property="ItemTemplate" Value="{StaticResource A_DataTemplate_TabTitleItem}" />
        <Setter Property="Margin"
                Value="0, 0, 0, 10" />
        <Setter Property="AlternationCount" Value="10000" />
        <Setter Property="PageSize"
                Value="1" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="local:ItemsSelector">

                    <StackPanel x:Name="TabPanel" Height="{StaticResource A_Double_Size_TabMenuItemHeight}" Orientation="Horizontal" HorizontalAlignment="Left" VerticalAlignment="Top" FocusManager.IsFocusScope="True"
                                Focusable="False">
                        <local:FZButton Style="{StaticResource A_Style_Button_TabTitleLB}"
                                Command="{Binding ScrollPagePrevCommand, RelativeSource={RelativeSource TemplatedParent}}"
                                IsEnabled="{Binding CanSelectPrev, RelativeSource={RelativeSource TemplatedParent}}"
                                Focusable="False" />
                        <ContentControl x:Name="LoadingPanel"
                                Content="{local:Loc MessageCenter.IDS_RetrievingData}"
                                        Style="{StaticResource A_Style_ContentControl_TabTitle_Default}"
                                VerticalAlignment="Center"
                                Focusable="False" />
                        <StackPanel Orientation="Horizontal"
                                    IsItemsHost="true"
                                    VerticalAlignment="Center"
                                    MaxWidth="1580"
                                    Focusable="False"/>
                        <local:FZButton Style="{StaticResource A_Style_Button_TabTitleRB}"
                                Command="{Binding ScrollPageNextCommand, RelativeSource={RelativeSource TemplatedParent}}"
                                IsEnabled="{Binding CanSelectNext, RelativeSource={RelativeSource TemplatedParent}}"
                                Focusable="False" />
                    </StackPanel>

                    <ControlTemplate.Triggers>
                        <Trigger Property="HasItems" Value="true">
                            <Setter TargetName="LoadingPanel" Property="Visibility" Value="Collapsed"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!-- Breadcrumb/Notification Badges -->
    <Style x:Key="A_Style_ContentControl_NotificationBadge" TargetType="{x:Type ContentControl}">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate>
                    <local:FZMaterial Height="41" Width="41"
                                      ImageSource="/ForzaUI;component/Textures/Anthem/Icons/TiledMenus/NotificationBadges/Badge_IconTile_Breadcrumb.png"
                                      Visibility="{Binding Content, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource A_StringVisConverter}}">
                        <local:FZTextBlock Text="{Binding Content, RelativeSource={RelativeSource TemplatedParent}}"
                                           Style="{StaticResource A_Style_FZTextBlock_HorizonA}"
                                           Color="{StaticResource A_Color_NotificationBadge_Text}" FontSize="19" Width="Auto" HorizontalAlignment="Center" VerticalAlignment="Center"/>
                    </local:FZMaterial>                
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!-- Default Button bar -->
    <Style x:Key="A_Style_ContentControl_DefaultButtonBar" TargetType="ContentControl">
        <Setter Property="Canvas.Bottom" Value="0" />
        <Setter Property="Canvas.Left" Value="0" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate>
                    <local:ControllerButtonPanel x:Name="DefaultHelpPanel" Layout="RightToLeft" HorizontalAlignment="Left" Margin="0,0,0,0" Background="{x:Null}">
                        <local:ControllerButtonControl x:Name="ButtonA" Button="A" Description="{Binding Path=(local:ControllerButtonPanel.ADescription), Mode=OneWay,RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ContentControl}}}"
                            Visibility="{Binding Path=(local:ControllerButtonPanel.ADescription), RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ContentControl}}, Converter={StaticResource A_StringVisConverter}}" Reusable="True"/>
                        <local:ControllerButtonControl x:Name="ButtonB" Button="B" Description="{Binding Path=(local:ControllerButtonPanel.BDescription), RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ContentControl}}}"
                            Visibility="{Binding Path=(local:ControllerButtonPanel.BDescription), RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ContentControl}}, Converter={StaticResource A_StringVisConverter}}" Reusable="True"/>
                        <local:ControllerButtonControl x:Name="ButtonX" Button="X" Description="{Binding Path=(local:ControllerButtonPanel.XDescription), RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ContentControl}}}"
                            Visibility="{Binding Path=(local:ControllerButtonPanel.XDescription), RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ContentControl}}, Converter={StaticResource A_StringVisConverter}}" Reusable="True"/>
                        <local:ControllerButtonControl x:Name="ButtonY" Button="Y" Description="{Binding Path=(local:ControllerButtonPanel.YDescription), RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ContentControl}}}"
                            Visibility="{Binding Path=(local:ControllerButtonPanel.YDescription), RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ContentControl}}, Converter={StaticResource A_StringVisConverter}}" Reusable="True"/>
                        <local:ControllerButtonControl x:Name="ButtonBack" Button="Back" Description="{Binding Path=(local:ControllerButtonPanel.BackDescription), RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ContentControl}}}"
                            Visibility="{Binding Path=(local:ControllerButtonPanel.BackDescription), RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ContentControl}}, Converter={StaticResource A_StringVisConverter}}" Reusable="True"/>
                        <local:ControllerButtonControl x:Name="ButtonStart" Button="Start" Description="{Binding Path=(local:ControllerButtonPanel.StartDescription), RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ContentControl}}}"
                            Visibility="{Binding Path=(local:ControllerButtonPanel.StartDescription), RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ContentControl}}, Converter={StaticResource A_StringVisConverter}}" Reusable="True"/>
                        <local:ControllerButtonControl x:Name="ButtonLBumper" Button="LBumper" Description="{Binding Path=(local:ControllerButtonPanel.LBumperDescription), RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ContentControl}}}"
                            Visibility="{Binding Path=(local:ControllerButtonPanel.LBumperDescription), RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ContentControl}}, Converter={StaticResource A_StringVisConverter}}" Reusable="True"/>
                        <local:ControllerButtonControl x:Name="ButtonRBumper" Button="RBumper" Description="{Binding Path=(local:ControllerButtonPanel.RBumperDescription), RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ContentControl}}}"
                            Visibility="{Binding Path=(local:ControllerButtonPanel.RBumperDescription), RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ContentControl}}, Converter={StaticResource A_StringVisConverter}}" Reusable="True"/>
                        <local:ControllerButtonControl x:Name="ButtonLTrigger" Button="LTrigger" Description="{Binding Path=(local:ControllerButtonPanel.LTriggerDescription), RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ContentControl}}}"
                            Visibility="{Binding Path=(local:ControllerButtonPanel.LTriggerDescription), RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ContentControl}}, Converter={StaticResource A_StringVisConverter}}" Reusable="True"/>
                        <local:ControllerButtonControl x:Name="ButtonRTrigger" Button="RTrigger" Description="{Binding Path=(local:ControllerButtonPanel.RTriggerDescription), RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ContentControl}}}"
                            Visibility="{Binding Path=(local:ControllerButtonPanel.RTriggerDescription), RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ContentControl}}, Converter={StaticResource A_StringVisConverter}}" Reusable="True"/>
                        <local:ControllerButtonControl x:Name="ButtonDPadHorizontal" Button="DPadHorizontal" Description="{Binding Path=(local:ControllerButtonPanel.DPadHorizontalDescription), RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ContentControl}}}"
                            Visibility="{Binding Path=(local:ControllerButtonPanel.DPadHorizontalDescription), RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ContentControl}}, Converter={StaticResource A_StringVisConverter}}" Reusable="True"/>
                        <local:ControllerButtonControl x:Name="ButtonDPadVertical" Button="DPadVertical" Description="{Binding Path=(local:ControllerButtonPanel.DPadVerticalDescription), RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ContentControl}}}"
                            Visibility="{Binding Path=(local:ControllerButtonPanel.DPadVerticalDescription), RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ContentControl}}, Converter={StaticResource A_StringVisConverter}}" Reusable="True"/>
                        <local:ControllerButtonControl x:Name="ButtonDPadUp" Button="DPadUp" Description="{Binding Path=(local:ControllerButtonPanel.DPadUpDescription), RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ContentControl}}}"
                            Visibility="{Binding Path=(local:ControllerButtonPanel.DPadUpDescription), RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ContentControl}}, Converter={StaticResource A_StringVisConverter}}" Reusable="True"/>
                        <local:ControllerButtonControl x:Name="ButtonDPadDown" Button="DPadDown" Description="{Binding Path=(local:ControllerButtonPanel.DPadDownDescription), RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ContentControl}}}"
                            Visibility="{Binding Path=(local:ControllerButtonPanel.DPadDownDescription), RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ContentControl}}, Converter={StaticResource A_StringVisConverter}}" Reusable="True"/>
                        <local:ControllerButtonControl x:Name="ButtonDPadLeft" Button="DPadLeft" Description="{Binding Path=(local:ControllerButtonPanel.DPadLeftDescription), RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ContentControl}}}"
                            Visibility="{Binding Path=(local:ControllerButtonPanel.DPadLeftDescription), RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ContentControl}}, Converter={StaticResource A_StringVisConverter}}" Reusable="True"/>
                        <local:ControllerButtonControl x:Name="ButtonDPadRight" Button="DPadRight" Description="{Binding Path=(local:ControllerButtonPanel.DPadRightDescription), RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ContentControl}}}"
                            Visibility="{Binding Path=(local:ControllerButtonPanel.DPadLeftDescription), RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ContentControl}}, Converter={StaticResource A_StringVisConverter}}" Reusable="True"/>
                        <local:ControllerButtonControl x:Name="ButtonLThumb" Button="LThumb" Description="{Binding Path=(local:ControllerButtonPanel.LThumbDescription), RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ContentControl}}}"
                                Visibility="{Binding Path=(local:ControllerButtonPanel.LThumbDescription), RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ContentControl}}, Converter={StaticResource A_StringVisConverter}}" Reusable="True"/>
                        <local:ControllerButtonControl x:Name="ButtonLThumbLeftRight" Button="LThumb_LeftRight" Description="{Binding Path=(local:ControllerButtonPanel.LThumbLeftRightDescription), RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ContentControl}}}"
                                Visibility="{Binding Path=(local:ControllerButtonPanel.LThumbLeftRightDescription), RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ContentControl}}, Converter={StaticResource A_StringVisConverter}}" Reusable="True"/>
                        <local:ControllerButtonControl x:Name="ButtonRThumb" Button="RThumb" Description="{Binding Path=(local:ControllerButtonPanel.RThumbDescription), RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ContentControl}}}"
                                Visibility="{Binding Path=(local:ControllerButtonPanel.RThumbDescription), RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ContentControl}}, Converter={StaticResource A_StringVisConverter}}" Reusable="True"/>
                        <local:ControllerButtonControl x:Name="ButtonRThumbLeftRight" Button="RThumb_LeftRight" Description="{Binding Path=(local:ControllerButtonPanel.RThumbLeftRightDescription), RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ContentControl}}}"
                                Visibility="{Binding Path=(local:ControllerButtonPanel.RThumbLeftRightDescription), RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ContentControl}}, Converter={StaticResource A_StringVisConverter}}" Reusable="True"/>
                        <local:ControllerButtonControl x:Name="ButtonR3" Button="R3" Description="{Binding Path=(local:ControllerButtonPanel.R3Description), RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ContentControl}}}"
                            Visibility="{Binding Path=(local:ControllerButtonPanel.R3Description), RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ContentControl}}, Converter={StaticResource A_StringVisConverter}}" Reusable="True"/>
                        <local:ControllerButtonControl x:Name="ButtonL3" Button="L3" Description="{Binding Path=(local:ControllerButtonPanel.L3Description), RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ContentControl}}}"
                            Visibility="{Binding Path=(local:ControllerButtonPanel.L3Description), RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ContentControl}}, Converter={StaticResource A_StringVisConverter}}" Reusable="True"/>
                    </local:ControllerButtonPanel>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <ControlTemplate x:Key="A_ControlTemplate_ProgressBar_WaitSpinnerAnimated" TargetType="{x:Type ProgressBar}">
        <ControlTemplate.Resources>
            <local:UIStoryboard x:Key="A_UIStoryboard_Spin" RepeatBehavior="Forever" DurationOverride="0:0:2.0">
                <DoubleAnimationUsingKeyFrames Storyboard.TargetName="LoadingRing" Storyboard.TargetProperty="(UIElement.RenderTransform).(RotateTransform.Angle)">
                    <DiscreteDoubleKeyFrame KeyTime="0:0:0.0" Value="90" />
                    <EasingDoubleKeyFrame KeyTime="0:0:0.866" Value="450" EasingFunction="{local:QuadraticEasing EasingMode=EaseInOut}"/>
                    <DiscreteDoubleKeyFrame KeyTime="0:0:1.0" Value="90" />
                </DoubleAnimationUsingKeyFrames>
                <DoubleAnimationUsingKeyFrames Storyboard.TargetName="LoadingRingPreset" Storyboard.TargetProperty="EndIntensity">
                    <DiscreteDoubleKeyFrame KeyTime="0:0:0.0" Value="1" />
                    <DiscreteDoubleKeyFrame KeyTime="0:0:0.1" Value="1" />
                    <EasingDoubleKeyFrame KeyTime="0:0:0.5" Value="0" EasingFunction="{local:QuadraticEasing EasingMode=EaseIn}"/>
                </DoubleAnimationUsingKeyFrames>
                <DoubleAnimationUsingKeyFrames Storyboard.TargetName="LoadingRingPreset" Storyboard.TargetProperty="TrailLength">
                    <DiscreteDoubleKeyFrame KeyTime="0:0:0" Value="0" />
                    <EasingDoubleKeyFrame KeyTime="0:0:0.5" Value="0.645" EasingFunction="{local:QuadraticEasing EasingMode=EaseIn}"/>
                    <EasingDoubleKeyFrame KeyTime="0:0:1.0" Value="0" EasingFunction="{local:QuadraticEasing EasingMode=EaseOut}"/>
                </DoubleAnimationUsingKeyFrames>
            </local:UIStoryboard>
        </ControlTemplate.Resources>
        <Grid>
            <VisualStateManager.VisualStateGroups>
                <VisualStateGroup x:Name="CommonStates">
                    <VisualState x:Name="Determinate" />
                    <VisualState x:Name="Indeterminate" />
                </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>

            <Border x:Name="PART_Track"
                                    Visibility="Collapsed" />
            <Border x:Name="PART_Indicator"
                                    Visibility="Collapsed" />

            <local:FZMaterial x:Name="LoadingRing"
                Color="{Binding Tag, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource A_TypeSafeConverter}}"
                RenderTransformOrigin="0.5,0.5">
                <local:FZMaterial.RenderTransform>
                    <RotateTransform Angle="90"/>
                </local:FZMaterial.RenderTransform>
                <local:FZMaterial.Preset>
                    <local:FZMaterialPresetLoadingSpinner x:Name="LoadingRingPreset"
                        DotRadius="{DynamicResource A_Double_LoadingSpinner_DotRadius_Dynamic}"
                        OrbitRadius="{DynamicResource A_Double_LoadingSpinner_OrbitRadius_Dynamic}"/>
                </local:FZMaterial.Preset>
            </local:FZMaterial>
        </Grid>
        <ControlTemplate.Triggers>
            <MultiDataTrigger>
                <MultiDataTrigger.Conditions>
                    <Condition Binding="{Binding Visibility, RelativeSource={RelativeSource Self}}" Value="{x:Static Visibility.Visible}" />
                    <Condition Binding="{Binding Opacity, RelativeSource={RelativeSource Self}, Converter={StaticResource A_CompareConverter}, ConverterParameter=0}" Value="1" />
                    <Condition Binding="{Binding IsInitialized, RelativeSource={RelativeSource AncestorType=Page}}" Value="{StaticResource A_Boolean_True}" />
                </MultiDataTrigger.Conditions>
                <MultiDataTrigger.EnterActions>
                    <BeginStoryboard x:Name="BeginSpinAnim" Storyboard="{StaticResource A_UIStoryboard_Spin}" />
                </MultiDataTrigger.EnterActions>
                <MultiDataTrigger.ExitActions>
                    <StopStoryboard BeginStoryboardName="BeginSpinAnim" />
                </MultiDataTrigger.ExitActions>
            </MultiDataTrigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>

    <Style x:Key="A_Style_ProgressBar_WaitSpinner"
               TargetType="{x:Type ProgressBar}">
        <Style.Resources>
            <System:Double x:Key="A_Double_LoadingSpinner_DotRadius_Dynamic">0.22</System:Double>
            <System:Double x:Key="A_Double_LoadingSpinner_OrbitRadius_Dynamic">0.78</System:Double>
        </Style.Resources>
        <Setter Property="Height"
                Value="59" />
        <Setter Property="Width"
                Value="{Binding Height, RelativeSource={RelativeSource Self}}" />
        <Setter Property="Margin"
                    Value="0,0" />
        <Setter Property="IsIndeterminate"
                    Value="True" />
        <Setter Property="Tag"
                Value="{StaticResource A_Color_LoadingSpinner_Default}" />
        <Setter Property="Template" Value="{StaticResource A_ControlTemplate_ProgressBar_WaitSpinnerAnimated}" />
    </Style>

    <Style x:Key="A_Style_ProgressBar_WaitSpinnerDark"
           TargetType="{x:Type ProgressBar}"
           BasedOn="{StaticResource A_Style_ProgressBar_WaitSpinner}">
        <Setter Property="Tag"
                Value="{StaticResource A_Color_LoadingSpinner_Dark}" />
    </Style>

    <Style x:Key="A_Style_ProgressBar_WaitSpinner_Reverse"
           TargetType="{x:Type ProgressBar}"
           BasedOn="{StaticResource A_Style_ProgressBar_WaitSpinner}">
        <Setter Property="RenderTransformOrigin" Value="0.5,0.5" />
        <Setter Property="RenderTransform">
            <Setter.Value>
                <ScaleTransform ScaleX="-1" />
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="A_Style_FZMaterial_Circle" TargetType="local:FZMaterial">
        <Setter Property="Focusable"
                Value="False" />
        <Setter Property="Height" Value="100" />
        <Setter Property="Width" Value="{Binding Height, RelativeSource={RelativeSource Self}}" />
        <Setter Property="Color" Value="{StaticResource A_Color_Transparent}" />
        <Setter Property="Data">
            <Setter.Value>
                <local:FZGeometry Data="M100,50A50,50,180,1,0,0,50A50,50,180,1,0,100,50z" />
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="A_Style_Control_Circle"
           TargetType="{x:Type Control}">
        <Setter Property="Focusable"
                Value="False" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate>
                    <Viewbox>
                        <local:FZMaterial Style="{StaticResource A_Style_FZMaterial_Circle}"
                                          Color="{Binding Tag, RelativeSource={RelativeSource TemplatedParent}}"
                                          HorizontalAlignment="Left"
                                          VerticalAlignment="Top"
                                          Width="100"/>
                    </Viewbox>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <SolidColorBrush x:Key="A_SolidColorBrush_CheckboxArc"
                     Color="{StaticResource A_Color_Tile_Text}" />
    <SolidColorBrush x:Key="A_SolidColorBrush_CheckboxArc_Selected"
                     Color="{StaticResource A_Color_CheckBox_Selected}" />

    <Style x:Key="A_Style_Control_Checkbox" TargetType="Control">
        <Setter Property="Tag"
                Value="False" />
        <Setter Property="Focusable"
                Value="False" />
        <Setter Property="Height"
                Value="48" />
        <Setter Property="Width"
                Value="48" />

        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="Control">
                    <Grid>
                        <local:FZMaterial x:Name="Off"
                                          GreedyMeasure="True"
                                          Color="{StaticResource A_Color_TextMenu_Text_Default}"
                                          ImageSource="/ForzaUI;component/Textures/Data_Bound/Checkbox/Off.png" />
                        <local:FZMaterial x:Name="On"
                                          GreedyMeasure="True"
                                          Visibility="Hidden"
                                          Color="{StaticResource A_Color_TextMenu_Text_Default}"
                                          ImageSource="/ForzaUI;component/Textures/Data_Bound/Checkbox/On.png" />
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="Tag">
                            <Trigger.Value>
                                <System:Boolean>True</System:Boolean>
                            </Trigger.Value>
                            <Setter TargetName="On"
                                    Property="Visibility"
                                    Value="Visible" />
                            <Setter TargetName="Off"
                                    Property="Visibility"
                                    Value="Hidden" />
                        </Trigger>

                        <DataTrigger Binding="{Binding IsKeyboardFocusWithin, RelativeSource={RelativeSource FindAncestor, AncestorType=ListBoxItem}}"
                                     Value="True">
                            <Setter TargetName="Off"
                                    Property="Color"
                                    Value="{StaticResource A_Color_TextMenu_Text_Highlighted}" />
                            <Setter TargetName="On"
                                    Property="Color"
                                    Value="{StaticResource A_Color_TextMenu_Text_Highlighted}" />
                        </DataTrigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <BitmapImage x:Key="A_ImageSource_CreditIcon" UriSource="/ForzaUI;component/Textures/Anthem/Icons/CRIcon/CR_64.png" />
    <BitmapImage x:Key="A_ImageSource_TokenIcon" UriSource="/ForzaUI;component/Textures/Anthem/Icons/TokenIcon/Token_64.png" />
    <BitmapImage x:Key="A_ImageSource_FansIcon" UriSource="/ForzaUI;component/Textures/Anthem/Icons/FansIcon/Fans_64.png" />
    <BitmapImage x:Key="A_ImageSource_StarsIcon" UriSource="/ForzaUI;component/Textures/Data_Bound/Mountain/Stars/Star_64.png" />

    <Style x:Key="A_Style_IconText" TargetType="{x:Type local:FZTextBlock}" BasedOn="{StaticResource A_Style_FZTextBlock_HorizonA}">
        <Setter Property="Color" Value="{StaticResource A_Color_Tile_Background}" />
        <Setter Property="VerticalAlignment" Value="Center" />
        <Setter Property="FontSize" Value="24"/>
    </Style>

    <local:FZGeometry x:Key="A_FZGeometry_Default" />

    <Color x:Key="A_Color_CarClassPIText">#ff404040</Color>

    <ControlTemplate x:Key="A_ControlTemplate_CarClassBadge_Small" TargetType="Control">
        <Viewbox Stretch="Uniform" StretchDirection="Both">
            <local:FZMaterial Color="{Binding (local:BindingProxy.B), RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource A_CarClassConverter}, FallbackValue=#FF969696}"
                              Preset="{StaticResource A_FZMaterialPresetRoundtangle_FlatPanel_InnerAll}">
                <DockPanel Margin="2">
                    <local:FZMaterial Color="{StaticResource A_Color_Tile_Background}"
                                      Preset="{StaticResource A_FZMaterialPresetRoundtangle_FlatPanel_InnerInnerRightOnly}"
                                      DockPanel.Dock="Right"
                                      MinWidth="65">
                        <local:FZTextBlock Style="{DynamicResource A_Style_CarClassPIText_Dynamic}"
                                           HorizontalAlignment="Center"
                                           VerticalAlignment="Center"
                                           Margin="15,8,15,8" />
                    </local:FZMaterial>
                    <Decorator HorizontalAlignment="Center"
                               VerticalAlignment="Center"
                               Width="26"
                               Margin="8,4,8,4">
                        <local:FZTextBlock Style="{DynamicResource A_Style_CarClassText_Dynamic}"
                                           Text="{Binding (local:BindingProxy.B), RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource A_CarClassConverter}, FallbackValue=?}"
                                           HorizontalAlignment="Center"
                                           VerticalAlignment="Center"
                                           TextAlignment="Center"
                                           Effect="{StaticResource A_Effect_HighContrastModeDropShadow}" />
                    </Decorator>
                </DockPanel>
            </local:FZMaterial>
        </Viewbox>
    </ControlTemplate>

    <ControlTemplate x:Key="A_ControlTemplate_CarPIRange_Small" TargetType="Control">
        <ControlTemplate.Resources>
            <System:String x:Key="A_String_LowPi_to_MaxPi_FormatString">{0} - {1}</System:String>
        </ControlTemplate.Resources>
        <Viewbox Stretch="Uniform" StretchDirection="Both">
            <local:FZMaterial Color="#FF404040" Preset="{StaticResource A_FZMaterialPresetRoundtangle_FlatPanel_InnerAll}">
                <DockPanel Margin="2">
                    <local:FZMaterial Color="{StaticResource A_Color_Tile_Background}"
                                      Preset="{StaticResource A_FZMaterialPresetRoundtangle_FlatPanel_InnerInnerRightOnly}"
                                      DockPanel.Dock="Right"
                                      MinWidth="65">
                        <local:FZTextBlock Style="{DynamicResource A_Style_CarClassPIText_Dynamic}"
                                           local:MultiStringFormatter.Format="{StaticResource A_String_LowPi_to_MaxPi_FormatString}"
                                           local:MultiStringFormatter.Param0="{Binding (local:BindingProxy.C), RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource A_NumUnitConverter_NoUnit_0dp}}"
                                           local:MultiStringFormatter.Param1="{Binding (local:BindingProxy.A), RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource A_NumUnitConverter_NoUnit_0dp}}"
                                           Text="{Binding (local:MultiStringFormatter.Output), RelativeSource={RelativeSource Self}}"
                                           HorizontalAlignment="Center"
                                           VerticalAlignment="Center"
                                           Margin="8,8,8,8" />
                    </local:FZMaterial>
                    <Decorator HorizontalAlignment="Center"
                               VerticalAlignment="Center"
                               Width="20"
                               Margin="8,4,8,4">
                        <local:FZTextBlock Style="{DynamicResource A_Style_CarClassText_Dynamic}"
                                           Text="{local:Loc EventBlueprint.IDS_CarClassPI_Pill}"
                                           HorizontalAlignment="Center"
                                           VerticalAlignment="Center"
                                           TextAlignment="Center" />
                    </Decorator>
                </DockPanel>
            </local:FZMaterial>
        </Viewbox>
    </ControlTemplate>

    <ControlTemplate x:Key="A_ControlTemplate_CarClassBadge_Large"
                     TargetType="Control">
        <Grid>
            <local:FZMaterial Style="{StaticResource A_Style_FZMaterial_ShadowBase}" />
            
            <local:FZMaterial Preset="{StaticResource A_FZMaterialPresetRoundtangle_FlatPanel_OuterAll}"
                              Color="{Binding (local:BindingProxy.B), RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource A_CarClassConverter}, FallbackValue=#FF969696}"
                              Width="100"
                              Height="100">
                <UniformGrid Margin="3"
                             Rows="2">
                    <local:FZTextBlock Style="{StaticResource A_Style_FZTextBlock_DriveType}"
                                       CapHeight="25"
                                       Text="{Binding (local:BindingProxy.B), RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource A_CarClassConverter}, FallbackValue=?}" />
                    <local:FZMaterial Color="#FFFFFFFF"
                                      Preset="{StaticResource A_Preset_DrivetrainLowerPanel}">
                        <local:FZTextBlock Text="{Binding (local:BindingProxy.A), RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource A_PIConverter}, FallbackValue=???}"
                                           Color="{StaticResource A_Color_CarClassPIText}"
                                           CapHeight="24"
                                           FontFamily="Horizon_A"
                                           HorizontalAlignment="Center"
                                           VerticalAlignment="Center" />
                    </local:FZMaterial>
                </UniformGrid>
            </local:FZMaterial>
        </Grid>
    </ControlTemplate>

    <Style x:Key="A_Style_Control_CarClassBadge_Small_Default" TargetType="{x:Type Control}">
        <Style.Resources>
            <Style x:Key="A_Style_CarClassPIText_Dynamic" TargetType="local:FZTextBlock" BasedOn="{StaticResource A_Style_IconText}">
                <Setter Property="Text" Value="{Binding (local:BindingProxy.A), RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource A_PIConverter}, FallbackValue=?}"/>
                <Setter Property="FontFamily" Value="Horizon_A"/>
                <Setter Property="FontSize" Value="28"/>
                <Setter Property="Color" Value="{StaticResource A_Color_CarClassPIText}"/>
            </Style>
            <Style x:Key="A_Style_CarClassText_Dynamic" TargetType="local:FZTextBlock" BasedOn="{StaticResource A_Style_CarClassPIText_Dynamic}">
                <Setter Property="FontFamily" Value="Horizon_A"/>
                <Setter Property="CapHeight" Value="19"/>
                <Setter Property="Color" Value="{StaticResource A_Color_Tile_Background}"/>
            </Style>
        </Style.Resources>
        <Setter Property="Height" Value="42" />
        <Setter Property="Template" Value="{StaticResource A_ControlTemplate_CarClassBadge_Small}" />
    </Style>

    <Style x:Key="A_Style_Control_CarClassBadge_Small" TargetType="{x:Type Control}" BasedOn="{StaticResource A_Style_Control_CarClassBadge_Small_Default}" />

    <System:Int32 x:Key="A_System_Int_InvalidCarClassRestriction">-1</System:Int32>
    <local:MappingConverter x:Key="A_Converter_CarClass_To_CarClassBadgeControlTemplate" Default="{StaticResource A_ControlTemplate_CarClassBadge_Small}">
        <local:MappingConverterEntry Key="{StaticResource A_System_Int_InvalidCarClassRestriction}" Value="{StaticResource A_ControlTemplate_CarPIRange_Small}" />
    </local:MappingConverter>

    <Style x:Key="A_Style_Control_AdvancedCarRestrictions" TargetType="{x:Type Control}" BasedOn="{StaticResource A_Style_Control_CarClassBadge_Small_Default}">
        <Setter Property="Template" Value="{Binding (local:BindingProxy.B), RelativeSource={RelativeSource Self}, Converter={StaticResource A_Converter_CarClass_To_CarClassBadgeControlTemplate}, FallbackValue={StaticResource A_System_Int_InvalidCarClassRestriction}}" />
    </Style>

    <!-- Controls for showing the controller layout and active buttons -->
    <Style x:Key="A_Style_FZTextBlock_OptionText_Base" BasedOn="{StaticResource A_Style_FZTextBlock_Heading_Small_Tight}" TargetType="local:FZTextBlock">
        <Setter Property="FontFamily" Value="Horizon_D" />
        <Setter Property="CapHeight" Value="15" />
        <Setter Property="Margin" Value="16,0" />
        <Setter Property="Color" Value="{DynamicResource A_Color_TextMenu_Text_Dynamic}" />
    </Style>

    <Style x:Key="A_Style_FZTextBlock_OptionText" BasedOn="{StaticResource A_Style_FZTextBlock_OptionText_Base}" TargetType="local:FZTextBlock">
        <Setter Property="VerticalAlignment" Value="Center" />
        <Style.Triggers>
            <DataTrigger Binding="{Binding IsKeyboardFocusWithin, RelativeSource={RelativeSource FindAncestor, AncestorType=ListBoxItem}}"
                         Value="True">
                <Setter Property="Color"
                        Value="{StaticResource A_Color_TextMenu_Text_Highlighted}" />
            </DataTrigger>
        </Style.Triggers>
    </Style>

    <Style x:Key="A_Style_FZTextBlock_OptionValueText" BasedOn="{StaticResource A_Style_FZTextBlock_OptionText_Base}" TargetType="local:FZTextBlock">
        <Setter Property="FontFamily" Value="Horizon_B" />
    </Style>
    
    <Style x:Key="A_Style_FZTextBlock_OptionText_Alternate" BasedOn="{StaticResource A_Style_FZTextBlock_OptionText}" TargetType="local:FZTextBlock">
        <Setter Property="Color" Value="{StaticResource A_Color_TileSelected_Background}" />
    </Style>

    <Style x:Key="A_Style_FZTextBlock_ControllerMappingLabel"
           BasedOn="{StaticResource A_Style_FZTextBlock_Heading_Small}"
           TargetType="{x:Type local:FZTextBlock}">
        <Setter Property="FontFamily"
                Value="Horizon_A" />
        <Setter Property="TextWrapping"
                Value="Wrap" />
        <Setter Property="CapHeight"
                Value="15" />
        <Setter Property="Color"
                Value="{StaticResource A_Color_SubHeader_Text}" />
        <Setter Property="Margin" Value="24,12"/>
    </Style>

    <Style x:Key="A_Style_FZTextBlock_ControllerMappingLabel_Left"
           BasedOn="{StaticResource A_Style_FZTextBlock_ControllerMappingLabel}" TargetType="{x:Type local:FZTextBlock}">
        <Setter Property="TextAlignment" Value="Right"/>
        <Setter Property="HorizontalAlignment" Value="Right"/>
        <Setter Property="VerticalAlignment" Value="Center"/>
        <Setter Property="TextWrapping" Value="WrapWithOverflow"/>
    </Style>

    <Style x:Key="A_Style_FZTextBlock_ControllerMappingLabel_Right"
           BasedOn="{StaticResource A_Style_FZTextBlock_ControllerMappingLabel}" TargetType="{x:Type local:FZTextBlock}">
        <Setter Property="VerticalAlignment" Value="Center"/>
        <Setter Property="TextWrapping" Value="WrapWithOverflow"/>
    </Style>

    <Style x:Key="A_ControllerLabel_Path" TargetType="Path">
        <Setter Property="Stroke" Value="White" />
        <Setter Property="StrokeThickness" Value="2" />
        <Setter Property="Opacity" Value="0.2" />
    </Style>

    <Style x:Key="A_Style_FZMaterial_ControllerLabelBacking" BasedOn="{StaticResource A_Style_FZMaterial_FlatPanel_Tile}" TargetType="local:FZMaterial">
        <Setter Property="Color" Value="#26000000"/>
    </Style>

    <Style x:Key="A_Style_ContentControl_ControllerLabel" TargetType="ContentControl">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate>
                    <local:FZMaterial Style="{StaticResource A_Style_FZMaterial_ControllerLabelBacking}" MaxWidth="220" MaxHeight="80">
                        <local:FZTextBlock Text="{Binding Content, RelativeSource={RelativeSource TemplatedParent}}" Style="{DynamicResource A_Style_FZTextBlock_ControllerMappingLabel_Dynamic}"/>
                    </local:FZMaterial>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="A_Style_ContentControl_ControllerLabel_Right" BasedOn="{StaticResource A_Style_ContentControl_ControllerLabel}"  TargetType="ContentControl">
        <Style.Resources>
            <Style x:Key="A_Style_FZTextBlock_ControllerMappingLabel_Dynamic" BasedOn="{StaticResource A_Style_FZTextBlock_ControllerMappingLabel_Right}" TargetType="local:FZTextBlock"/>
        </Style.Resources>
    </Style>

    <Style x:Key="A_Style_ContentControl_ControllerLabel_Left" BasedOn="{StaticResource A_Style_ContentControl_ControllerLabel}"  TargetType="ContentControl">
        <Style.Resources>
            <Style x:Key="A_Style_FZTextBlock_ControllerMappingLabel_Dynamic" BasedOn="{StaticResource A_Style_FZTextBlock_ControllerMappingLabel_Left}" TargetType="local:FZTextBlock"/>
        </Style.Resources>
    </Style>

    <Style x:Key="A_Style_Control_ControllerMapping" TargetType="Control">
        <Style.Setters>
            <Setter Property="HorizontalAlignment" Value="Center"/>
            <Setter Property="VerticalAlignment" Value="Center"/>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate>
                        <Grid DataContext="{Binding CurrentControls}">
                            <Canvas HorizontalAlignment="Center" VerticalAlignment="Center" Width="512" Height="512">
                                <local:FZMaterial HorizontalAlignment="Center"
                                                  VerticalAlignment="Center"
                                                  Width="512"
                                                  Height="512"
                                                  ImageSourceNoPreload="/Textures/Data_Bound/UI_Symbols/Help_Controller.png"/>

                                <Canvas HorizontalAlignment="Right">
                                    <Canvas Visibility="{Binding LTString, Converter={StaticResource A_StringVisConverter}}">
                                        <Path Style="{StaticResource A_ControllerLabel_Path}" Data="M 4,65 40,65 119, 144" />
                                        <ContentControl Style="{StaticResource A_Style_ContentControl_ControllerLabel_Left}" Content="{Binding LTString}" Canvas.Right="-4" Canvas.Top="46"/>
                                    </Canvas>
                                    <Canvas Visibility="{Binding LBString, Converter={StaticResource A_StringVisConverter}}">
                                        <Path Style="{StaticResource A_ControllerLabel_Path}" Data="M 4,156 160,156" />
                                        <ContentControl Style="{StaticResource A_Style_ContentControl_ControllerLabel_Left}" Content="{Binding LBString}" Canvas.Right="-4" Canvas.Top="138"/>
                                    </Canvas>
                                    <Canvas Visibility="{Binding LThumbString, Converter={StaticResource A_StringVisConverter}}">
                                        <Path Style="{StaticResource A_ControllerLabel_Path}" Data="M 4,243 130,243" />
                                        <ContentControl Style="{StaticResource A_Style_ContentControl_ControllerLabel_Left}" Content="{Binding LThumbString}" Canvas.Right="-4" Canvas.Top="225"/>
                                    </Canvas>
                                    <Canvas Visibility="{Binding DPadUpString, Converter={StaticResource A_StringVisConverter}}">
                                        <Path Style="{StaticResource A_ControllerLabel_Path}" Data="M 4,303 187,303" />
                                        <ContentControl Style="{StaticResource A_Style_ContentControl_ControllerLabel_Left}" Content="{Binding DPadUpString}" Canvas.Right="-4" Canvas.Top="284"/>
                                    </Canvas>
                                    <Canvas Visibility="{Binding DPadLeftString, Converter={StaticResource A_StringVisConverter}}">
                                        <Path Style="{StaticResource A_ControllerLabel_Path}" Data="M 4,345 130,345 155,320 170,320" />
                                        <ContentControl Style="{StaticResource A_Style_ContentControl_ControllerLabel_Left}" Content="{Binding DPadLeftString}" Canvas.Right="-4" Canvas.Top="326"/>
                                    </Canvas>
                                    <Canvas Visibility="{Binding DPadDownString, Converter={StaticResource A_StringVisConverter}}">
                                        <Path Style="{StaticResource A_ControllerLabel_Path}" Data="M 4,411 88,411 160,339 187,339" />
                                        <ContentControl Style="{StaticResource A_Style_ContentControl_ControllerLabel_Left}" Content="{Binding DPadDownString}" Canvas.Right="-4" Canvas.Top="392"/>
                                    </Canvas>
                                    <Canvas Visibility="{Binding DPadRightString, Converter={StaticResource A_StringVisConverter}}">
                                        <Path Style="{StaticResource A_ControllerLabel_Path}" Data="M 217,331 217,492 200,492" />
                                        <ContentControl Style="{StaticResource A_Style_ContentControl_ControllerLabel_Left}" Content="{Binding DPadRightString}" Canvas.Right="-200" Canvas.Top="474"/>
                                    </Canvas>
                                    <Canvas Visibility="{Binding BackString, Converter={StaticResource A_StringVisConverter}}">
                                        <Path Style="{StaticResource A_ControllerLabel_Path}" Data="M 216,35 228,35 228,239" />
                                        <ContentControl Style="{StaticResource A_Style_ContentControl_ControllerLabel_Left}" Content="{Binding BackString}" Canvas.Right="-217" Canvas.Top="17"/>
                                    </Canvas>

                                    <Canvas Visibility="{Binding StartString, Converter={StaticResource A_StringVisConverter}}">
                                        <Path Style="{StaticResource A_ControllerLabel_Path}" Data="M 302,35 290,35 290,239" />
                                        <ContentControl Style="{StaticResource A_Style_ContentControl_ControllerLabel_Right}" Content="{Binding StartString}" Canvas.Left="302" Canvas.Top="17"/>
                                    </Canvas>
                                    <Canvas Visibility="{Binding RTString, Converter={StaticResource A_StringVisConverter}}">
                                        <Path Style="{StaticResource A_ControllerLabel_Path}" Data="M 512,65 476,65 396,144" />
                                        <ContentControl Style="{StaticResource A_Style_ContentControl_ControllerLabel_Right}" Content="{Binding RTString}" Canvas.Left="511" Canvas.Top="47"/>
                                    </Canvas>
                                    <Canvas Visibility="{Binding RBString, Converter={StaticResource A_StringVisConverter}}">
                                        <Path Style="{StaticResource A_ControllerLabel_Path}" Data="M 512,156 356,156" />
                                        <ContentControl Style="{StaticResource A_Style_ContentControl_ControllerLabel_Right}" Content="{Binding RBString}" Canvas.Left="511" Canvas.Bottom="-177" />
                                    </Canvas>
                                    <Canvas Visibility="{Binding YString, Converter={StaticResource A_StringVisConverter}}">
                                        <Path Style="{StaticResource A_ControllerLabel_Path}" Data="M 512,198 419,198 407,210 394,210" />
                                        <ContentControl Style="{StaticResource A_Style_ContentControl_ControllerLabel_Right}" Content="{Binding YString}" Canvas.Left="511" Canvas.Bottom="-219"/>
                                    </Canvas>
                                    <Canvas Visibility="{Binding BString, Converter={StaticResource A_StringVisConverter}}">
                                        <Path Style="{StaticResource A_ControllerLabel_Path}" Data="M 512,240 424,240" />
                                        <ContentControl Style="{StaticResource A_Style_ContentControl_ControllerLabel_Right}" Content="{Binding BString}" Canvas.Left="511" Canvas.Top="222"/>
                                    </Canvas>
                                    <Canvas Visibility="{Binding XString, Converter={StaticResource A_StringVisConverter}}">
                                        <Path Style="{StaticResource A_ControllerLabel_Path}" Data="M 512,281 420,281 377,241 361,241" />
                                        <ContentControl Style="{StaticResource A_Style_ContentControl_ControllerLabel_Right}" Content="{Binding XString}" Canvas.Left="511" Canvas.Top="264" MaxHeight="39"/>
                                    </Canvas>
                                    <Canvas Visibility="{Binding AString, Converter={StaticResource A_StringVisConverter}}">
                                        <Path Style="{StaticResource A_ControllerLabel_Path}" Data="M 512,325 436,325 390,280" />
                                        <ContentControl Style="{StaticResource A_Style_ContentControl_ControllerLabel_Right}" Content="{Binding AString}" Canvas.Left="511" Canvas.Top="306" />
                                    </Canvas>
                                    <Canvas Visibility="{Binding RThumb1String, Converter={StaticResource A_StringVisConverter}}">
                                        <Path Style="{StaticResource A_ControllerLabel_Path}" Data="M 512,397 405,397 330,325" />
                                        <ContentControl Style="{StaticResource A_Style_ContentControl_ControllerLabel_Right}" Content="{Binding RThumb1String}" Canvas.Left="511" Canvas.Top="379" />
                                    </Canvas>
                                    <Canvas Visibility="{Binding RThumb2String, Converter={StaticResource A_StringVisConverter}}">
                                        <Path Style="{StaticResource A_ControllerLabel_Path}" Data="M 335,492 317,492 317,325" />
                                        <ContentControl Style="{StaticResource A_Style_ContentControl_ControllerLabel_Right}" Content="{Binding RThumb2String}" Canvas.Left="334" Canvas.Top="474" />
                                    </Canvas>
                                </Canvas>
                            </Canvas>
                        </Grid>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style.Setters>
    </Style>
    
    <Style x:Key="A_Style_Control_WheelMapping" TargetType="Control">
        <Style.Setters>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate>
                        <Grid DataContext="{Binding CurrentControls}" Margin="0, -200, 0, 0">
                            <Canvas HorizontalAlignment="Center" VerticalAlignment="Center" Width="512" Height="512">
                                <local:FZMaterial HorizontalAlignment="Left" VerticalAlignment="Center" Width="512" Height="512"
                                                  ImageSourceNoPreload="/Textures/Data_Bound/UI_Symbols/Help_Wheel.png"/>

                                <Canvas HorizontalAlignment="Right">
                                    <Canvas HorizontalAlignment="Right" Visibility="{Binding LThumbString, Converter={StaticResource A_StringVisConverter}}">
                                        <Path Style="{StaticResource A_ControllerLabel_Path}" Data="M 0,76 120,76" />
                                        <ContentControl Style="{StaticResource A_Style_ContentControl_ControllerLabel_Left}" Content="{Binding LThumbString}" Canvas.Right="0" Canvas.Top="59"/>
                                    </Canvas>
                                    <Canvas HorizontalAlignment="Right" Visibility="{Binding LBString, Converter={StaticResource A_StringVisConverter}}">
                                        <Path Style="{StaticResource A_ControllerLabel_Path}" Data="M 0,126 126,126 156,156" />
                                        <ContentControl Style="{StaticResource A_Style_ContentControl_ControllerLabel_Left}" Content="{Binding LBString}" Canvas.Right="0" Canvas.Top="109"/>
                                    </Canvas>
                                    <Canvas HorizontalAlignment="Right" Visibility="{Binding DPadUpString, Converter={StaticResource A_StringVisConverter}}">
                                        <Path Style="{StaticResource A_ControllerLabel_Path}" Data="M 0,170 90,170 158,235" />
                                        <ContentControl Style="{StaticResource A_Style_ContentControl_ControllerLabel_Left}" Content="{Binding DPadUpString}" Canvas.Right="0" Canvas.Top="153"/>
                                    </Canvas>
                                    <Canvas HorizontalAlignment="Right" Visibility="{Binding DPadDownString, Converter={StaticResource A_StringVisConverter}}">
                                        <Path Style="{StaticResource A_ControllerLabel_Path}" Data="M 0,324 113,324 158,279" />
                                        <ContentControl Style="{StaticResource A_Style_ContentControl_ControllerLabel_Left}" Content="{Binding DPadDownString}" Canvas.Right="0" Canvas.Top="307"/>
                                    </Canvas>
                                    <Canvas HorizontalAlignment="Right" Visibility="{Binding DPadRightString, Converter={StaticResource A_StringVisConverter}}">
                                        <Path Style="{StaticResource A_ControllerLabel_Path}" Data="M 0,257 136,257" />
                                        <ContentControl Style="{StaticResource A_Style_ContentControl_ControllerLabel_Left}" Content="{Binding DPadRightString}" Canvas.Right="0" Canvas.Top="240"/>
                                    </Canvas>
                                    <Canvas HorizontalAlignment="Right" Visibility="{Binding BackString, Converter={StaticResource A_StringVisConverter}}">
                                        <Path Style="{StaticResource A_ControllerLabel_Path}" Data="M 0,417 40,417 217,257" />
                                        <ContentControl Style="{StaticResource A_Style_ContentControl_ControllerLabel_Left}" Content="{Binding BackString}" Canvas.Right="0" Canvas.Top="400"/>
                                    </Canvas>

                                    <Canvas Visibility="{Binding RBString, Converter={StaticResource A_StringVisConverter}}">
                                        <Path Style="{StaticResource A_ControllerLabel_Path}" Data="M 512,126 386,126 356,156" />
                                        <ContentControl Style="{StaticResource A_Style_ContentControl_ControllerLabel_Left}" Content="{Binding RBString}" Canvas.Left="512" Canvas.Top="109"/>
                                    </Canvas>
                                    <Canvas Visibility="{Binding YString, Converter={StaticResource A_StringVisConverter}}">
                                        <Path Style="{StaticResource A_ControllerLabel_Path}" Data="M 512,215 366,215 355,225 355,225" />
                                        <ContentControl Style="{StaticResource A_Style_ContentControl_ControllerLabel_Left}" Content="{Binding YString}" Canvas.Left="512" Canvas.Top="196"/>
                                    </Canvas>
                                    <Canvas Visibility="{Binding BString, Converter={StaticResource A_StringVisConverter}}">
                                        <Path Style="{StaticResource A_ControllerLabel_Path}" Data="M 512,255 384,255 " />
                                        <ContentControl Style="{StaticResource A_Style_ContentControl_ControllerLabel_Left}" Content="{Binding BString}" Canvas.Left="512" Canvas.Top="237"/>
                                    </Canvas>
                                    <Canvas Visibility="{Binding XString, Converter={StaticResource A_StringVisConverter}}">
                                        <Path Style="{StaticResource A_ControllerLabel_Path}" Data="M 512,297 393,297 353,255 340,255" />
                                        <ContentControl Style="{StaticResource A_Style_ContentControl_ControllerLabel_Left}" Content="{Binding XString}" Canvas.Left="512" Canvas.Top="278"/>
                                    </Canvas>
                                    <Canvas Visibility="{Binding AString, Converter={StaticResource A_StringVisConverter}}">
                                        <Path Style="{StaticResource A_ControllerLabel_Path}" Data="M 512,337 411,337 359,285" />
                                        <ContentControl Style="{StaticResource A_Style_ContentControl_ControllerLabel_Left}" Content="{Binding AString}" Canvas.Left="512" Canvas.Top="319"/>
                                    </Canvas>
                                    <Canvas Visibility="{Binding StartString, Converter={StaticResource A_StringVisConverter}}">
                                        <Path Style="{StaticResource A_ControllerLabel_Path}" Data="M 512,417 470,417 296,257" />
                                        <ContentControl Style="{StaticResource A_Style_ContentControl_ControllerLabel_Left}" Content="{Binding StartString}" Canvas.Left="512" Canvas.Top="400"/>
                                    </Canvas>
                                </Canvas>
                            </Canvas>

                            <Canvas HorizontalAlignment="Center" VerticalAlignment="Center" Width="256" Height="256" Margin="0, 700, 0, 0">
                                <local:FZMaterial HorizontalAlignment="Center" VerticalAlignment="Center" Width="256" Height="256" ImageSourceNoPreload="/Textures/Data_Bound/UI_Symbols/Help_Pedal.png" />

                                <Canvas HorizontalAlignment="Right">
                                    <Canvas HorizontalAlignment="Right">
                                        <Path Style="{StaticResource A_ControllerLabel_Path}" Data="M 0,98 37,98" Visibility="{Binding ClutchPathVisible, Converter={StaticResource A_FZBooleanToVisibilityConverter}}" />
                                        <ContentControl Style="{StaticResource A_Style_ContentControl_ControllerLabel_Left}" Content="{local:Loc MyProfile.IDS_Clutch}" Canvas.Right="0" Canvas.Top="79" Visibility="{Binding ClutchTextVisible, Converter={StaticResource A_FZBooleanToVisibilityConverter}}" />
                                        <ContentControl Style="{StaticResource A_Style_ContentControl_ControllerLabel_Left}" Content="{local:Loc MyProfile.IDS_Handbrake}" Canvas.Right="0" Canvas.Top="79" Visibility="{Binding InvertHandbrakeClutch, Converter={StaticResource A_FZBooleanToVisibilityConverter}}" />
                                    </Canvas>
                                    <Canvas HorizontalAlignment="Right" Visibility="{Binding LTString, Converter={StaticResource A_StringVisConverter}}">
                                        <Path Style="{StaticResource A_ControllerLabel_Path}" Data="M 0,55 83,55 125,86" />
                                        <ContentControl Style="{StaticResource A_Style_ContentControl_ControllerLabel_Left}" Content="{Binding LTString}" Canvas.Right="0" Canvas.Top="38" />
                                    </Canvas>
                                    
                                    <Canvas Visibility="{Binding RTString, Converter={StaticResource A_StringVisConverter}}">
                                        <Path Style="{StaticResource A_ControllerLabel_Path}" Data="M 257,96 215,96" />
                                        <ContentControl Style="{StaticResource A_Style_ContentControl_ControllerLabel_Right}" Content="{Binding RTString}" Canvas.Left="257" Canvas.Top="78" />
                                    </Canvas>                                    
                                </Canvas>
                            </Canvas>
                        </Grid>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style.Setters>
    </Style>

    <Style x:Key="A_Style_ListBox_AutoScrollPanel"
           TargetType="{x:Type local:CommonListBox}">
        <Setter Property="ScrollViewer.VerticalScrollBarVisibility"
                Value="Auto" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ListBox}">
                    <ItemsPresenter />
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="ItemContainerStyle">
            <Setter.Value>
                <Style TargetType="{x:Type ListBoxItem}">
                    <Setter Property="HorizontalContentAlignment"
                            Value="{Binding HorizontalContentAlignment, RelativeSource={RelativeSource AncestorType=local:AutoScrollPanel}}" />
                    <Setter Property="Template">
                        <Setter.Value>
                            <ControlTemplate TargetType="ListBoxItem">
                                <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" />
                            </ControlTemplate>
                        </Setter.Value>
                    </Setter>
                </Style>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="A_Style_AutoScrollPanel_Masked" TargetType="local:AutoScrollPanel">
        <!--Disabled for now because it looks weird on textblocks without enough content to warrant scrolling-->
        <!--<Setter Property="OpacityMask">
            <Setter.Value>
                <LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
                    <GradientStop Offset="0" Color="Transparent" />
                    <GradientStop Offset="0.05" Color="Black" />
                    <GradientStop Offset="0.95" Color="Black" />
                    <GradientStop Offset="1" Color="Transparent" />
                </LinearGradientBrush>
            </Setter.Value>
        </Setter>-->
        <Setter Property="ScrollType" Value="Speed" />
        <Setter Property="ScrollSeparation" Value="50" />
        <Setter Property="Speed" Value="20.0" />
        <Setter Property="Margin" Value="0,-5" />
        <Setter Property="ClipToBounds" Value="True" />
        <Setter Property="Orientation" Value="Vertical" />
        <Setter Property="AllowScrolling" Value="True" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="local:AutoScrollPanel">
                    <local:CommonListBox Style="{StaticResource A_Style_ListBox_AutoScrollPanel}"
                        Margin="0,5">
                        <ListBox.ItemsPanel>
                            <ItemsPanelTemplate>
                                <StackPanel Orientation="{Binding Orientation, RelativeSource={RelativeSource FindAncestor, AncestorType=local:AutoScrollPanel}}"
                                IsItemsHost="True"
                                Focusable="False" />
                            </ItemsPanelTemplate>
                        </ListBox.ItemsPanel>
                        <Control Template="{DynamicResource A_ControlTemplate_AutoscrollTemplate_Dynamic}"/>
                        <Decorator Height="{Binding ScrollSeparation, RelativeSource={RelativeSource TemplatedParent}}" 
                                   Width="{Binding ScrollSeparation, RelativeSource={RelativeSource TemplatedParent}}"
                                   Visibility="{Binding RequiresScrolling, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource A_FZBooleanToVisibilityConverter}}"/>
                        <Control Template="{DynamicResource A_ControlTemplate_AutoscrollTemplate_Dynamic}" 
                                 Visibility="{Binding RequiresScrolling, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource A_FZBooleanToVisibilityConverter}}"/>
                        <Decorator Height="{Binding ScrollSeparation, RelativeSource={RelativeSource TemplatedParent}}" 
                                   Width="{Binding ScrollSeparation, RelativeSource={RelativeSource TemplatedParent}}"
                                   Visibility="{Binding RequiresScrolling, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource A_FZBooleanToVisibilityConverter}}"/>
                    </local:CommonListBox>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="A_Style_AutoScrollPanel_UpgradesDescription" BasedOn="{StaticResource A_Style_AutoScrollPanel_Masked}" TargetType="local:AutoScrollPanel">
        <Style.Resources>
            <ControlTemplate x:Key="A_ControlTemplate_AutoscrollTemplate_Dynamic">
                <local:FZTextBlock Text="{Binding Description}"
                                       Style="{StaticResource A_Style_FZTextBlock_DescriptionBlockBody}"
                                       Margin="0"
                                       TextWrapping="Wrap" />
            </ControlTemplate>
        </Style.Resources>
    </Style>

    <Style TargetType="ContentControl"
               x:Key="A_Style_ContentControl_AnimatedTagSlideFromBottom">
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="ContentControl">
                        <Grid Height="{Binding ActualHeight, ElementName=Content}"
                              VerticalAlignment="Top"
                              ClipToBounds="True">
                            <StackPanel Orientation="Vertical"
                                        VerticalAlignment="Top">
                                <Grid Height="{Binding ActualHeight, ElementName=Content}">
                                    <Grid.LayoutTransform>
                                        <TransformGroup>
                                            <ScaleTransform ScaleY="{Binding Tag, RelativeSource={RelativeSource TemplatedParent}}" />
                                            <SkewTransform />
                                            <RotateTransform />
                                            <TranslateTransform />
                                        </TransformGroup>
                                    </Grid.LayoutTransform>
                                </Grid>
                                <ContentPresenter x:Name="Content" />
                            </StackPanel>
                        </Grid>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
            <Setter Property="Tag">
                <Setter.Value>
                    <System:Double>0.0</System:Double>
                </Setter.Value>
            </Setter>
        </Style>

        <Style TargetType="ContentControl"
               x:Key="A_Style_ContentControl_AnimatedTagSlideFromTop">
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="ContentControl">
                        <Grid Height="{Binding ActualHeight, ElementName=Content}"
                              VerticalAlignment="Bottom"
                              ClipToBounds="True">
                            <StackPanel Orientation="Vertical"
                                        VerticalAlignment="Bottom">
                                <ContentPresenter x:Name="Content" />
                                <Grid Height="{Binding ActualHeight, ElementName=Content}">
                                    <Grid.LayoutTransform>
                                        <TransformGroup>
                                            <ScaleTransform ScaleY="{Binding Tag, RelativeSource={RelativeSource TemplatedParent}}" />
                                            <SkewTransform />
                                            <RotateTransform />
                                            <TranslateTransform />
                                        </TransformGroup>
                                    </Grid.LayoutTransform>
                                </Grid>
                            </StackPanel>
                        </Grid>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
            <Setter Property="Tag">
                <Setter.Value>
                    <System:Double>0.0</System:Double>
                </Setter.Value>
            </Setter>
        </Style>

        <Style TargetType="ContentControl"
               x:Key="A_Style_ContentControl_AnimatedTagSlideFromLeft">
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="ContentControl">
                        <Grid Width="{Binding ActualWidth, ElementName=Content}"
                              HorizontalAlignment="Left"
                              ClipToBounds="True">
                            <StackPanel Orientation="Horizontal"
                                        HorizontalAlignment="Right">
                                <ContentPresenter x:Name="Content" />
                                <Grid Width="{Binding ActualWidth, ElementName=Content}">
                                    <Grid.LayoutTransform>
                                        <TransformGroup>
                                            <ScaleTransform ScaleX="{Binding Tag, RelativeSource={RelativeSource TemplatedParent}}" />
                                            <SkewTransform />
                                            <RotateTransform />
                                            <TranslateTransform />
                                        </TransformGroup>
                                    </Grid.LayoutTransform>
                                </Grid>
                            </StackPanel>
                        </Grid>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
            <Setter Property="Tag">
                <Setter.Value>
                    <System:Double>0.0</System:Double>
                </Setter.Value>
            </Setter>
        </Style>

    <Style TargetType="ContentControl"
           x:Key="A_Style_ContentControl_AnimatedTagSlideFromRight">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="ContentControl">
                    <Grid Width="{Binding ActualWidth, ElementName=Content}"
                          HorizontalAlignment="Right"
                          ClipToBounds="True">
                        <StackPanel Orientation="Horizontal"
                                    HorizontalAlignment="Left">
                            <Grid Width="{Binding ActualWidth, ElementName=Content}">
                                <Grid.LayoutTransform>
                                    <TransformGroup>
                                        <ScaleTransform ScaleX="{Binding Tag, RelativeSource={RelativeSource TemplatedParent}}" />
                                        <SkewTransform />
                                        <RotateTransform />
                                        <TranslateTransform />
                                    </TransformGroup>
                                </Grid.LayoutTransform>
                            </Grid>
                            <ContentPresenter x:Name="Content" />
                        </StackPanel>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="Tag">
            <Setter.Value>
                <System:Double>0.0</System:Double>
            </Setter.Value>
        </Setter>
    </Style>

    <CornerRadius x:Key="A_CornerRadius_Scrollbar">6</CornerRadius>

    <local:FZMaterialPresetGlassRoundtangle x:Key="A_FZMaterialPresetGlassRoundtangle_GlassPanel_ScrollbarBackground"
        BasedOn="{StaticResource A_FZMaterialPresetGlassRoundtangle_GlassPanel_Base}"
        CornerRadius="{DynamicResource A_CornerRadius_Scrollbar}"/>

    <local:FZMaterialPresetRoundtangle x:Key="A_FZMaterialPreset_ScrollbarThumb"
        BasedOn="{StaticResource A_FZMaterialPreset_FlatPanel_Base}"
        CornerRadius="{DynamicResource A_CornerRadius_Scrollbar}"/>

    <local:FZMaterialPresetRoundtangle x:Key="A_FZMaterialPreset_ScrollbarThumb_Rollover"
        BasedOn="{StaticResource A_FZMaterialPresetRoundtangle_GradientHighlight}"
        CornerRadius="{DynamicResource A_CornerRadius_Scrollbar}"/>

    <Style x:Key="A_Style_FZMaterial_FlatPanel_ScrollbarThumb"
        TargetType="{x:Type local:FZMaterial}"
        BasedOn="{StaticResource A_Style_FZMaterial_FlatPanel_Base}">
        <Setter Property="Preset" Value="{StaticResource A_FZMaterialPreset_ScrollbarThumb}"/>
        <Setter Property="Color" Value="{StaticResource A_Color_Tile_Background}"/>
        <Style.Triggers>
            <DataTrigger Binding="{Binding IsMouseOver, RelativeSource={RelativeSource AncestorType=Thumb}}"
                Value="True">
                <Setter Property="Preset" Value="{StaticResource A_FZMaterialPreset_ScrollbarThumb_Rollover}"/>
            </DataTrigger>
        </Style.Triggers>
    </Style>

    <Style x:Key="A_Style_FZMaterial_GlassPanel_ScrollbarBackground"
        TargetType="{x:Type local:FZMaterial}"
        BasedOn="{StaticResource A_Style_FZMaterial_GlassPanel_NonInteractive}">
        <Setter Property="Preset" Value="{StaticResource A_FZMaterialPresetGlassRoundtangle_GlassPanel_ScrollbarBackground}"/>
    </Style>

    <Style x:Key="A_Style_ScrollBarThumb_Default" TargetType="{x:Type Thumb}">
        <Setter Property="SnapsToDevicePixels" Value="True"/>
        <Setter Property="OverridesDefaultStyle" Value="true"/>
        <Setter Property="IsTabStop" Value="false"/>
        <Setter Property="Focusable" Value="false"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Thumb}">
                    <local:FZMaterial Style="{StaticResource A_Style_FZMaterial_FlatPanel_ScrollbarThumb}" />
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="A_Style_ScrollBar_Default" TargetType="{x:Type ScrollBar}">
        <Setter Property="Height"
                Value="12" />
        <Setter Property="Width"
                Value="Auto" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ScrollBar}">
                    <Grid>
                        <local:FZMaterial Style="{StaticResource A_Style_FZMaterial_GlassPanel_ScrollbarBackground}"/>
                        <Track x:Name="PART_Track" IsDirectionReversed="False" SnapsToDevicePixels="True">
                            <Track.Thumb>
                                <Thumb Style="{StaticResource A_Style_ScrollBarThumb_Default}"/>
                            </Track.Thumb>
                        </Track>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="Orientation"
                                 Value="Vertical">
                            <Setter TargetName="PART_Track"
                                    Property="IsDirectionReversed"
                                    Value="True" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Style.Triggers>
            <Trigger Property="Orientation"
                     Value="Vertical">
                <Setter Property="Width"
                        Value="12" />
                <Setter Property="Height"
                        Value="Auto" />
            </Trigger>
        </Style.Triggers>
    </Style>

    <Style x:Key="A_Style_FZScrollViewer_Default_Horizontal" TargetType="{x:Type local:FZScrollViewer}">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type local:FZScrollViewer}">
                    <Grid>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="*"/>
                            <RowDefinition Height="Auto"/>
                        </Grid.RowDefinitions>

                        <ScrollBar x:Name="PART_HorizontalScrollBar" Grid.Row="1" Width="Auto" Height="10" Margin="0,0,4,36" Orientation="Horizontal" VerticalAlignment="Bottom"
                                    Value="{TemplateBinding HorizontalOffset}" Minimum="0" Maximum="{TemplateBinding ScrollableWidth}" ViewportSize="{TemplateBinding ViewportWidth}"
                                    Style="{StaticResource A_Style_ScrollBar_Default}" Visibility="{TemplateBinding ComputedHorizontalScrollBarVisibility}" />

                        <ScrollContentPresenter Margin="0" Content="{TemplateBinding Content}" CanContentScroll="{TemplateBinding local:FZScrollViewer.CanContentScroll}" ClipToBounds="false"/>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="local:FZScrollViewer.TopScrollOffset" Value="100" />
        <Setter Property="local:FZScrollViewer.BottomScrollOffset" Value="100" />
        <Setter Property="local:FZScrollViewer.Orientation" Value="Horizontal" />
        <Setter Property="HorizontalScrollBarVisibility" Value="{Binding (local:FZScrollViewer.HorizontalScrollBarVisibility), RelativeSource={RelativeSource TemplatedParent}}" />
        <Setter Property="VerticalScrollBarVisibility" Value="Disabled" />
    </Style>

    <Style x:Key="A_Style_Button_EmptyButton" TargetType="{x:Type local:FZButton}">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type local:FZButton}">
                    <ContentPresenter />
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <local:FZMaterialPresetAcrylicPanel x:Key="A_FZMaterialPresetRoundtangle_CharacterPass"
                                       CornerRadius="18"
                                        Reflectivity="0.0"
                                        BasedOn="{StaticResource A_FZMaterialPresetAcrylicPanel_Base}"/>

    <local:FZMaterialPresetAcrylicPanel x:Key="A_FZMaterialPresetRoundtangle_CharacterPass_NoDepth"
                                        Depth="0"
                                        BasedOn="{StaticResource A_FZMaterialPresetRoundtangle_CharacterPass}" />

    <local:FZMaterialPresetRoundtangle x:Key="A_FZMaterialPresetRoundtangle_CharacterPass_Footer"
                                       CornerRadius="2,2,18,18"
                                       BasedOn="{StaticResource A_FZMaterialPresetAcrylicPanel_Opaque}"/>

    <Style x:Key="A_Style_Control_CharacterPass"
           TargetType="Control">
        <Setter Property="local:BindingProxy.C"
                Value="DisableDepthOnHover"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate>
                    <Grid Width="320"
                          Height="345">
                        <local:FZMaterial Width="320"
                                          Height="345"
                                                ImageSource="{Binding (local:BindingProxy.B), RelativeSource={RelativeSource TemplatedParent}}"
                                                Preset="{StaticResource A_FZMaterialPresetRoundtangle_CharacterPass}"
                                                VerticalAlignment="Top"
                                                x:Name="Image"/>
                        <local:FZMaterial Color="{StaticResource A_Color_Generic_Selection}"
                                              Height="52"
                                              VerticalAlignment="Bottom"
                                              Margin="-1,0,0,-1"
                                              Preset="{StaticResource A_FZMaterialPresetRoundtangle_CharacterPass_Footer}"
                                              Visibility="{Binding (local:BindingProxy.A), RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource A_StringVisConverter}}">
                            <local:FZTextBlock Text="{Binding (local:BindingProxy.A), RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource A_StringToUpper}}"
                                                   HorizontalAlignment="Center"
                                                   VerticalAlignment="Center"
                                                   Style="{StaticResource A_Style_FZTextBlock_Heading_Small_Tight}"
                                                   FontSize="32"
                                                   Color="{StaticResource A_Color_Tile_Title_Alternate}" />
                        </local:FZMaterial>
                    </Grid>

                    <ControlTemplate.Triggers>
                        <MultiDataTrigger>
                            <MultiDataTrigger.Conditions>
                                <Condition Binding="{Binding (Selector.IsMouseOver), RelativeSource={RelativeSource AncestorType=ContentControl}}"
                                               Value="True" />
                                <Condition Binding="{Binding (local:BindingProxy.C), RelativeSource={RelativeSource Self}}"
                                               Value="DisableDepthOnHover" />
                            </MultiDataTrigger.Conditions>
                            <Setter TargetName="Image"
                                        Property="Preset"
                                        Value="{StaticResource A_FZMaterialPresetRoundtangle_CharacterPass_NoDepth}" />
                        </MultiDataTrigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!-- This style is used for the highlight selector (red transparent)
	These are an option for the colour of the rollovers, leaving here for review time
                                                GlassColor="#ff808080"
        EdgeColor="#ff808080"
     -->
    <local:FZMaterialPresetAcrylicPanel x:Key="A_FZMaterialPresetAcrylicPanel_MouseRollOver"
                                        GlassColor="{StaticResource A_Color_Acrylic_Highlight}"
                                        EdgeColor="{StaticResource A_Color_Acrylic_Highlight}"
                                        GlassEmission="0.7" 
                                        EdgeEmission="1.0" 
                                        FrontEdgeTransparency="0.5" 
                                        RearTransparency="0.05" 
                                        BlurAmount="Low"
                                        ReflectionTextureType="Sharp" 
                                        Reflectivity="1.0"
                                        NormalDepth="0.0"
                                        SideReflectionIntensity="0.6"
                                        SubsurfaceIntensity="0.0"
                                        SubsurfaceSize="0"
                                        Depth="10"/>
    <Style x:Key="A_Style_FZMaterial_AcrylicPanel_MouseRollOver" TargetType="local:FZMaterial" >
        <Setter Property="Preset" Value="{StaticResource A_FZMaterialPresetAcrylicPanel_MouseRollOver}" />
        <Setter Property="Color" Value="#30000000" />
        <Setter Property="Opacity" Value="1.0" />
    </Style>

    <ControlTemplate x:Key="A_ControlTemplate_Button_ClickableButtonWithMouseRollover"
                     TargetType="local:FZButton">
        <Grid>
            <local:FZMaterial x:Name="MouseRollover"
                              Preset="{StaticResource A_FZMaterialPresetRoundtangleStroke_Rollover_Outer_All}"
                              Visibility="Hidden"
                              Margin="-3" />
            <local:FZMaterial x:Name="OutlineIfDisabled"
                              Style="{StaticResource A_Style_FZMaterial_FlatPanel_Tile}"
                              Preset="{StaticResource A_FZMaterialPresetRoundtangle_FlatPanel_InnerAll}"
                              Opacity="0.3"
                              Visibility="{Binding IsEnabled, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource A_FZBooleanToVisibilityConverter_UseHidden_Inverse}}"
                              Margin="-1" />
            <local:FZMaterial x:Name="Shadow"
                              Color="{StaticResource A_Color_DropShadow}"
                              Margin="-10"
                              Opacity="1.0">
                <local:FZMaterial.Preset>
                    <local:FZMaterialPresetSelfShadow Softness="20"
                                                      CornerRadius="20" />
                </local:FZMaterial.Preset>
            </local:FZMaterial>
            <local:FZMaterial x:Name="ButtonBackground"
                              Style="{StaticResource A_Style_FZMaterial_FlatPanel_Tile}"
                              Preset="{StaticResource A_FZMaterialPresetRoundtangle_FlatPanel_InnerAll}" />
            <ContentPresenter />
        </Grid>
        <ControlTemplate.Triggers>
            <Trigger Property="IsMouseOver"
                     Value="True">
                <Setter TargetName="MouseRollover"
                        Property="Visibility"
                        Value="Visible"/>
                <Setter TargetName="OutlineIfDisabled"
                        Property="Visibility"
                        Value="Hidden"/>
            </Trigger>
            <Trigger Property="IsEnabled"
                     Value="False">
                <Setter TargetName="ButtonBackground"
                        Property="Preset"
                        Value="{StaticResource A_FZMaterialPresetGlassRoundtangle_GlassPanel_InnerAll}" />
                <Setter TargetName="ButtonBackground"
                        Property="Color"
                        Value="{StaticResource A_Color_GlassPanel_NonInteractive}"/>
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>

    <Style x:Key="A_Style_Control_CancelHideUIWithMouse"
           TargetType="Control">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate>
                    <Grid>
                        <local:RoutedEventCommand x:Name="ShowUICommand"
                                                  RoutedEvent="UIElement.MouseLeftButtonDown"
                                                  Command="{Binding ShowUICommand, RelativeSource={RelativeSource FindAncestor, AncestorType=Page}}" />
                        <local:FZMaterial x:Name="HitTestMaterial"
                                            IsHitTestVisible="False"
                                            local:RoutedEventCommand.Action="{Binding ElementName=ShowUICommand}" 
                                            Opacity="0.0f"/>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <DataTrigger Binding="{Binding IsUIVisible, RelativeSource={RelativeSource FindAncestor, AncestorType=Page}}"
                                     Value="False">
                            <Setter Property="IsHitTestVisible"
                                    TargetName="HitTestMaterial"
                                    Value="True" />
                        </DataTrigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="{x:Type local:FZTextBox}" TargetType="{x:Type local:FZTextBox}">
        <Setter Property="Foreground" Value="#8C8C8C" />
        <Setter Property="FontSize" Value="22" />
        <Setter Property="FontFamily" Value="Horizon_D" />
        <Setter Property="MinHeight" Value="50"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type TextBoxBase}">
                    <local:FZMaterial Style="{StaticResource A_Style_FZMaterial_FlatPanel_Tile}">
                        <ScrollViewer Margin="9" x:Name="PART_ContentHost" 
                                      VerticalScrollBarVisibility="Hidden" HorizontalScrollBarVisibility="Hidden"
                                      HorizontalAlignment="Center"
                                      MinWidth="15" />
                    </local:FZMaterial>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="A_Style_FZRun_HorizonEdition_BOLD" 
           TargetType="local:FZRun">
        <Setter Property="FontFamily" Value="Horizon_A" />
    </Style>
    
    <Style x:Key="A_Style_FZTextBlock_HorizonEdition"
           TargetType="local:FZTextBlock"
           BasedOn="{StaticResource A_Style_FZTextBlock_HorizonB}">
        <Setter Property="Color" Value="{StaticResource A_Color_Tile_Title_Alternate}" />
        <Setter Property="FontSize" Value="42" />
        <Setter Property="Margin" Value="10,0,13,0" />
        <Setter Property="VerticalAlignment" Value="Center" />
        <Setter Property="local:TextBlockInlineMarkup.Markup" Value="{Binding HorizonEditionBonus}" />
        <Setter Property="local:TextBlockInlineMarkup.ResourceBaseName" Value="A_Style_FZRun_HorizonEdition_" />
    </Style>
    
    <Style x:Key="A_Style_Control_HorizonEdition" TargetType="Control">
        <Setter Property="Focusable" Value="False" />
        <Setter Property="Height" Value="56" />
        <Setter Property="local:BindingProxy.A"
                Value="{StaticResource A_Color_Tile_Title_Alternate}" />
        <Setter Property="Visibility" Value="{Binding HorizonEditionBonus, Converter={StaticResource A_FZBooleanToVisibilityConverter}}"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="Control">
                    <Viewbox>
                        <Grid Height="56">
                            <local:FZMaterial x:Name="HE_Material_2" Color="{StaticResource A_Color_HorizonEdition}" Margin="0,0,0,0" Height="2" VerticalAlignment="Top" />
                            <local:FZMaterial x:Name="HE_Material_3" Color="{StaticResource A_Color_HorizonEdition}" Margin="0,0,0,0" Height="2" VerticalAlignment="Bottom" />
                            <local:FZMaterial x:Name="HE_Material_4" Color="{StaticResource A_Color_HorizonEdition}" Margin="0,2,0,2" Width="2" HorizontalAlignment="Right" />
                            <DockPanel>
                                <local:FZMaterial x:Name="HE_Material_1" 
                                              Color="{StaticResource A_Color_HorizonEdition}"
                                              ImageSource="/ForzaUI;component/Textures/Anthem/Icons/HEIcons/HE_56.png"
                                              Width="56" 
                                              DockPanel.Dock="Left" />
                                <local:FZTextBlock Style="{StaticResource A_Style_FZTextBlock_HorizonEdition}"
                                                    Color="{Binding (local:BindingProxy.A), RelativeSource={RelativeSource TemplatedParent}}"/>
                            </DockPanel>
                        </Grid>
                    </Viewbox>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <ControlTemplate x:Key="A_Control_Template_Event_Timer" TargetType="Control" >
        <Grid ClipToBounds="True">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="98" />
                <ColumnDefinition Width="280*" />
            </Grid.ColumnDefinitions>
            <local:FZMaterial Grid.Column="0" Style="{StaticResource A_Style_FZMaterial_FlatPanel_Tile}" Color="{StaticResource A_Color_Tile_Background_Alternate}" >
                <local:FZMaterial Stretch="Uniform" Style="{StaticResource A_Style_FZMaterial_FlatPanel_Tile}" ImageSource="/ForzaUI;component/Textures/Anthem/Icons/Timer_Countdown.png"/>
            </local:FZMaterial>

            <StackPanel Grid.Column="1" Orientation="Vertical" VerticalAlignment="Center" Margin="16,6,0,0">
                <local:FZTextBlock Color="{StaticResource A_Color_White}"
                                               CapHeight="30" FontFamily="Horizon_A" VerticalAlignment="Center" 
                                               Text="{Binding (local:BindingProxy.A), RelativeSource={RelativeSource AncestorType={x:Type Control}}}"/>
                <Decorator Height="10"/>
                <local:FZTextBlock local:TextBlockInlineMarkup.ResourceBaseName="A_Style_FZRun_" 
                                               local:TextBlockInlineMarkup.Markup="{Binding (local:BindingProxy.B), RelativeSource={RelativeSource AncestorType={x:Type Control}}}"
                                               Style="{StaticResource A_Style_FZTextBlock_HorizonB}" Color="{StaticResource A_Color_White}" CapHeight="40"/>
            </StackPanel>
        </Grid>
    </ControlTemplate>
    
    <Style x:Key="A_Style_Event_Timer" TargetType="Control">
        <Style.Resources>
            <Style x:Key="A_Style_FZRun_NUM" TargetType="local:FZRun">
                <Setter Property="FontFamily" Value="Horizon_A" />
                <Setter Property="CapHeight" Value="46"/>
            </Style>
        </Style.Resources>
        <Setter Property="local:BindingProxy.A" Value="0"/>
        <Setter Property="local:BindingProxy.B" Value="0"/>
        <Setter Property="Template" Value="{StaticResource A_Control_Template_Event_Timer}"/>
    </Style>

    <Style x:Key="A_Style_EventCountdownControl" TargetType="{x:Type local:NetworkCountdownControl}">
        <Setter Property="Visibility" Value="Visible"/>
        <Setter Property="Width" Value="420"/>
        <Setter Property="Height" Value="98"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type local:NetworkCountdownControl}" >
                    <Control Style="{StaticResource A_Style_Event_Timer}"
                             local:BindingProxy.A="{Binding TimerDisplayName, RelativeSource={RelativeSource AncestorType={x:Type local:NetworkCountdownControl}}}"
                             local:BindingProxy.B="{Binding TimeRemaining, RelativeSource={RelativeSource AncestorType={x:Type local:NetworkCountdownControl}}}" />
                </ControlTemplate>

            </Setter.Value>
        </Setter> 
        <Style.Triggers>
            <!--When the value is less than 0 - collapse -->
            <DataTrigger Binding="{Binding SecondsRemaining, RelativeSource={RelativeSource AncestorType={x:Type local:NetworkCountdownControl}}, Converter={StaticResource A_CompareConverter}, ConverterParameter=0}" Value="-1">
                <Setter Property="Visibility" Value="Collapsed"/>
            </DataTrigger>
        </Style.Triggers>
    </Style>


    <Style TargetType="local:FZMaterial"
           x:Key="A_Style_FZMaterial_SmallRewardBacking"
           BasedOn="{StaticResource A_Style_FZMaterial_RewardBacking}">
        <Style.Resources>
            <local:FZMaterialPresetRoundtangle x:Key="A_Preset_HorizonEdition_Gradient_Dynamic"
                                               BasedOn="{StaticResource A_FZMaterialPresetRoundtangle_FlatPanel_OuterLeftOnly}"
                                               GradientAngle="90"
                                               GradientColorA="{StaticResource A_Color_TombolaBackgroundGradientA_HorizonEdition}"
                                               GradientColorB="{StaticResource A_Color_TombolaBackgroundGradientB_HorizonEdition}" />
        </Style.Resources>
        <Setter Property="Preset"
                Value="{StaticResource A_FZMaterialPresetRoundtangle_FlatPanel_OuterLeftOnly}" />
        <Style.Triggers>
            <DataTrigger Binding="{Binding IsEventReward}"
                         Value="True">
                <Setter Property="Color"
                        Value="{Binding DataContext.Progress.ThreadName, RelativeSource={RelativeSource FindAncestor, AncestorType=ItemsControl}, Converter={StaticResource A_Converter_InfluenceThreadIdToColor}}" />
            </DataTrigger>
        </Style.Triggers>
    </Style>

    <local:MappingConverter x:Key="A_Converter_ThreadNameToThreadIcon"
                            Default="{x:Null}">
        <local:MappingConverterEntry Key="asphalt_series" Value="/ForzaUI;component/Textures/Data_Bound/EventIcons/Asphalt.png" />
        <local:MappingConverterEntry Key="mixed_surface_series" Value="/ForzaUI;component/Textures/Data_Bound/EventIcons/Mixed_Surface.png" />
        <local:MappingConverterEntry Key="cross_country_series" Value="/ForzaUI;component/Textures/Data_Bound/EventIcons/Cross_Country.png" />
        <local:MappingConverterEntry Key="street_racing_series" Value="/ForzaUI;component/Textures/Data_Bound/EventIcons/Street_Race.png" />
        <local:MappingConverterEntry Key="drag_racing" Value="/ForzaUI;component/Textures/Data_Bound/EventIcons/Drag.png" />
        <local:MappingConverterEntry Key="online_adventure_mixed" Value="/ForzaUI;component/Textures/Data_Bound/InfluenceThreads/MyHorizonLife/online_misc.png" />
        <local:MappingConverterEntry Key="online_adventure_playground_games" Value="/ForzaUI;component/Textures/Data_Bound/InfluenceThreads/MyHorizonLife/online_misc.png" />
        <local:MappingConverterEntry Key="online_adventure_racing" Value="/ForzaUI;component/Textures/Data_Bound/InfluenceThreads/MyHorizonLife/online_misc.png" />
        <local:MappingConverterEntry Key="online_adventure_drift" Value="/ForzaUI;component/Textures/Data_Bound/InfluenceThreads/MyHorizonLife/online_misc.png" />
    </local:MappingConverter>

        <local:MappingConverter x:Key="A_Converter_ThreadRewardToUnlockText">
            <local:MappingConverterEntry Key="asphalt_series" Value="{local:Loc Rivals.IDS_RewardTitle_RacesUnlocked}" />
            <local:MappingConverterEntry Key="mixed_surface_series" Value="{local:Loc Rivals.IDS_RewardTitle_RacesUnlocked}" />
            <local:MappingConverterEntry Key="cross_country_series" Value="{local:Loc Rivals.IDS_RewardTitle_RacesUnlocked}" />
            <local:MappingConverterEntry Key="street_racing_series" Value="{local:Loc Rivals.IDS_RewardTitle_RacesUnlocked}" />
            <local:MappingConverterEntry Key="drag_racing" Value="{local:Loc Rivals.IDS_RewardTitle_RacesUnlocked}" />
            <local:MappingConverterEntry Key="online_adventure_mixed" Value="{local:Loc Rivals.IDS_RewardTitle_AdventureUnlocked}" />
            <local:MappingConverterEntry Key="online_adventure_playground_games" Value="{local:Loc Rivals.IDS_RewardTitle_AdventureUnlocked}" />
            <local:MappingConverterEntry Key="online_adventure_racing" Value="{local:Loc Rivals.IDS_RewardTitle_AdventureUnlocked}" />
            <local:MappingConverterEntry Key="online_adventure_drift" Value="{local:Loc Rivals.IDS_RewardTitle_AdventureUnlocked}" />
        </local:MappingConverter>

        <local:MappingConverter x:Key="A_Converter_ThreadRewardToUnlockText_Plural">
            <local:MappingConverterEntry Key="asphalt_series" Value="{local:Loc Rivals.IDS_RewardTitle_RacesUnlocked_Plural}" />
            <local:MappingConverterEntry Key="mixed_surface_series" Value="{local:Loc Rivals.IDS_RewardTitle_RacesUnlocked_Plural}" />
            <local:MappingConverterEntry Key="cross_country_series" Value="{local:Loc Rivals.IDS_RewardTitle_RacesUnlocked_Plural}" />
            <local:MappingConverterEntry Key="street_racing_series" Value="{local:Loc Rivals.IDS_RewardTitle_RacesUnlocked_Plural}" />
            <local:MappingConverterEntry Key="drag_racing" Value="{local:Loc Rivals.IDS_RewardTitle_RacesUnlocked_Plural}" />
            <local:MappingConverterEntry Key="online_adventure_mixed" Value="{local:Loc Rivals.IDS_RewardTitle_AdventureUnlocked}" />
            <local:MappingConverterEntry Key="online_adventure_playground_games" Value="{local:Loc Rivals.IDS_RewardTitle_AdventureUnlocked}" />
            <local:MappingConverterEntry Key="online_adventure_racing" Value="{local:Loc Rivals.IDS_RewardTitle_AdventureUnlocked}" />
            <local:MappingConverterEntry Key="online_adventure_drift" Value="{local:Loc Rivals.IDS_RewardTitle_AdventureUnlocked}" />
        </local:MappingConverter>

    <Style x:Key="A_Style_FZMaterial_SmallRewardTypeToIcon"
           TargetType="local:FZMaterial">
        <Setter Property="ImageSource"
                Value="{Binding RewardType, Converter={StaticResource A_Converter_RewardTypeToIcon}}" />
        <Style.Triggers>
            <DataTrigger Binding="{Binding IsEventReward}"
                         Value="True">
                <Setter Property="ImageSource"
                        Value="{Binding DataContext.Progress.ThreadName, RelativeSource={RelativeSource FindAncestor, AncestorType=ItemsControl}, Converter={StaticResource A_Converter_ThreadNameToThreadIcon}}" />
            </DataTrigger>
        </Style.Triggers>
    </Style>

    <local:FZMaterialPresetGlassRoundtangle x:Key="A_FZMaterialPresetGlassRoundtangle_GlassPanel_SmallReward"
                                            BasedOn="{StaticResource A_FZMaterialPresetGlassRoundtangle_GlassPanel_OuterRightOnly}"
                                            BlurAmount="High" />

    <local:MultiConverter x:Key="A_Converter_RewardTypeToStringUpper">
        <local:MultiConverterEntry Converter="{StaticResource A_Converter_RewardTypeToNewString}" />
        <local:MultiConverterEntry Converter="{StaticResource A_StringToUpper}" />
    </local:MultiConverter>

    <Style x:Key="A_Style_FZTextblock_SmallRewardString"
           TargetType="local:FZTextBlock">
        <Setter Property="Text"
                Value="{Binding RewardType, Converter={StaticResource A_Converter_RewardTypeToStringUpper}}" />
        <Style.Triggers>
            <DataTrigger Binding="{Binding IsEventReward}"
                         Value="True">
                <Setter Property="Text"
                        Value="{Binding DataContext.Progress.ThreadName, RelativeSource={RelativeSource FindAncestor, AncestorType=ItemsControl}, Converter={StaticResource A_Converter_ThreadRewardToUnlockText_Plural}}" />
            </DataTrigger>
            <DataTrigger Binding="{Binding EventsUnlocked}"
                         Value="1">
                <Setter Property="Text"
                        Value="{Binding DataContext.Progress.ThreadName, RelativeSource={RelativeSource FindAncestor, AncestorType=ItemsControl}, Converter={StaticResource A_Converter_ThreadRewardToUnlockText}}" />
            </DataTrigger>
        </Style.Triggers>
    </Style>

    <DataTemplate x:Key="A_DataTemplate_SmallReward">
        <DockPanel Margin="0,0,0,7">
            <local:FZMaterial Style="{StaticResource A_Style_FZMaterial_SmallRewardBacking}"
                              Width="71"
                              Height="71"
                              DockPanel.Dock="Left">
                <local:FZMaterial Style="{StaticResource A_Style_FZMaterial_SmallRewardTypeToIcon}" />
            </local:FZMaterial>
            <local:FZMaterial Preset="{StaticResource A_FZMaterialPresetGlassRoundtangle_GlassPanel_SmallReward}"
                              Color="#4D000000"
                              Height="71"
                              Width="290">
                <StackPanel VerticalAlignment="Center"
                            Margin="10,0">
                    <local:FZTextBlock Style="{StaticResource A_Style_FZTextblock_SmallRewardString}"
                                       FontFamily="Horizon_C"
                                       CapHeight="16"
                                       Color="#FFFFFF"
                                       HorizontalAlignment="Center" />
                    <Decorator Height="8"
                               Visibility="{Binding IsEventReward, Converter={StaticResource A_FZBooleanToVisibilityConverter_Inverse}}" />
                    <local:FZTextBlock Text="{Binding Description}"
                                       Visibility="{Binding IsEventReward, Converter={StaticResource A_FZBooleanToVisibilityConverter_Inverse}}"
                                       FontFamily="Horizon_D"
                                       CapHeight="16"
                                       Color="#FFFFFF"
                                       HorizontalAlignment="Center" />
                </StackPanel>
            </local:FZMaterial>
        </DockPanel>
    </DataTemplate>

</ResourceDictionary>
