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

    <System:TimeSpan x:Key="A_TimeSpan_LeagueProgress_ProgressBar_BlendValueDuration">0:0:0.75</System:TimeSpan>

    <local:OffsetKeyTime x:Key="A_KeyTime_ProgressBar_BlendValueEnd_Relative"
                         KeyTime="0:0:0.0"
                         Offset="{StaticResource A_TimeSpan_LeagueProgress_ProgressBar_BlendValueDuration}" />

    <ExponentialEase x:Key="A_EasingFunction_LeagueProgress_BlendValue_LeagueUnchanged" EasingMode="EaseInOut"/>
    <ExponentialEase x:Key="A_EasingFunction_LeagueProgress_BlendValue_LeagueChanged" EasingMode="EaseIn"/>

    <local:UIStoryboard x:Key="A_Storyboard_ProgressBar_BlendValueInputChanged_LeagueUnchanged">
        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="{x:Null}"
                                       FillBehavior="Stop"
                                       Storyboard.TargetProperty="(local:BlendValue.Blend)">
            <DiscreteDoubleKeyFrame KeyTime="0:0:0.0"
                                    Value="0" />
            <EasingDoubleKeyFrame KeyTime="{StaticResource A_KeyTime_ProgressBar_BlendValueEnd_Relative}"
                                  Value="1"
                                  EasingFunction="{StaticResource A_EasingFunction_LeagueProgress_BlendValue_LeagueUnchanged}" />
        </DoubleAnimationUsingKeyFrames>
    </local:UIStoryboard>

    <local:UIStoryboard x:Key="A_Storyboard_ProgressBar_BlendValueInputChanged_LeagueChanged">
        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="{x:Null}"
                                       FillBehavior="Stop"
                                       Storyboard.TargetProperty="(local:BlendValue.Blend)">
            <DiscreteDoubleKeyFrame KeyTime="0:0:0.0"
                                    Value="0" />
            <EasingDoubleKeyFrame KeyTime="{StaticResource A_KeyTime_ProgressBar_BlendValueEnd_Relative}"
                                  Value="1"
                                  EasingFunction="{StaticResource A_EasingFunction_LeagueProgress_BlendValue_LeagueChanged}" />
        </DoubleAnimationUsingKeyFrames>
    </local:UIStoryboard>

    <local:MappingConverter x:Key="A_Converter_LeagueChangeStatesToBlendValueChangedStoryboard"
                            Default="{StaticResource A_Storyboard_ProgressBar_BlendValueInputChanged_LeagueUnchanged}">
        <local:MappingConverterEntry Key="{x:Static local:LeagueChangeStates.Promoted}"
                                     Value="{StaticResource A_Storyboard_ProgressBar_BlendValueInputChanged_LeagueChanged}" />
        <local:MappingConverterEntry Key="{x:Static local:LeagueChangeStates.Demoted}"
                                     Value="{StaticResource A_Storyboard_ProgressBar_BlendValueInputChanged_LeagueChanged}" />
        <local:MappingConverterEntry Key="{x:Static local:LeagueChangeStates.Qualified}"
                                     Value="{StaticResource A_Storyboard_ProgressBar_BlendValueInputChanged_LeagueChanged}" />
    </local:MappingConverter>


    <ControlTemplate x:Key="A_ControlTemplate_LeagueRank_Emblem_Small" TargetType="Control">
        <ControlTemplate.Resources>
            <local:MappingConverter x:Key="A_MappingConverter_League_To_Emblem_Small" Default="/ForzaUI;component/Textures/Data_Bound/LeagueIcon/Small/Unranked.png">
                <local:MappingConverterEntry Key="20" Value="/ForzaUI;component/Textures/Data_Bound/LeagueIcon/Small/1.png" />
                <local:MappingConverterEntry Key="19" Value="/ForzaUI;component/Textures/Data_Bound/LeagueIcon/Small/2.png" />
                <local:MappingConverterEntry Key="18" Value="/ForzaUI;component/Textures/Data_Bound/LeagueIcon/Small/3.png" />
                <local:MappingConverterEntry Key="17" Value="/ForzaUI;component/Textures/Data_Bound/LeagueIcon/Small/4.png" />
                <local:MappingConverterEntry Key="16" Value="/ForzaUI;component/Textures/Data_Bound/LeagueIcon/Small/5.png" />
                <local:MappingConverterEntry Key="15" Value="/ForzaUI;component/Textures/Data_Bound/LeagueIcon/Small/6.png" />
                <local:MappingConverterEntry Key="14" Value="/ForzaUI;component/Textures/Data_Bound/LeagueIcon/Small/7.png" />
                <local:MappingConverterEntry Key="13" Value="/ForzaUI;component/Textures/Data_Bound/LeagueIcon/Small/8.png" />
                <local:MappingConverterEntry Key="12" Value="/ForzaUI;component/Textures/Data_Bound/LeagueIcon/Small/9.png" />
                <local:MappingConverterEntry Key="11" Value="/ForzaUI;component/Textures/Data_Bound/LeagueIcon/Small/10.png" />
                <local:MappingConverterEntry Key="10" Value="/ForzaUI;component/Textures/Data_Bound/LeagueIcon/Small/11.png" />
                <local:MappingConverterEntry Key="9" Value="/ForzaUI;component/Textures/Data_Bound/LeagueIcon/Small/12.png" />
                <local:MappingConverterEntry Key="8" Value="/ForzaUI;component/Textures/Data_Bound/LeagueIcon/Small/13.png" />
                <local:MappingConverterEntry Key="7" Value="/ForzaUI;component/Textures/Data_Bound/LeagueIcon/Small/14.png" />
                <local:MappingConverterEntry Key="6" Value="/ForzaUI;component/Textures/Data_Bound/LeagueIcon/Small/15.png" />
                <local:MappingConverterEntry Key="5" Value="/ForzaUI;component/Textures/Data_Bound/LeagueIcon/Small/16.png" />
                <local:MappingConverterEntry Key="4" Value="/ForzaUI;component/Textures/Data_Bound/LeagueIcon/Small/17.png" />
                <local:MappingConverterEntry Key="3" Value="/ForzaUI;component/Textures/Data_Bound/LeagueIcon/Small/18.png" />
                <local:MappingConverterEntry Key="2" Value="/ForzaUI;component/Textures/Data_Bound/LeagueIcon/Small/19.png" />
                <local:MappingConverterEntry Key="1" Value="/ForzaUI;component/Textures/Data_Bound/LeagueIcon/Small/20.png" />
                <local:MappingConverterEntry Key="0" Value="/ForzaUI;component/Textures/Data_Bound/LeagueIcon/Small/21.png" />
            </local:MappingConverter>
        </ControlTemplate.Resources>
        <Viewbox>
            <local:FZMaterial Color="#FFFFFFFF" ImageSource="{Binding LeagueRank, Converter={StaticResource A_MappingConverter_League_To_Emblem_Small}}"
                              Stretch="Uniform" VerticalAlignment="Center" Width="32" Height="32"/>
        </Viewbox>
    </ControlTemplate>

    <local:MappingConverter x:Key="A_MappingConverter_League_To_Emblem_Small" Default="/ForzaUI;component/Textures/Data_Bound/LeagueIcon/Small/SR_League_Emblem_Unranked.png">
        <local:MappingConverterEntry Key="20" Value="/ForzaUI;component/Textures/Data_Bound/LeagueIcon/Small/SR_League_Emblem_20.png" />
        <local:MappingConverterEntry Key="19" Value="/ForzaUI;component/Textures/Data_Bound/LeagueIcon/Small/SR_League_Emblem_19.png" />
        <local:MappingConverterEntry Key="18" Value="/ForzaUI;component/Textures/Data_Bound/LeagueIcon/Small/SR_League_Emblem_18.png" />
        <local:MappingConverterEntry Key="17" Value="/ForzaUI;component/Textures/Data_Bound/LeagueIcon/Small/SR_League_Emblem_17.png" />
        <local:MappingConverterEntry Key="16" Value="/ForzaUI;component/Textures/Data_Bound/LeagueIcon/Small/SR_League_Emblem_16.png" />
        <local:MappingConverterEntry Key="15" Value="/ForzaUI;component/Textures/Data_Bound/LeagueIcon/Small/SR_League_Emblem_15.png" />
        <local:MappingConverterEntry Key="14" Value="/ForzaUI;component/Textures/Data_Bound/LeagueIcon/Small/SR_League_Emblem_14.png" />
        <local:MappingConverterEntry Key="13" Value="/ForzaUI;component/Textures/Data_Bound/LeagueIcon/Small/SR_League_Emblem_13.png" />
        <local:MappingConverterEntry Key="12" Value="/ForzaUI;component/Textures/Data_Bound/LeagueIcon/Small/SR_League_Emblem_12.png" />
        <local:MappingConverterEntry Key="11" Value="/ForzaUI;component/Textures/Data_Bound/LeagueIcon/Small/SR_League_Emblem_11.png" />
        <local:MappingConverterEntry Key="10" Value="/ForzaUI;component/Textures/Data_Bound/LeagueIcon/Small/SR_League_Emblem_10.png" />
        <local:MappingConverterEntry Key="9" Value="/ForzaUI;component/Textures/Data_Bound/LeagueIcon/Small/SR_League_Emblem_9.png" />
        <local:MappingConverterEntry Key="8" Value="/ForzaUI;component/Textures/Data_Bound/LeagueIcon/Small/SR_League_Emblem_8.png" />
        <local:MappingConverterEntry Key="7" Value="/ForzaUI;component/Textures/Data_Bound/LeagueIcon/Small/SR_League_Emblem_7.png" />
        <local:MappingConverterEntry Key="6" Value="/ForzaUI;component/Textures/Data_Bound/LeagueIcon/Small/SR_League_Emblem_6.png" />
        <local:MappingConverterEntry Key="5" Value="/ForzaUI;component/Textures/Data_Bound/LeagueIcon/Small/SR_League_Emblem_5.png" />
        <local:MappingConverterEntry Key="4" Value="/ForzaUI;component/Textures/Data_Bound/LeagueIcon/Small/SR_League_Emblem_4.png" />
        <local:MappingConverterEntry Key="3" Value="/ForzaUI;component/Textures/Data_Bound/LeagueIcon/Small/SR_League_Emblem_3.png" />
        <local:MappingConverterEntry Key="2" Value="/ForzaUI;component/Textures/Data_Bound/LeagueIcon/Small/SR_League_Emblem_2.png" />
        <local:MappingConverterEntry Key="1" Value="/ForzaUI;component/Textures/Data_Bound/LeagueIcon/Small/SR_League_Emblem_1.png" />
        <local:MappingConverterEntry Key="0" Value="/ForzaUI;component/Textures/Data_Bound/LeagueIcon/Small/SR_League_Emblem_Grandmaster.png" />
    </local:MappingConverter>

    <local:MappingConverter x:Key="A_MappingConverter_League_To_Emblem_Large" Default="/ForzaUI;component/Textures/Data_Bound/LeagueIcon/Big/SR_League_Emblem_Unranked.png">
        <local:MappingConverterEntry Key="20" Value="/ForzaUI;component/Textures/Data_Bound/LeagueIcon/Big/SR_League_Emblem_20.png" />
        <local:MappingConverterEntry Key="19" Value="/ForzaUI;component/Textures/Data_Bound/LeagueIcon/Big/SR_League_Emblem_19.png" />
        <local:MappingConverterEntry Key="18" Value="/ForzaUI;component/Textures/Data_Bound/LeagueIcon/Big/SR_League_Emblem_18.png" />
        <local:MappingConverterEntry Key="17" Value="/ForzaUI;component/Textures/Data_Bound/LeagueIcon/Big/SR_League_Emblem_17.png" />
        <local:MappingConverterEntry Key="16" Value="/ForzaUI;component/Textures/Data_Bound/LeagueIcon/Big/SR_League_Emblem_16.png" />
        <local:MappingConverterEntry Key="15" Value="/ForzaUI;component/Textures/Data_Bound/LeagueIcon/Big/SR_League_Emblem_15.png" />
        <local:MappingConverterEntry Key="14" Value="/ForzaUI;component/Textures/Data_Bound/LeagueIcon/Big/SR_League_Emblem_14.png" />
        <local:MappingConverterEntry Key="13" Value="/ForzaUI;component/Textures/Data_Bound/LeagueIcon/Big/SR_League_Emblem_13.png" />
        <local:MappingConverterEntry Key="12" Value="/ForzaUI;component/Textures/Data_Bound/LeagueIcon/Big/SR_League_Emblem_12.png" />
        <local:MappingConverterEntry Key="11" Value="/ForzaUI;component/Textures/Data_Bound/LeagueIcon/Big/SR_League_Emblem_11.png" />
        <local:MappingConverterEntry Key="10" Value="/ForzaUI;component/Textures/Data_Bound/LeagueIcon/Big/SR_League_Emblem_10.png" />
        <local:MappingConverterEntry Key="9" Value="/ForzaUI;component/Textures/Data_Bound/LeagueIcon/Big/SR_League_Emblem_9.png" />
        <local:MappingConverterEntry Key="8" Value="/ForzaUI;component/Textures/Data_Bound/LeagueIcon/Big/SR_League_Emblem_8.png" />
        <local:MappingConverterEntry Key="7" Value="/ForzaUI;component/Textures/Data_Bound/LeagueIcon/Big/SR_League_Emblem_7.png" />
        <local:MappingConverterEntry Key="6" Value="/ForzaUI;component/Textures/Data_Bound/LeagueIcon/Big/SR_League_Emblem_6.png" />
        <local:MappingConverterEntry Key="5" Value="/ForzaUI;component/Textures/Data_Bound/LeagueIcon/Big/SR_League_Emblem_5.png" />
        <local:MappingConverterEntry Key="4" Value="/ForzaUI;component/Textures/Data_Bound/LeagueIcon/Big/SR_League_Emblem_4.png" />
        <local:MappingConverterEntry Key="3" Value="/ForzaUI;component/Textures/Data_Bound/LeagueIcon/Big/SR_League_Emblem_3.png" />
        <local:MappingConverterEntry Key="2" Value="/ForzaUI;component/Textures/Data_Bound/LeagueIcon/Big/SR_League_Emblem_2.png" />
        <local:MappingConverterEntry Key="1" Value="/ForzaUI;component/Textures/Data_Bound/LeagueIcon/Big/SR_League_Emblem_1.png" />
        <local:MappingConverterEntry Key="0" Value="/ForzaUI;component/Textures/Data_Bound/LeagueIcon/Big/SR_League_Emblem_Grandmaster.png" />
    </local:MappingConverter>

    <ControlTemplate x:Key="A_ControlTemplate_LeagueRank_Emblem_Large" TargetType="Control">
        <Viewbox>
            <local:FZMaterial Color="#FFFFFFFF" ImageSource="{Binding LeagueRank, Converter={StaticResource A_MappingConverter_League_To_Emblem_Large}}"
                              Stretch="Uniform" HorizontalAlignment="Center" VerticalAlignment="Center" Width="200" Height="200"/>
        </Viewbox>
    </ControlTemplate>
    <ControlTemplate x:Key="A_ControlTemplate_HighestLeagueEmblem_Large" TargetType="Control">
        <Viewbox>
            <local:FZMaterial Color="#FFFFFFFF" ImageSource="{Binding HighestAchievedLeague, Converter={StaticResource A_MappingConverter_League_To_Emblem_Large}}"
                              Stretch="Uniform" HorizontalAlignment="Center" VerticalAlignment="Center" Width="200" Height="200"/>
        </Viewbox>
    </ControlTemplate>

    <Style x:Key="A_Style_Control_LeagueEmblem_Small" TargetType="Control">
        <Setter Property="Visibility" Value="Visible"/>
        <Setter Property="Focusable" Value="False"/>
        <Setter Property="Width" Value="32"/>
        <Setter Property="Height" Value="32"/>
        <Setter Property="Template" Value="{StaticResource A_ControlTemplate_LeagueRank_Emblem_Small}"/>
    </Style>
    <Style x:Key="A_Style_Control_LeagueEmblem_Big" TargetType="Control">
        <Setter Property="Visibility" Value="Visible"/>
        <Setter Property="Focusable" Value="False"/>
        <Setter Property="Width" Value="200"/>
        <Setter Property="Height" Value="200"/>
        <Setter Property="Template" Value="{StaticResource A_ControlTemplate_LeagueRank_Emblem_Large}"/>
    </Style>
    <Style x:Key="A_Style_Control_HighestLeague_Emblem_Big" TargetType="Control" BasedOn="{StaticResource A_Style_Control_LeagueEmblem_Big}">
        <Setter Property="Template" Value="{StaticResource A_ControlTemplate_HighestLeagueEmblem_Large}"/>
    </Style>

    <local:MappingConverter x:Key="A_Converter_League_ID_To_LeagueName_MixedCase" Default="{local:Loc RoadTrip.IDS_SeriesRewards_League_Unranked}">
        <local:MappingConverterEntry Key="20" Value="{local:Loc RoadTrip.IDS_SeriesRewards_League_20}"/>
        <local:MappingConverterEntry Key="19" Value="{local:Loc RoadTrip.IDS_SeriesRewards_League_19}"/>
        <local:MappingConverterEntry Key="18" Value="{local:Loc RoadTrip.IDS_SeriesRewards_League_18}"/>
        <local:MappingConverterEntry Key="17" Value="{local:Loc RoadTrip.IDS_SeriesRewards_League_17}"/>
        <local:MappingConverterEntry Key="16" Value="{local:Loc RoadTrip.IDS_SeriesRewards_League_16}"/>
        <local:MappingConverterEntry Key="15" Value="{local:Loc RoadTrip.IDS_SeriesRewards_League_15}"/>
        <local:MappingConverterEntry Key="14" Value="{local:Loc RoadTrip.IDS_SeriesRewards_League_14}"/>
        <local:MappingConverterEntry Key="13" Value="{local:Loc RoadTrip.IDS_SeriesRewards_League_13}"/>
        <local:MappingConverterEntry Key="12" Value="{local:Loc RoadTrip.IDS_SeriesRewards_League_12}"/>
        <local:MappingConverterEntry Key="11" Value="{local:Loc RoadTrip.IDS_SeriesRewards_League_11}"/>
        <local:MappingConverterEntry Key="10" Value="{local:Loc RoadTrip.IDS_SeriesRewards_League_10}"/>
        <local:MappingConverterEntry Key="9" Value="{local:Loc RoadTrip.IDS_SeriesRewards_League_9}"/>
        <local:MappingConverterEntry Key="8" Value="{local:Loc RoadTrip.IDS_SeriesRewards_League_8}"/>
        <local:MappingConverterEntry Key="7" Value="{local:Loc RoadTrip.IDS_SeriesRewards_League_7}"/>
        <local:MappingConverterEntry Key="6" Value="{local:Loc RoadTrip.IDS_SeriesRewards_League_6}"/>
        <local:MappingConverterEntry Key="5" Value="{local:Loc RoadTrip.IDS_SeriesRewards_League_5}"/>
        <local:MappingConverterEntry Key="4" Value="{local:Loc RoadTrip.IDS_SeriesRewards_League_4}"/>
        <local:MappingConverterEntry Key="3" Value="{local:Loc RoadTrip.IDS_SeriesRewards_League_3}"/>
        <local:MappingConverterEntry Key="2" Value="{local:Loc RoadTrip.IDS_SeriesRewards_League_2}"/>
        <local:MappingConverterEntry Key="1" Value="{local:Loc RoadTrip.IDS_SeriesRewards_League_1}"/>
        <local:MappingConverterEntry Key="0" Value="{local:Loc RoadTrip.IDS_SeriesRewards_League_Grandmaster}"/>
    </local:MappingConverter>

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

    <!--Colors and Gradients for leagues. GradientA is the official color for the league. -->
    <local:FZMaterialPresetRoundtangle x:Key="A_Preset_FZMaterial_Base_League_Gradient" BasedOn="{StaticResource A_FZMaterialPreset_FlatPanel_Base}" GradientAngle="-45"/>

    <Color x:Key="A_Color_League_Tier1_GradientB">#FFFF3CBD</Color>
    <Color x:Key="A_Color_League_Tier1_GradientA">#FFCE004A</Color>
    <local:FZMaterialPresetRoundtangle x:Key="A_Preset_FZMaterial_Gradient_Tier_1" BasedOn="{StaticResource A_Preset_FZMaterial_Base_League_Gradient}"
        GradientColorA="{StaticResource A_Color_League_Tier1_GradientA}"
        GradientColorB="{StaticResource A_Color_League_Tier1_GradientB}"/>

    <Color x:Key="A_Color_League_Tier2_GradientB">#FF52C2FF</Color>
    <Color x:Key="A_Color_League_Tier2_GradientA">#FF0079D0</Color>
    <local:FZMaterialPresetRoundtangle x:Key="A_Preset_FZMaterial_Gradient_Tier_2" BasedOn="{StaticResource A_Preset_FZMaterial_Base_League_Gradient}"
        GradientColorA="{StaticResource A_Color_League_Tier2_GradientA}"
        GradientColorB="{StaticResource A_Color_League_Tier2_GradientB}"/>

    <Color x:Key="A_Color_League_Tier3_GradientB">#FF02FFDA</Color>
    <Color x:Key="A_Color_League_Tier3_GradientA">#FF01A98D</Color>
    <local:FZMaterialPresetRoundtangle x:Key="A_Preset_FZMaterial_Gradient_Tier_3" BasedOn="{StaticResource A_Preset_FZMaterial_Base_League_Gradient}"
        GradientColorA="{StaticResource A_Color_League_Tier3_GradientA}"
        GradientColorB="{StaticResource A_Color_League_Tier3_GradientB}"/>

    <Color x:Key="A_Color_League_Tier4_GradientB">#FFFFD700</Color>
    <Color x:Key="A_Color_League_Tier4_GradientA">#FFE96300</Color>
    <local:FZMaterialPresetRoundtangle x:Key="A_Preset_FZMaterial_Gradient_Tier_4" BasedOn="{StaticResource A_Preset_FZMaterial_Base_League_Gradient}"
        GradientColorA="{StaticResource A_Color_League_Tier4_GradientA}"
        GradientColorB="{StaticResource A_Color_League_Tier4_GradientB}"/>

    <Color x:Key="A_Color_League_Tier_Grandmaster_GradientB">#FFD63DFF</Color>
    <Color x:Key="A_Color_League_Tier_Grandmaster_GradientA">#FF5C67FF</Color>
    <local:FZMaterialPresetRoundtangle x:Key="A_Preset_FZMaterial_Gradient_Tier_Grandmaster" BasedOn="{StaticResource A_Preset_FZMaterial_Base_League_Gradient}"
        GradientColorA="{StaticResource A_Color_League_Tier_Grandmaster_GradientA}"
        GradientColorB="{StaticResource A_Color_League_Tier_Grandmaster_GradientB}"/>

    <Color x:Key="A_Color_League_Tier_Unranked_GradientB">#FF878787</Color>
    <Color x:Key="A_Color_League_Tier_Unranked_GradientA">#FF505050</Color>
    <local:FZMaterialPresetRoundtangle x:Key="A_Preset_FZMaterial_Gradient_Tier_Unranked" BasedOn="{StaticResource A_Preset_FZMaterial_Base_League_Gradient}"
        GradientColorA="{StaticResource A_Color_League_Tier_Unranked_GradientA}"
        GradientColorB="{StaticResource A_Color_League_Tier_Unranked_GradientB}"/>

    <local:MappingConverter x:Key="A_Converter_League_ID_To_GradientPreset" Default="{StaticResource A_Preset_FZMaterial_Gradient_Tier_Unranked}">
        <local:MappingConverterEntry Key="20" Value="{StaticResource A_Preset_FZMaterial_Gradient_Tier_1}"/>
        <local:MappingConverterEntry Key="19" Value="{StaticResource A_Preset_FZMaterial_Gradient_Tier_1}"/>
        <local:MappingConverterEntry Key="18" Value="{StaticResource A_Preset_FZMaterial_Gradient_Tier_1}"/>
        <local:MappingConverterEntry Key="17" Value="{StaticResource A_Preset_FZMaterial_Gradient_Tier_1}"/>
        <local:MappingConverterEntry Key="16" Value="{StaticResource A_Preset_FZMaterial_Gradient_Tier_1}"/>
        <local:MappingConverterEntry Key="15" Value="{StaticResource A_Preset_FZMaterial_Gradient_Tier_2}"/>
        <local:MappingConverterEntry Key="14" Value="{StaticResource A_Preset_FZMaterial_Gradient_Tier_2}"/>
        <local:MappingConverterEntry Key="13" Value="{StaticResource A_Preset_FZMaterial_Gradient_Tier_2}"/>
        <local:MappingConverterEntry Key="12" Value="{StaticResource A_Preset_FZMaterial_Gradient_Tier_2}"/>
        <local:MappingConverterEntry Key="11" Value="{StaticResource A_Preset_FZMaterial_Gradient_Tier_2}"/>
        <local:MappingConverterEntry Key="10" Value="{StaticResource A_Preset_FZMaterial_Gradient_Tier_3}"/>
        <local:MappingConverterEntry Key="9" Value="{StaticResource A_Preset_FZMaterial_Gradient_Tier_3}"/>
        <local:MappingConverterEntry Key="8" Value="{StaticResource A_Preset_FZMaterial_Gradient_Tier_3}"/>
        <local:MappingConverterEntry Key="7" Value="{StaticResource A_Preset_FZMaterial_Gradient_Tier_3}"/>
        <local:MappingConverterEntry Key="6" Value="{StaticResource A_Preset_FZMaterial_Gradient_Tier_3}"/>
        <local:MappingConverterEntry Key="5" Value="{StaticResource A_Preset_FZMaterial_Gradient_Tier_4}"/>
        <local:MappingConverterEntry Key="4" Value="{StaticResource A_Preset_FZMaterial_Gradient_Tier_4}"/>
        <local:MappingConverterEntry Key="3" Value="{StaticResource A_Preset_FZMaterial_Gradient_Tier_4}"/>
        <local:MappingConverterEntry Key="2" Value="{StaticResource A_Preset_FZMaterial_Gradient_Tier_4}"/>
        <local:MappingConverterEntry Key="1" Value="{StaticResource A_Preset_FZMaterial_Gradient_Tier_4}"/>
        <local:MappingConverterEntry Key="0" Value="{StaticResource A_Preset_FZMaterial_Gradient_Tier_Grandmaster}"/>
    </local:MappingConverter>

    <local:FZMaterialPresetRoundtangle x:Key="A_Preset_FZMaterial_Gradient_Tier_1_Horiz"
        BasedOn="{StaticResource A_Preset_FZMaterial_Gradient_Tier_1}"
        GradientAngle="90"/>
    <local:FZMaterialPresetRoundtangle x:Key="A_Preset_FZMaterial_Gradient_Tier_2_Horiz"
        BasedOn="{StaticResource A_Preset_FZMaterial_Gradient_Tier_2}"
        GradientAngle="90"/>
    <local:FZMaterialPresetRoundtangle x:Key="A_Preset_FZMaterial_Gradient_Tier_3_Horiz"
        BasedOn="{StaticResource A_Preset_FZMaterial_Gradient_Tier_3}"
        GradientAngle="90"/>
    <local:FZMaterialPresetRoundtangle x:Key="A_Preset_FZMaterial_Gradient_Tier_4_Horiz"
        BasedOn="{StaticResource A_Preset_FZMaterial_Gradient_Tier_4}"
        GradientAngle="90"/>
    <local:FZMaterialPresetRoundtangle x:Key="A_Preset_FZMaterial_Gradient_Tier_Grandmaster_Horiz"
        BasedOn="{StaticResource A_Preset_FZMaterial_Gradient_Tier_Grandmaster}"
        GradientAngle="90"/>
    <local:FZMaterialPresetRoundtangle x:Key="A_Preset_FZMaterial_Gradient_Tier_Unranked_Horiz"
        BasedOn="{StaticResource A_Preset_FZMaterial_Gradient_Tier_Unranked}"
        GradientAngle="90"/>

    <local:MappingConverter x:Key="A_Converter_League_ID_To_GradientPreset_Horiz" Default="{StaticResource A_Preset_FZMaterial_Gradient_Tier_Unranked_Horiz}">
        <local:MappingConverterEntry Key="20" Value="{StaticResource A_Preset_FZMaterial_Gradient_Tier_1_Horiz}"/>
        <local:MappingConverterEntry Key="19" Value="{StaticResource A_Preset_FZMaterial_Gradient_Tier_1_Horiz}"/>
        <local:MappingConverterEntry Key="18" Value="{StaticResource A_Preset_FZMaterial_Gradient_Tier_1_Horiz}"/>
        <local:MappingConverterEntry Key="17" Value="{StaticResource A_Preset_FZMaterial_Gradient_Tier_1_Horiz}"/>
        <local:MappingConverterEntry Key="16" Value="{StaticResource A_Preset_FZMaterial_Gradient_Tier_1_Horiz}"/>
        <local:MappingConverterEntry Key="15" Value="{StaticResource A_Preset_FZMaterial_Gradient_Tier_2_Horiz}"/>
        <local:MappingConverterEntry Key="14" Value="{StaticResource A_Preset_FZMaterial_Gradient_Tier_2_Horiz}"/>
        <local:MappingConverterEntry Key="13" Value="{StaticResource A_Preset_FZMaterial_Gradient_Tier_2_Horiz}"/>
        <local:MappingConverterEntry Key="12" Value="{StaticResource A_Preset_FZMaterial_Gradient_Tier_2_Horiz}"/>
        <local:MappingConverterEntry Key="11" Value="{StaticResource A_Preset_FZMaterial_Gradient_Tier_2_Horiz}"/>
        <local:MappingConverterEntry Key="10" Value="{StaticResource A_Preset_FZMaterial_Gradient_Tier_3_Horiz}"/>
        <local:MappingConverterEntry Key="9" Value="{StaticResource A_Preset_FZMaterial_Gradient_Tier_3_Horiz}"/>
        <local:MappingConverterEntry Key="8" Value="{StaticResource A_Preset_FZMaterial_Gradient_Tier_3_Horiz}"/>
        <local:MappingConverterEntry Key="7" Value="{StaticResource A_Preset_FZMaterial_Gradient_Tier_3_Horiz}"/>
        <local:MappingConverterEntry Key="6" Value="{StaticResource A_Preset_FZMaterial_Gradient_Tier_3_Horiz}"/>
        <local:MappingConverterEntry Key="5" Value="{StaticResource A_Preset_FZMaterial_Gradient_Tier_4_Horiz}"/>
        <local:MappingConverterEntry Key="4" Value="{StaticResource A_Preset_FZMaterial_Gradient_Tier_4_Horiz}"/>
        <local:MappingConverterEntry Key="3" Value="{StaticResource A_Preset_FZMaterial_Gradient_Tier_4_Horiz}"/>
        <local:MappingConverterEntry Key="2" Value="{StaticResource A_Preset_FZMaterial_Gradient_Tier_4_Horiz}"/>
        <local:MappingConverterEntry Key="1" Value="{StaticResource A_Preset_FZMaterial_Gradient_Tier_4_Horiz}"/>
        <local:MappingConverterEntry Key="0" Value="{StaticResource A_Preset_FZMaterial_Gradient_Tier_Unranked_Horiz}"/>
    </local:MappingConverter>

    <local:MappingConverter x:Key="A_Converter_League_ID_To_TierColor" Default="{StaticResource A_Color_League_Tier_Unranked_GradientA}">
        <local:MappingConverterEntry Key="20" Value="{StaticResource A_Color_League_Tier1_GradientA}"/>
        <local:MappingConverterEntry Key="19" Value="{StaticResource A_Color_League_Tier1_GradientA}"/>
        <local:MappingConverterEntry Key="18" Value="{StaticResource A_Color_League_Tier1_GradientA}"/>
        <local:MappingConverterEntry Key="17" Value="{StaticResource A_Color_League_Tier1_GradientA}"/>
        <local:MappingConverterEntry Key="16" Value="{StaticResource A_Color_League_Tier1_GradientA}"/>
        <local:MappingConverterEntry Key="15" Value="{StaticResource A_Color_League_Tier2_GradientA}"/>
        <local:MappingConverterEntry Key="14" Value="{StaticResource A_Color_League_Tier2_GradientA}"/>
        <local:MappingConverterEntry Key="13" Value="{StaticResource A_Color_League_Tier2_GradientA}"/>
        <local:MappingConverterEntry Key="12" Value="{StaticResource A_Color_League_Tier2_GradientA}"/>
        <local:MappingConverterEntry Key="11" Value="{StaticResource A_Color_League_Tier2_GradientA}"/>
        <local:MappingConverterEntry Key="10" Value="{StaticResource A_Color_League_Tier3_GradientA}"/>
        <local:MappingConverterEntry Key="9" Value="{StaticResource A_Color_League_Tier3_GradientA}"/>
        <local:MappingConverterEntry Key="8" Value="{StaticResource A_Color_League_Tier3_GradientA}"/>
        <local:MappingConverterEntry Key="7" Value="{StaticResource A_Color_League_Tier3_GradientA}"/>
        <local:MappingConverterEntry Key="6" Value="{StaticResource A_Color_League_Tier3_GradientA}"/>
        <local:MappingConverterEntry Key="5" Value="{StaticResource A_Color_League_Tier4_GradientA}"/>
        <local:MappingConverterEntry Key="4" Value="{StaticResource A_Color_League_Tier4_GradientA}"/>
        <local:MappingConverterEntry Key="3" Value="{StaticResource A_Color_League_Tier4_GradientA}"/>
        <local:MappingConverterEntry Key="2" Value="{StaticResource A_Color_League_Tier4_GradientA}"/>
        <local:MappingConverterEntry Key="1" Value="{StaticResource A_Color_League_Tier4_GradientA}"/>
        <local:MappingConverterEntry Key="0" Value="{StaticResource A_Color_League_Tier_Grandmaster_GradientA}"/>
    </local:MappingConverter>

    <local:MappingConverter x:Key="A_Converter_LeagueChangeStatesToString">
        <local:MappingConverterEntry Key="{x:Static local:LeagueChangeStates.Promoted}" Value="{local:Loc InGame.IDS_PostRace_RankUp}"/>
        <local:MappingConverterEntry Key="{x:Static local:LeagueChangeStates.Demoted}" Value="{local:Loc InGame.IDS_PostRace_RankDown}"/>
        <local:MappingConverterEntry Key="{x:Static local:LeagueChangeStates.Qualified}" Value="{local:Loc InGame.IDS_PostRace_Qualified}"/>
    </local:MappingConverter>

    <!--These colors and mapping are used for league related content that lives in the leaderboard -->
    <!--Colors and Gradients for leagues on the leaderboard. GradientA is the official color for the league on the leaderboard. -->
    
    <!--DUPLICATION INTENTIONAL AS THERE ARE SLIGHTLY DIFFERENT COLORS AND ROUND-TANGLES INTENDED HERE-->    
    <local:FZMaterialPresetRoundtangle x:Key="A_Preset_FZMaterial_Base_League_Leaderboard_Gradient" BasedOn="{StaticResource A_FZMaterialPreset_FlatPanel_Base}" 
                                       CornerRadius="{StaticResource A_CornerRadius_Inner_All}"
                                       GradientAngle="90"/>

    <Color x:Key="A_Color_League_Tier1_Leaderboard_GradientB">#FFFF3CBD</Color>
    <Color x:Key="A_Color_League_Tier1_Leaderboard_GradientA">#FFCE004A</Color>
    <Color x:Key="A_Color_League_Tier1_Leaderboard_Secondary">#FF722042</Color>
    <local:FZMaterialPresetRoundtangle x:Key="A_Preset_FZMaterial_Leaderboard_Gradient_Tier_1" BasedOn="{StaticResource A_Preset_FZMaterial_Base_League_Leaderboard_Gradient}"
        GradientColorA="{StaticResource A_Color_League_Tier1_Leaderboard_GradientA}"
        GradientColorB="{StaticResource A_Color_League_Tier1_Leaderboard_GradientB}"/>

    <Color x:Key="A_Color_League_Tier2_Leaderboard_GradientB">#FF52C2FF</Color>
    <Color x:Key="A_Color_League_Tier2_Leaderboard_GradientA">#FF0079D0</Color>
    <Color x:Key="A_Color_League_Tier2_Leaderboard_Secondary">#FF27526D</Color>
    <local:FZMaterialPresetRoundtangle x:Key="A_Preset_FZMaterial_Leaderboard_Gradient_Tier_2" BasedOn="{StaticResource A_Preset_FZMaterial_Base_League_Leaderboard_Gradient}"
        GradientColorA="{StaticResource A_Color_League_Tier2_Leaderboard_GradientA}"
        GradientColorB="{StaticResource A_Color_League_Tier2_Leaderboard_GradientB}"/>

    <Color x:Key="A_Color_League_Tier3_Leaderboard_GradientB">#FF02FFDA</Color>
    <Color x:Key="A_Color_League_Tier3_Leaderboard_GradientA">#FF01A98D</Color>
    <Color x:Key="A_Color_League_Tier3_Leaderboard_Secondary">#FF226D5E</Color>
    <local:FZMaterialPresetRoundtangle x:Key="A_Preset_FZMaterial_Leaderboard_Gradient_Tier_3" BasedOn="{StaticResource A_Preset_FZMaterial_Base_League_Leaderboard_Gradient}"
        GradientColorA="{StaticResource A_Color_League_Tier3_Leaderboard_GradientA}"
        GradientColorB="{StaticResource A_Color_League_Tier3_Leaderboard_GradientB}"/>

    <Color x:Key="A_Color_League_Tier4_Leaderboard_GradientB">#FFFFD700</Color>
    <Color x:Key="A_Color_League_Tier4_Leaderboard_GradientA">#FFE96300</Color>
    <Color x:Key="A_Color_League_Tier4_Leaderboard_Secondary">#FFA04B12</Color>
    <local:FZMaterialPresetRoundtangle x:Key="A_Preset_FZMaterial_Leaderboard_Gradient_Tier_4" BasedOn="{StaticResource A_Preset_FZMaterial_Base_League_Leaderboard_Gradient}"
        GradientColorA="{StaticResource A_Color_League_Tier4_Leaderboard_GradientA}"
        GradientColorB="{StaticResource A_Color_League_Tier4_GradientB}"/>

    <Color x:Key="A_Color_League_Tier_Grandmaster_Leaderboard_GradientB">#FF5C67FF</Color>
    <Color x:Key="A_Color_League_Tier_Grandmaster_Leaderboard_GradientA">#FFC631BD</Color>
    <Color x:Key="A_Color_League_Tier_Grandmaster_Leaderboard_Secondary">#FF560099</Color>
    <local:FZMaterialPresetRoundtangle x:Key="A_Preset_FZMaterial_Leaderboard_Gradient_Tier_Grandmaster" BasedOn="{StaticResource A_Preset_FZMaterial_Base_League_Leaderboard_Gradient}"
        GradientColorA="{StaticResource A_Color_League_Tier_Grandmaster_Leaderboard_GradientA}"
        GradientColorB="{StaticResource A_Color_League_Tier_Grandmaster_Leaderboard_GradientB}"/>

    <Color x:Key="A_Color_League_Tier_Unranked_Leaderboard_GradientB">#FF878787</Color>
    <Color x:Key="A_Color_League_Tier_Unranked_Leaderboard_GradientA">#FF5A5A5A</Color>
    <Color x:Key="A_Color_League_Tier_Unranked_Leaderboard_Secondary">#FF3F3F3F</Color>
    <local:FZMaterialPresetRoundtangle x:Key="A_Preset_FZMaterial_Leaderboard_Gradient_Tier_Unranked" BasedOn="{StaticResource A_Preset_FZMaterial_Base_League_Leaderboard_Gradient}"
        GradientColorA="{StaticResource A_Color_League_Tier_Unranked_Leaderboard_GradientA}"
        GradientColorB="{StaticResource A_Color_League_Tier_Unranked_Leaderboard_GradientB}"/>

    <local:MappingConverter x:Key="A_Converter_League_ID_To_Leaderboard_GradientPreset" Default="{StaticResource A_Preset_FZMaterial_Leaderboard_Gradient_Tier_Unranked}">
        <local:MappingConverterEntry Key="20" Value="{StaticResource A_Preset_FZMaterial_Leaderboard_Gradient_Tier_1}"/>
        <local:MappingConverterEntry Key="19" Value="{StaticResource A_Preset_FZMaterial_Leaderboard_Gradient_Tier_1}"/>
        <local:MappingConverterEntry Key="18" Value="{StaticResource A_Preset_FZMaterial_Leaderboard_Gradient_Tier_1}"/>
        <local:MappingConverterEntry Key="17" Value="{StaticResource A_Preset_FZMaterial_Leaderboard_Gradient_Tier_1}"/>
        <local:MappingConverterEntry Key="16" Value="{StaticResource A_Preset_FZMaterial_Leaderboard_Gradient_Tier_1}"/>
        <local:MappingConverterEntry Key="15" Value="{StaticResource A_Preset_FZMaterial_Leaderboard_Gradient_Tier_2}"/>
        <local:MappingConverterEntry Key="14" Value="{StaticResource A_Preset_FZMaterial_Leaderboard_Gradient_Tier_2}"/>
        <local:MappingConverterEntry Key="13" Value="{StaticResource A_Preset_FZMaterial_Leaderboard_Gradient_Tier_2}"/>
        <local:MappingConverterEntry Key="12" Value="{StaticResource A_Preset_FZMaterial_Leaderboard_Gradient_Tier_2}"/>
        <local:MappingConverterEntry Key="11" Value="{StaticResource A_Preset_FZMaterial_Leaderboard_Gradient_Tier_2}"/>
        <local:MappingConverterEntry Key="10" Value="{StaticResource A_Preset_FZMaterial_Leaderboard_Gradient_Tier_3}"/>
        <local:MappingConverterEntry Key="9" Value="{StaticResource A_Preset_FZMaterial_Leaderboard_Gradient_Tier_3}"/>
        <local:MappingConverterEntry Key="8" Value="{StaticResource A_Preset_FZMaterial_Leaderboard_Gradient_Tier_3}"/>
        <local:MappingConverterEntry Key="7" Value="{StaticResource A_Preset_FZMaterial_Leaderboard_Gradient_Tier_3}"/>
        <local:MappingConverterEntry Key="6" Value="{StaticResource A_Preset_FZMaterial_Leaderboard_Gradient_Tier_3}"/>
        <local:MappingConverterEntry Key="5" Value="{StaticResource A_Preset_FZMaterial_Leaderboard_Gradient_Tier_4}"/>
        <local:MappingConverterEntry Key="4" Value="{StaticResource A_Preset_FZMaterial_Leaderboard_Gradient_Tier_4}"/>
        <local:MappingConverterEntry Key="3" Value="{StaticResource A_Preset_FZMaterial_Leaderboard_Gradient_Tier_4}"/>
        <local:MappingConverterEntry Key="2" Value="{StaticResource A_Preset_FZMaterial_Leaderboard_Gradient_Tier_4}"/>
        <local:MappingConverterEntry Key="1" Value="{StaticResource A_Preset_FZMaterial_Leaderboard_Gradient_Tier_4}"/>
        <local:MappingConverterEntry Key="0" Value="{StaticResource A_Preset_FZMaterial_Leaderboard_Gradient_Tier_Grandmaster}"/>
    </local:MappingConverter>

    <Color x:Key="A_Color_League_Unranked_Leaderboard_Dark">#FF3F3F3F</Color>
    <Color x:Key="A_Color_League_Tier1_Leaderboard_Dark">#FF722042</Color>
    <Color x:Key="A_Color_League_Tier2_Leaderboard_Dark">#FF27526D</Color>
    <Color x:Key="A_Color_League_Tier3_Leaderboard_Dark">#FF226D5E</Color>
    <Color x:Key="A_Color_League_Tier4_Leaderboard_Dark">#FFA04B12</Color>
    <Color x:Key="A_Color_League_Grandmaster_Leaderboard_Dark">#FF560099</Color>

    <local:MappingConverter x:Key="A_Converter_League_ID_To_Leaderboard_TierColor_Dark" Default="{StaticResource A_Color_League_Unranked_Leaderboard_Dark}">
        <local:MappingConverterEntry Key="20" Value="{StaticResource A_Color_League_Tier1_Leaderboard_Dark}"/>
        <local:MappingConverterEntry Key="19" Value="{StaticResource A_Color_League_Tier1_Leaderboard_Dark}"/>
        <local:MappingConverterEntry Key="18" Value="{StaticResource A_Color_League_Tier1_Leaderboard_Dark}"/>
        <local:MappingConverterEntry Key="17" Value="{StaticResource A_Color_League_Tier1_Leaderboard_Dark}"/>
        <local:MappingConverterEntry Key="16" Value="{StaticResource A_Color_League_Tier1_Leaderboard_Dark}"/>
        <local:MappingConverterEntry Key="15" Value="{StaticResource A_Color_League_Tier2_Leaderboard_Dark}"/>
        <local:MappingConverterEntry Key="14" Value="{StaticResource A_Color_League_Tier2_Leaderboard_Dark}"/>
        <local:MappingConverterEntry Key="13" Value="{StaticResource A_Color_League_Tier2_Leaderboard_Dark}"/>
        <local:MappingConverterEntry Key="12" Value="{StaticResource A_Color_League_Tier2_Leaderboard_Dark}"/>
        <local:MappingConverterEntry Key="11" Value="{StaticResource A_Color_League_Tier2_Leaderboard_Dark}"/>
        <local:MappingConverterEntry Key="10" Value="{StaticResource A_Color_League_Tier3_Leaderboard_Dark}"/>
        <local:MappingConverterEntry Key="9" Value="{StaticResource A_Color_League_Tier3_Leaderboard_Dark}"/>
        <local:MappingConverterEntry Key="8" Value="{StaticResource A_Color_League_Tier3_Leaderboard_Dark}"/>
        <local:MappingConverterEntry Key="7" Value="{StaticResource A_Color_League_Tier3_Leaderboard_Dark}"/>
        <local:MappingConverterEntry Key="6" Value="{StaticResource A_Color_League_Tier3_Leaderboard_Dark}"/>
        <local:MappingConverterEntry Key="5" Value="{StaticResource A_Color_League_Tier4_Leaderboard_Dark}"/>
        <local:MappingConverterEntry Key="4" Value="{StaticResource A_Color_League_Tier4_Leaderboard_Dark}"/>
        <local:MappingConverterEntry Key="3" Value="{StaticResource A_Color_League_Tier4_Leaderboard_Dark}"/>
        <local:MappingConverterEntry Key="2" Value="{StaticResource A_Color_League_Tier4_Leaderboard_Dark}"/>
        <local:MappingConverterEntry Key="1" Value="{StaticResource A_Color_League_Tier4_Leaderboard_Dark}"/>
        <local:MappingConverterEntry Key="0" Value="{StaticResource A_Color_League_Grandmaster_Leaderboard_Dark}"/>
    </local:MappingConverter>

    <local:MappingConverter x:Key="A_Converter_League_ID_To_Leaderboard_TierColor" Default="{StaticResource A_Color_League_Tier_Unranked_Leaderboard_GradientA}">
        <local:MappingConverterEntry Key="20" Value="{StaticResource A_Color_League_Tier1_Leaderboard_GradientA}"/>
        <local:MappingConverterEntry Key="19" Value="{StaticResource A_Color_League_Tier1_Leaderboard_GradientA}"/>
        <local:MappingConverterEntry Key="18" Value="{StaticResource A_Color_League_Tier1_Leaderboard_GradientA}"/>
        <local:MappingConverterEntry Key="17" Value="{StaticResource A_Color_League_Tier1_Leaderboard_GradientA}"/>
        <local:MappingConverterEntry Key="16" Value="{StaticResource A_Color_League_Tier1_Leaderboard_GradientA}"/>
        <local:MappingConverterEntry Key="15" Value="{StaticResource A_Color_League_Tier2_Leaderboard_GradientA}"/>
        <local:MappingConverterEntry Key="14" Value="{StaticResource A_Color_League_Tier2_Leaderboard_GradientA}"/>
        <local:MappingConverterEntry Key="13" Value="{StaticResource A_Color_League_Tier2_Leaderboard_GradientA}"/>
        <local:MappingConverterEntry Key="12" Value="{StaticResource A_Color_League_Tier2_Leaderboard_GradientA}"/>
        <local:MappingConverterEntry Key="11" Value="{StaticResource A_Color_League_Tier2_Leaderboard_GradientA}"/>
        <local:MappingConverterEntry Key="10" Value="{StaticResource A_Color_League_Tier3_Leaderboard_GradientA}"/>
        <local:MappingConverterEntry Key="9" Value="{StaticResource A_Color_League_Tier3_Leaderboard_GradientA}"/>
        <local:MappingConverterEntry Key="8" Value="{StaticResource A_Color_League_Tier3_Leaderboard_GradientA}"/>
        <local:MappingConverterEntry Key="7" Value="{StaticResource A_Color_League_Tier3_Leaderboard_GradientA}"/>
        <local:MappingConverterEntry Key="6" Value="{StaticResource A_Color_League_Tier3_Leaderboard_GradientA}"/>
        <local:MappingConverterEntry Key="5" Value="{StaticResource A_Color_League_Tier4_Leaderboard_GradientA}"/>
        <local:MappingConverterEntry Key="4" Value="{StaticResource A_Color_League_Tier4_Leaderboard_GradientA}"/>
        <local:MappingConverterEntry Key="3" Value="{StaticResource A_Color_League_Tier4_Leaderboard_GradientA}"/>
        <local:MappingConverterEntry Key="2" Value="{StaticResource A_Color_League_Tier4_Leaderboard_GradientA}"/>
        <local:MappingConverterEntry Key="1" Value="{StaticResource A_Color_League_Tier4_Leaderboard_GradientA}"/>
        <local:MappingConverterEntry Key="0" Value="{StaticResource A_Color_League_Tier_Grandmaster_Leaderboard_GradientA}"/>
    </local:MappingConverter>

    <ControlTemplate x:Key="A_ControlTemplate_Leaderboard_MiniLeagueIcon" TargetType="Control">
        <ControlTemplate.Resources>
            <local:MappingConverter x:Key="A_Converter_League_ID_To_Text_Offset" Default="0,0,0,0">
                <local:MappingConverterEntry Key="20" Value="0,0,0,-2"/>
                <local:MappingConverterEntry Key="19" Value="0,0,0,-2"/>
                <local:MappingConverterEntry Key="18" Value="0,0,0,-2"/>
                <local:MappingConverterEntry Key="17" Value="0,0,0,-2"/>
                <local:MappingConverterEntry Key="16" Value="0,0,0,-2"/>
            </local:MappingConverter>

            <local:MappingConverter x:Key="A_Converter_League_ID_To_Leaderboard_TierIcon_Shape" Default="/ForzaUI;component/Textures/Data_Bound/LeagueIcon/Leaderboard/Unranked.png">
                <local:MappingConverterEntry Key="20" Value="/ForzaUI;component/Textures/Data_Bound/LeagueIcon/Leaderboard/Tier1.png"/>
                <local:MappingConverterEntry Key="19" Value="/ForzaUI;component/Textures/Data_Bound/LeagueIcon/Leaderboard/Tier1.png"/>
                <local:MappingConverterEntry Key="18" Value="/ForzaUI;component/Textures/Data_Bound/LeagueIcon/Leaderboard/Tier1.png"/>
                <local:MappingConverterEntry Key="17" Value="/ForzaUI;component/Textures/Data_Bound/LeagueIcon/Leaderboard/Tier1.png"/>
                <local:MappingConverterEntry Key="16" Value="/ForzaUI;component/Textures/Data_Bound/LeagueIcon/Leaderboard/Tier1.png"/>
                <local:MappingConverterEntry Key="15" Value="/ForzaUI;component/Textures/Data_Bound/LeagueIcon/Leaderboard/Tier2.png"/>
                <local:MappingConverterEntry Key="14" Value="/ForzaUI;component/Textures/Data_Bound/LeagueIcon/Leaderboard/Tier2.png"/>
                <local:MappingConverterEntry Key="13" Value="/ForzaUI;component/Textures/Data_Bound/LeagueIcon/Leaderboard/Tier2.png"/>
                <local:MappingConverterEntry Key="12" Value="/ForzaUI;component/Textures/Data_Bound/LeagueIcon/Leaderboard/Tier2.png"/>
                <local:MappingConverterEntry Key="11" Value="/ForzaUI;component/Textures/Data_Bound/LeagueIcon/Leaderboard/Tier2.png"/>
                <local:MappingConverterEntry Key="10" Value="/ForzaUI;component/Textures/Data_Bound/LeagueIcon/Leaderboard/Tier3.png"/>
                <local:MappingConverterEntry Key="9" Value="/ForzaUI;component/Textures/Data_Bound/LeagueIcon/Leaderboard/Tier3.png"/>
                <local:MappingConverterEntry Key="8" Value="/ForzaUI;component/Textures/Data_Bound/LeagueIcon/Leaderboard/Tier3.png"/>
                <local:MappingConverterEntry Key="7" Value="/ForzaUI;component/Textures/Data_Bound/LeagueIcon/Leaderboard/Tier3.png"/>
                <local:MappingConverterEntry Key="6" Value="/ForzaUI;component/Textures/Data_Bound/LeagueIcon/Leaderboard/Tier3.png"/>
                <local:MappingConverterEntry Key="5" Value="/ForzaUI;component/Textures/Data_Bound/LeagueIcon/Leaderboard/Tier4.png"/>
                <local:MappingConverterEntry Key="4" Value="/ForzaUI;component/Textures/Data_Bound/LeagueIcon/Leaderboard/Tier4.png"/>
                <local:MappingConverterEntry Key="3" Value="/ForzaUI;component/Textures/Data_Bound/LeagueIcon/Leaderboard/Tier4.png"/>
                <local:MappingConverterEntry Key="2" Value="/ForzaUI;component/Textures/Data_Bound/LeagueIcon/Leaderboard/Tier4.png"/>
                <local:MappingConverterEntry Key="1" Value="/ForzaUI;component/Textures/Data_Bound/LeagueIcon/Leaderboard/Tier4.png"/>
                <local:MappingConverterEntry Key="0" Value="/ForzaUI;component/Textures/Data_Bound/LeagueIcon/Leaderboard/Grandmaster.png"/>
            </local:MappingConverter>
        </ControlTemplate.Resources>

        <local:FZMaterial ImageSource="{Binding LeagueRank, Converter={StaticResource A_Converter_League_ID_To_Leaderboard_TierIcon_Shape}}">
            <local:FZTextBlock x:Name="Rating" FontFamily="Horizon_A" FontSize="15" Text="{Binding LeagueRank}"
                               VerticalAlignment="Center" HorizontalAlignment="Center" Margin="{Binding LeagueRank, Converter={StaticResource A_Converter_League_ID_To_Text_Offset}}"
                               Color="{Binding LeagueRank, Converter={StaticResource A_Converter_League_ID_To_Leaderboard_TierColor}}"/>
        </local:FZMaterial>

        <ControlTemplate.Triggers>
            <DataTrigger Binding="{Binding LeagueRank}" Value="-1">
                <Setter TargetName="Rating" Property="Visibility" Value="Hidden"/>
            </DataTrigger>
            <DataTrigger Binding="{Binding LeagueRank}" Value="0">
                <Setter TargetName="Rating" Property="Visibility" Value="Hidden"/>
            </DataTrigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>
    
    
                     
</ResourceDictionary>