<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">
    
    <Color x:Key="A_Color_PlayerLevel_DarkComplement_Tier1">#CECECE</Color>
    <Color x:Key="A_Color_PlayerLevel_DarkComplement_Tier2">#C6B626</Color>
    <Color x:Key="A_Color_PlayerLevel_DarkComplement_Tier3">#B75A1C</Color>
    <Color x:Key="A_Color_PlayerLevel_DarkComplement_Tier4">#1B932E</Color>
    <Color x:Key="A_Color_PlayerLevel_DarkComplement_Tier5">#1F9B8C</Color>
    <Color x:Key="A_Color_PlayerLevel_DarkComplement_Tier6">#005493</Color>
    <Color x:Key="A_Color_PlayerLevel_DarkComplement_Tier7">#651FB5</Color>
    <Color x:Key="A_Color_PlayerLevel_DarkComplement_Tier8">#A01717</Color>
    <Color x:Key="A_Color_PlayerLevel_DarkComplement_Tier9">#B72575</Color>
    <Color x:Key="A_Color_PlayerLevel_DarkComplement_Tier10">#932B0F</Color>
    <Color x:Key="A_Color_PlayerLevel_DarkComplement_Tier11">#8893A0</Color>
    <Color x:Key="A_Color_PlayerLevel_DarkComplement_Tier12">#B7852E</Color>

    <Color x:Key="A_Color_PlayerLevel_RivalsIcon_Tier1">#333333</Color>
    <Color x:Key="A_Color_PlayerLevel_RivalsIcon_Tier2">#FFFFFF</Color>
    <Color x:Key="A_Color_PlayerLevel_RivalsIcon_Tier3">#FFFFFF</Color>
    <Color x:Key="A_Color_PlayerLevel_RivalsIcon_Tier4">#FFFFFF</Color>
    <Color x:Key="A_Color_PlayerLevel_RivalsIcon_Tier5">#FFFFFF</Color>
    <Color x:Key="A_Color_PlayerLevel_RivalsIcon_Tier6">#FFFFFF</Color>
    <Color x:Key="A_Color_PlayerLevel_RivalsIcon_Tier7">#FFFFFF</Color>
    <Color x:Key="A_Color_PlayerLevel_RivalsIcon_Tier8">#FFFFFF</Color>
    <Color x:Key="A_Color_PlayerLevel_RivalsIcon_Tier9">#FFFFFF</Color>
    <Color x:Key="A_Color_PlayerLevel_RivalsIcon_Tier10">#FFFFFF</Color>
    <Color x:Key="A_Color_PlayerLevel_RivalsIcon_Tier11">#FFFFFF</Color>
    <Color x:Key="A_Color_PlayerLevel_RivalsIcon_Tier12">#FFFFFF</Color>

    <local:FZMaterialPresetRoundtangle x:Key="A_FZMaterialPreset_PlayerLevel_Panel"
                            BasedOn="{StaticResource A_FZMaterialPresetRoundtangle_FlatPanel_OuterAll}" />

    <Style x:Key="A_Style_FZTextBlock_PlayerLevelText_Base"
           TargetType="{x:Type local:FZTextBlock}"
           BasedOn="{StaticResource A_Style_FZTextBlock_HorizonC}">
        <Setter Property="HorizontalAlignment"
                Value="Center" />
        <Setter Property="VerticalAlignment"
                Value="Center" />
        <Setter Property="FontSize"
                Value="26" />
        <Setter Property="Text"
                Value="{Binding XP, Converter={StaticResource A_XPConverter}}" />
        <Setter Property="Color"
                Value="{Binding XP, Converter={StaticResource A_XPConverter_Text}}" />
    </Style>

    <Style x:Key="A_Style_FZTextBlock_PlayerLevelText_Leaderboard"
           TargetType="{x:Type local:FZTextBlock}"
           BasedOn="{StaticResource A_Style_FZTextBlock_PlayerLevelText_Base}">
        <Setter Property="FontSize"
                Value="28" />
    </Style>

    <ControlTemplate x:Key="A_ControlTemplate_PlayerLevel_Base"
                     TargetType="Control">
            <Grid>
                <local:FZMaterial Color="{Binding XP, Converter={StaticResource A_XPConverter}}"
                                  GreedyMeasure="True"
                                  Preset="{DynamicResource A_FZMaterialPreset_PlayerLevel_Panel}" />
                <Viewbox Stretch="Uniform"
                         StretchDirection="Both">
                    <Grid Width="44"
                          Height="40">
                        <local:FZTextBlock Style="{Binding (local:BindingProxy.A), RelativeSource={RelativeSource TemplatedParent}}"
                                           Margin="4" />
                    </Grid>
                </Viewbox>
            </Grid>
    </ControlTemplate>

    <local:MappingConverter x:Key="A_Converter_PrestigeLevelToVisibility"
                            Default="{x:Static Visibility.Visible}">
        <local:MappingConverterEntry Key="0" Value="{x:Static Visibility.Collapsed}" />
    </local:MappingConverter>

    <local:MultiConverter x:Key="A_Converter_PrestigeLevelToVisibilityFromXP">
        <local:MultiConverterEntry Converter="{StaticResource A_XPConverter_Prestige}" TargetType="{x:Type System:String}" />
        <local:MultiConverterEntry Converter="{StaticResource A_Converter_PrestigeLevelToVisibility}" />
    </local:MultiConverter>

    <Style x:Key="A_Style_FrameworkElement_PrestigeLevelContainer"
           TargetType="{x:Type FrameworkElement}">
        <Setter Property="Visibility" Value="{Binding PrestigeLevel, Converter={StaticResource A_Converter_PrestigeLevelToVisibility}, FallbackValue=Collapsed}" />
        <Setter Property="VerticalAlignment" Value="Center" />
    </Style>

    <Style x:Key="A_Style_FZMaterial_PrestigeIcon"
           TargetType="{x:Type local:FZMaterial}">
        <Setter Property="Width" Value="16" />
        <Setter Property="Height" Value="16" />
        <Setter Property="Margin" Value="0,0,0,1" />
        <Setter Property="ImageSourceNoPreload" Value="/ForzaUI;component/Textures/Data_Bound/PrestigeLevels/Prestige_Star.png" />
        <Style.Triggers>
            <Trigger Property="Tag" Value="Dark">
                <Setter Property="Color" Value="#969696" />
            </Trigger>
        </Style.Triggers>
    </Style>

    <Style x:Key="A_Style_FZTextBlock_PrestigeLevel"
           TargetType="{x:Type local:FZTextBlock}"
           BasedOn="{StaticResource A_Style_FZTextBlock_HorizonA}">
        <Setter Property="Text" Value="{Binding PrestigeLevel}" />
        <Setter Property="CapHeight" Value="12" />
        <Setter Property="HorizontalAlignment" Value="Center" />
        <Setter Property="Color" Value="#FFFFFF" />
        <Style.Triggers>
            <Trigger Property="Tag" Value="Dark">
                <Setter Property="Color" Value="#969696" />
            </Trigger>
        </Style.Triggers>
    </Style>

    <ControlTemplate x:Key="A_ControlTemplate_PlayerPrestigeLevel">
        <Viewbox>
            <StackPanel Style="{StaticResource A_Style_FrameworkElement_PrestigeLevelContainer}"
                        DockPanel.Dock="Left">
                <local:FZMaterial Style="{StaticResource A_Style_FZMaterial_PrestigeIcon}"
                                  Tag="{TemplateBinding Tag}" />
                <local:FZTextBlock Style="{StaticResource A_Style_FZTextBlock_PrestigeLevel}"
                                  Tag="{TemplateBinding Tag}" />
            </StackPanel>
        </Viewbox>
    </ControlTemplate>

    <Style x:Key="A_Style_Control_PlayerPrestigeLevel"
           TargetType="Control">
        <Setter Property="Visibility" Value="{Binding PrestigeLevel, Converter={StaticResource A_Converter_PrestigeLevelToVisibility}, FallbackValue=Collapsed}" />
        <Setter Property="Template" Value="{StaticResource A_ControlTemplate_PlayerPrestigeLevel}" />
        <Setter Property="Focusable" Value="False" />
        <Setter Property="Margin" Value="4,0,4,0" />
        <Setter Property="Height" Value="30" />
    </Style>

    <ControlTemplate x:Key="A_ControlTemplate_PlayerLevel_HighTier"
                     TargetType="Control">
            <Grid>
                <local:FZMaterial ImageSource="{Binding (local:BindingProxy.B), RelativeSource={RelativeSource TemplatedParent}}"
                                  GreedyMeasure="True"
                                  Preset="{DynamicResource A_FZMaterialPreset_PlayerLevel_Panel}" />
                <local:FZMaterial ImageSource="{Binding (local:BindingProxy.C), RelativeSource={RelativeSource TemplatedParent}}"
                                  GreedyMeasure="True"
                                  Preset="{DynamicResource A_FZMaterialPreset_PlayerLevel_Panel}" />
                <Viewbox Stretch="Uniform"
                         StretchDirection="Both">
                    <Grid Width="44"
                          Height="40">
                        <local:FZTextBlock Style="{Binding (local:BindingProxy.A), RelativeSource={RelativeSource TemplatedParent}}"
                                           Margin="4" />
                    </Grid>
                </Viewbox>
            </Grid>
    </ControlTemplate>

    <ControlTemplate x:Key="A_ControlTemplate_PlayerLevel_TopTier"
                     TargetType="Control">
            <Grid>
                <local:FZMaterial ImageSource="{Binding (local:BindingProxy.B), RelativeSource={RelativeSource TemplatedParent}}"
                                  GreedyMeasure="True"
                                  Preset="{DynamicResource A_FZMaterialPreset_PlayerLevel_Panel}" />
                <local:FZMaterial ImageSource="{Binding (local:BindingProxy.C), RelativeSource={RelativeSource TemplatedParent}}"
                                  GreedyMeasure="True"
                                  Preset="{DynamicResource A_FZMaterialPreset_PlayerLevel_Panel}" />
                <Viewbox Stretch="Uniform"
                         StretchDirection="Both" VerticalAlignment="Center" HorizontalAlignment="Center">
                    <Grid Width="44"
                          Height="40">
                        <local:FZMaterial ImageSource="/ForzaUI;component/Textures/Anthem/Icons/PlayerLevel/MaxIcon.png"
                                          Color="{Binding XP, Converter={StaticResource A_XPConverter_Text}}"
                                          Stretch="Uniform"
                                          GreedyMeasure="True" />
                    </Grid>
                </Viewbox>
            </Grid>
    </ControlTemplate>

    <Style x:Key="A_Style_Control_PlayerLevel_Base"
           TargetType="Control">
        <Setter Property="Visibility"
                Value="{Binding IsXPIntroduced, Converter={StaticResource A_FZBooleanToVisibilityConverter}}" />
        <Setter Property="Template"
                Value="{StaticResource A_ControlTemplate_PlayerLevel_Base}" />
        <Setter Property="local:BindingProxy.A"
                Value="{StaticResource A_Style_FZTextBlock_PlayerLevelText_Base}" />
        <Setter Property="HorizontalAlignment"
                Value="Stretch" />
        <Setter Property="VerticalAlignment"
                Value="Stretch" />
    </Style>
    
    <Style x:Key="A_Style_Control_PlayerLevel_Tier1"
           TargetType="Control"
           BasedOn="{StaticResource A_Style_Control_PlayerLevel_Base}">

    </Style>
    <Style x:Key="A_Style_Control_PlayerLevel_Tier2"
           TargetType="Control"
           BasedOn="{StaticResource A_Style_Control_PlayerLevel_Base}">
        
    </Style>
    <Style x:Key="A_Style_Control_PlayerLevel_Tier3"
           TargetType="Control"
           BasedOn="{StaticResource A_Style_Control_PlayerLevel_Base}">
        
    </Style>
    <Style x:Key="A_Style_Control_PlayerLevel_Tier4"
           TargetType="Control"
           BasedOn="{StaticResource A_Style_Control_PlayerLevel_Base}">
        
    </Style>
    <Style x:Key="A_Style_Control_PlayerLevel_Tier5"
           TargetType="Control"
           BasedOn="{StaticResource A_Style_Control_PlayerLevel_Base}">
        
    </Style>
    <Style x:Key="A_Style_Control_PlayerLevel_Tier6"
           TargetType="Control"
           BasedOn="{StaticResource A_Style_Control_PlayerLevel_Base}">
        
    </Style>
    <Style x:Key="A_Style_Control_PlayerLevel_Tier7"
           TargetType="Control"
           BasedOn="{StaticResource A_Style_Control_PlayerLevel_Base}">
        
    </Style>
    <Style x:Key="A_Style_Control_PlayerLevel_Tier8"
           TargetType="Control"
           BasedOn="{StaticResource A_Style_Control_PlayerLevel_Base}">
        
    </Style>
    <Style x:Key="A_Style_Control_PlayerLevel_Tier9"
           TargetType="Control"
           BasedOn="{StaticResource A_Style_Control_PlayerLevel_Base}">
        
    </Style>
    <Style x:Key="A_Style_Control_PlayerLevel_Tier10"
           TargetType="Control"
           BasedOn="{StaticResource A_Style_Control_PlayerLevel_Base}">
        <Setter Property="Template"
                Value="{StaticResource A_ControlTemplate_PlayerLevel_HighTier}" />
        <Setter Property="local:BindingProxy.B"
                Value="/ForzaUI;component/Textures/Anthem/Icons/PlayerLevel/bronze.png" />
        <Setter Property="local:BindingProxy.C"
                Value="/ForzaUI;component/Textures/Anthem/Icons/PlayerLevel/BronzeShine.png" />
    </Style>
    <Style x:Key="A_Style_Control_PlayerLevel_Tier11"
           TargetType="Control"
           BasedOn="{StaticResource A_Style_Control_PlayerLevel_Base}">
        <Setter Property="Template"
                Value="{StaticResource A_ControlTemplate_PlayerLevel_HighTier}" />
        <Setter Property="local:BindingProxy.B"
                Value="/ForzaUI;component/Textures/Anthem/Icons/PlayerLevel/silver.png" />
        <Setter Property="local:BindingProxy.C"
                Value="/ForzaUI;component/Textures/Anthem/Icons/PlayerLevel/EverythingShine.png" />
    </Style>
    <Style x:Key="A_Style_Control_PlayerLevel_Tier12"
           TargetType="Control"
           BasedOn="{StaticResource A_Style_Control_PlayerLevel_Base}">
        <Setter Property="Template"
                Value="{StaticResource A_ControlTemplate_PlayerLevel_HighTier}" />
        <Setter Property="local:BindingProxy.B"
                Value="/ForzaUI;component/Textures/Anthem/Icons/PlayerLevel/gold.png" />
        <Setter Property="local:BindingProxy.C"
                Value="/ForzaUI;component/Textures/Anthem/Icons/PlayerLevel/EverythingShine.png" />
    </Style>
    <Style x:Key="A_Style_Control_PlayerLevel_Tier13"
           TargetType="Control"
           BasedOn="{StaticResource A_Style_Control_PlayerLevel_Base}">
        <Setter Property="Template"
                Value="{StaticResource A_ControlTemplate_PlayerLevel_TopTier}" />
        <Setter Property="local:BindingProxy.B"
                Value="/ForzaUI;component/Textures/Anthem/Icons/PlayerLevel/plat.png" />
        <Setter Property="local:BindingProxy.C"
                Value="/ForzaUI;component/Textures/Anthem/Icons/PlayerLevel/EverythingShine.png" />
    </Style>
</ResourceDictionary>