<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">

    <!-- Styles -->
    <Style x:Key="A_Style_FZMaterial_PerformanceStatsDelta"
           TargetType="local:FZMaterial">
        <Style.Triggers>
            <Trigger Property="Tag">
                <Trigger.Value>
                    <System:Int32>-1</System:Int32>
                    <!-- -1 IsDowngrade -->
                </Trigger.Value>
                <Setter Property="Color"
                        Value="{StaticResource A_Color_Stat_Negative}" />
            </Trigger>
            <Trigger Property="Tag">
                <Trigger.Value>
                    <System:Int32>0</System:Int32>
                    <!-- 0 IsNeutral -->
                </Trigger.Value>
                <Setter Property="Color"
                        Value="{StaticResource A_Color_Stat_Neutral}" />
            </Trigger>
            <Trigger Property="Tag">
                <Trigger.Value>
                    <System:Int32>1</System:Int32>
                    <!-- 1 IsUpgrade -->
                </Trigger.Value>
                <Setter Property="Color"
                        Value="{StaticResource A_Color_Stat_Positive}" />
            </Trigger>
        </Style.Triggers>
    </Style>

    <Style x:Key="A_Style_TextBlock_PerformanceStatsLabelText"
           TargetType="local:FZTextBlock"
           BasedOn="{StaticResource A_Style_FZTextBlock_Heading_Minimum}">
        <Setter Property="Color"
                Value="{StaticResource A_Color_SubHeader_Text}" />
        <Setter Property="HorizontalAlignment"
                Value="Left" />
        <Setter Property="VerticalAlignment"
                Value="Top" />
    </Style>

    <Style x:Key="A_Style_TextBlock_GraphLegendText"
           TargetType="local:FZTextBlock"
           BasedOn="{StaticResource A_Style_FZTextBlock_Heading_Minimum}">
        <Setter Property="Color"
                Value="{StaticResource A_Color_SubHeader_Text}" />
        <Setter Property="HorizontalAlignment"
                Value="Left" />
        <Setter Property="VerticalAlignment"
                Value="Top" />
    </Style>

    <Style x:Key="A_Style_TextBlock_PerformanceStatsDeltaText_Garage"
           TargetType="local:FZTextBlock"
           BasedOn="{StaticResource A_Style_FZTextBlock_Heading_Small}">
        <Style.Triggers>
            <Trigger Property="Tag">
                <Trigger.Value>
                    <System:Int32>-1</System:Int32>
                    <!-- -1 IsDowngrade -->
                </Trigger.Value>
                <Setter Property="Color"
                        Value="{StaticResource A_Color_Stat_Negative}" />
            </Trigger>
            <Trigger Property="Tag">
                <Trigger.Value>
                    <System:Int32>0</System:Int32>
                    <!-- 0 IsNeutral -->
                </Trigger.Value>
                <Setter Property="Color"
                        Value="{StaticResource A_Color_Stat_Neutral_Light}" />
            </Trigger>
            <Trigger Property="Tag">
                <Trigger.Value>
                    <System:Int32>1</System:Int32>
                    <!-- 1 IsUpgrade -->
                </Trigger.Value>
                <Setter Property="Color"
                        Value="{StaticResource A_Color_Stat_Positive}" />
            </Trigger>
        </Style.Triggers>
        <Setter Property="Color"
                Value="{StaticResource A_Color_SubHeader_Text}" />
        <Setter Property="FontSize"
                Value="24" />
        <Setter Property="Stretch"
                Value="Uniform" />
        <Setter Property="StretchDirection"
                Value="DownOnly" />
        <Setter Property="HorizontalAlignment"
                Value="Right" />
        <Setter Property="VerticalAlignment"
                Value="Center" />
        <Setter Property="Preset" 
                Value="{StaticResource A_FZMaterialPreset_Matte}"/>
    </Style>

    <Style x:Key="A_Style_FZTextBlock_UpgradesBasket_Header"
           TargetType="local:FZTextBlock">
        <Setter Property="FontSize"
                Value="20" />
        <Setter Property="FontFamily"
                Value="Horizon_A" />
        <Setter Property="Color"
                Value="{StaticResource A_Color_Header_Text}" />
        <Setter Property="Margin"
                Value="8,6.5" />
    </Style>

    <Style x:Key="A_Style_FZTextBlock_UpgradesBasket_Header_Animate"
           BasedOn="{StaticResource A_Style_FZTextBlock_UpgradesBasket_Header}"
           TargetType="local:FZTextBlock">
        <Style.Triggers>
            <DataTrigger Binding="{Binding Updated}">
                <DataTrigger.Value>
                    <System:Boolean>True</System:Boolean>
                </DataTrigger.Value>
                <DataTrigger.EnterActions>
                    <BeginStoryboard>
                        <Storyboard Duration="0:0:1.2" FillBehavior="Stop">
                            <StringAnimationUsingKeyFrames Storyboard.TargetProperty="(local:FZTextBlock.Text)">
                                <DiscreteStringKeyFrame KeyTime="0:0:0"
                                                        Value="{local:Loc Upgrades_flow.IDS_BasketUpdated}" />
                            </StringAnimationUsingKeyFrames>
                        </Storyboard>
                    </BeginStoryboard>
                </DataTrigger.EnterActions>
            </DataTrigger>
        </Style.Triggers>
    </Style>

    <Storyboard x:Key="A_Storyboard_BasketUpdated">
        <ColorAnimationUsingKeyFrames Storyboard.TargetProperty="Color">
            <EasingColorKeyFrame KeyTime="0:0:0"
                                 Value="{StaticResource A_Color_UpgradesBasket_Icon_Background}" />
            <EasingColorKeyFrame KeyTime="0:0:0.4"
                                 Value="{StaticResource A_Color_UpgradesBasket_Icon_Background}" />
            <EasingColorKeyFrame KeyTime="0:0:0.6"
                                 Value="#FF03fcff" />
            <EasingColorKeyFrame KeyTime="0:0:0.8"
                                 Value="{StaticResource A_Color_UpgradesBasket_Icon_Background}" />
            <EasingColorKeyFrame KeyTime="0:0:1.0"
                                 Value="#FF03fcff"  />
            <EasingColorKeyFrame KeyTime="0:0:1.2"
                                 Value="{StaticResource A_Color_UpgradesBasket_Icon_Background}" />
        </ColorAnimationUsingKeyFrames>
    </Storyboard>

    <Style x:Key="A_Style_FZTextBlock_UpgradesBasket_Value"
           TargetType="local:FZTextBlock">
        <Setter Property="CapHeight"
                Value="30" />
        <Setter Property="FontFamily"
                Value="Horizon_A" />
        <Setter Property="Color"
                Value="{StaticResource A_Color_UpgradesBasket_Value}" />
        <Setter Property="HorizontalAlignment"
                Value="Center" />
        <Setter Property="VerticalAlignment"
                Value="Center" />
        <Setter Property="Margin"
                Value="24,18" />
    </Style>

    <Style x:Key="A_Style_FZTextBlock_UpgradesBasket_Value_Animate"
           TargetType="local:FZTextBlock"
           BasedOn="{StaticResource A_Style_FZTextBlock_UpgradesBasket_Value}">
        <Style.Triggers>
            <DataTrigger Binding="{Binding Updated}">
                <DataTrigger.Value>
                    <System:Boolean>True</System:Boolean>
                </DataTrigger.Value>
                <DataTrigger.EnterActions>
                    <BeginStoryboard Storyboard="{StaticResource A_Storyboard_BasketUpdated}" />
                </DataTrigger.EnterActions>
            </DataTrigger>
        </Style.Triggers>
    </Style>

    <Style TargetType="Control"
           x:Key="A_Style_Control_CarPerfStats">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate>
                    <UniformGrid x:Name="Grid_PerformanceStats"
                                 Rows="5"
                                 Columns="2">
                        <local:FZTextBlock x:Name="TextBlock_PowerLabel"
                                           Text="{Binding Source={local:Loc CarFlow.IDS_Stat_Power}, Mode=OneWay, Converter={StaticResource A_StringToUpper}}"
                                           Style="{StaticResource A_Style_FZTextBlock_PerformanceBarsLabel_CarStats}"
                                           VerticalAlignment="Top"/>
                        <local:FZTextBlock x:Name="TextBlock_Power"
                                           Text="{Binding Tag.SimPeakPower, ConverterParameter=power, Converter={StaticResource A_NumUnitConverter_ShowUnit_0dp}, RelativeSource={RelativeSource TemplatedParent}, FallbackValue={local:Loc BarnFind.IDS_UnknownValue}}"
                                           Style="{StaticResource A_Style_TextBlock_PerformanceStatsDeltaText_Garage}"
                                           Tag="{Binding SimPeakPowerChange, FallbackValue=0}"
                                           VerticalAlignment="Top" />

                        <local:FZTextBlock x:Name="TextBlock_TorqueLabel"
                                           Text="{Binding Source={local:Loc CarFlow.IDS_Stat_Torque}, Mode=OneWay, Converter={StaticResource A_StringToUpper}}"
                                           Style="{StaticResource A_Style_FZTextBlock_PerformanceBarsLabel_CarStats}"
                                           VerticalAlignment="Top" />
                        <local:FZTextBlock x:Name="TextBlock_Torque"
                                           Text="{Binding Tag.SimPeakTorque, ConverterParameter=torque, Converter={StaticResource A_NumUnitConverter_ShowUnit_0dp}, RelativeSource={RelativeSource TemplatedParent}, FallbackValue={local:Loc BarnFind.IDS_UnknownValue}}"
                                           Style="{StaticResource A_Style_TextBlock_PerformanceStatsDeltaText_Garage}"
                                           Tag="{Binding SimPeakTorqueChange, FallbackValue=0}"
                                           VerticalAlignment="Top" />

                        <local:FZTextBlock x:Name="TextBlock_WeightLabel"
                                           Text="{Binding Source={local:Loc CarFlow.IDS_Stat_Weight}, Mode=OneWay, Converter={StaticResource A_StringToUpper}}"
                                           Style="{StaticResource A_Style_FZTextBlock_PerformanceBarsLabel_CarStats}"
                                           VerticalAlignment="Top" />
                        <local:FZTextBlock x:Name="TextBlock_Weight"
                                           Text="{Binding Tag.CurbWeight, ConverterParameter=mass, Converter={StaticResource A_NumUnitConverter_ShowUnit_0dp}, RelativeSource={RelativeSource TemplatedParent}, FallbackValue={local:Loc BarnFind.IDS_UnknownValue}}"
                                           Style="{StaticResource A_Style_TextBlock_PerformanceStatsDeltaText_Garage}"
                                           Tag="{Binding CurbWeightChange, FallbackValue=0}"
                                           VerticalAlignment="Top" />

                        <local:FZTextBlock x:Name="TextBlock_FrontLabel"
                                           Text="{Binding Source={local:Loc CarFlow.IDS_Stat_Front}, Mode=OneWay, Converter={StaticResource A_StringToUpper}}"
                                           Style="{StaticResource A_Style_FZTextBlock_PerformanceBarsLabel_CarStats}"
                                           VerticalAlignment="Top" />
                        <local:FZTextBlock x:Name="TextBlock_Front"
                                           Text="{Binding Tag.WeightDistribution, ConverterParameter=fracpercentage, Converter={StaticResource A_NumUnitConverter_ShowUnit_0dp}, RelativeSource={RelativeSource TemplatedParent}, FallbackValue={local:Loc BarnFind.IDS_UnknownValue}}"
                                           Style="{StaticResource A_Style_TextBlock_PerformanceStatsDeltaText_Garage}"
                                           Tag="{Binding WeightDistributionChange, FallbackValue=0}"
                                           VerticalAlignment="Top" />

                        <local:FZTextBlock x:Name="TextBlock_DisplacementLabel"
                                           Text="{Binding Source={local:Loc CarFlow.IDS_Stat_Displacement}, Mode=OneWay, Converter={StaticResource A_StringToUpper}}"
                                           Style="{StaticResource A_Style_FZTextBlock_PerformanceBarsLabel_CarStats}"
                                           VerticalAlignment="Top" />
                        <local:FZTextBlock x:Name="TextBlock_Displacement"
                                           Text="{Binding Tag.Displacement, Converter={StaticResource A_NumUnitConverter_ShowUnit_0dp}, RelativeSource={RelativeSource TemplatedParent}, FallbackValue={local:Loc BarnFind.IDS_UnknownValue}}"
                                           Style="{StaticResource A_Style_TextBlock_PerformanceStatsDeltaText_Garage}"
                                           Tag="{Binding DisplacementChange, FallbackValue=0}"
                                           VerticalAlignment="Top" />
                    </UniformGrid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style TargetType="local:FZMaterial"
           x:Key="A_Style_FZMaterial_BasketUpdatedAnimation">
        <Style.Triggers>
            <DataTrigger Binding="{Binding Updated}">
                <DataTrigger.Value>
                    <System:Boolean>True</System:Boolean>
                </DataTrigger.Value>
                <DataTrigger.EnterActions>
                    <BeginStoryboard Storyboard="{StaticResource A_Storyboard_BasketUpdated}" />
                </DataTrigger.EnterActions>
            </DataTrigger>
        </Style.Triggers>
    </Style>

    <Style TargetType="ContentControl"
           x:Key="A_Style_DockPanel_Basket">
        <Setter Property="DataContext"
                Value="{Binding Basket}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate>
                    <StackPanel Orientation="Horizontal"
                                HorizontalAlignment="Right"
                                VerticalAlignment="Bottom"
                                local:UIPageTransitionManager.TransitionIndex="1">
                        <StackPanel Orientation="Horizontal">
                            <local:FZMaterial Color="{StaticResource A_Color_UpgradesBasket_Icon_Background}"
                                              Preset="{StaticResource A_FZMaterialPresetRoundtangle_FlatPanel_OuterLeftOnly}"
                                              Style="{StaticResource A_Style_FZMaterial_BasketUpdatedAnimation}">
                                <local:FZMaterial Color="{StaticResource A_Color_UpgradesBasket_Icon}"
                                                  Width="64"
                                                  Height="64"
                                                  ImageSource="/ForzaUI;component/Textures/Anthem/Icons/Garage/Basket.png" />
                            </local:FZMaterial>
                            <local:FZMaterial Preset="{StaticResource A_FZMaterialPresetRoundtangle_FlatPanel_OuterRightOnly}"
                                              Color="{StaticResource A_Color_Tile_Background}"
                                              Margin="-0.5,0,0,0">
                                <local:FZTextBlock Text="{Binding BasketItems.Count}"
                                                   Style="{StaticResource A_Style_FZTextBlock_UpgradesBasket_Value}" />
                            </local:FZMaterial>
                        </StackPanel>

                        <StackPanel Orientation="Horizontal"
                                    Margin="5,0,0,0">
                            <local:FZMaterial Color="{StaticResource A_Color_UpgradesBasket_Icon_Background}"
                                              Preset="{StaticResource A_FZMaterialPresetRoundtangle_FlatPanel_OuterLeftOnly}"
                                              Style="{StaticResource A_Style_FZMaterial_BasketUpdatedAnimation}">
                                <local:FZMaterial Color="{StaticResource A_Color_UpgradesBasket_Icon}"
                                                  Width="64"
                                                  Height="64"
                                                  ImageSource="/ForzaUI;component/Textures/Anthem/Icons/Garage/Credits.png" />
                            </local:FZMaterial>
                            <local:FZMaterial Preset="{StaticResource A_FZMaterialPresetRoundtangle_FlatPanel_OuterRightOnly}"
                                              Color="{StaticResource A_Color_Tile_Background}"
                                              Margin="-0.5,0,0,0">
                                <local:FZTextBlock Text="{Binding TotalCreditCost, ConverterParameter=money, Converter={StaticResource A_NumUnitConverter_NoUnit_0dp}, FallbackValue=0}"
                                                   Style="{StaticResource A_Style_FZTextBlock_UpgradesBasket_Value}" />
                            </local:FZMaterial>
                        </StackPanel>

                        <StackPanel Orientation="Horizontal"
                                    Margin="5,0,0,0"
                                    Visibility="{Binding AreTokensEnabled, Converter={StaticResource A_FZBooleanToVisibilityConverter}, RelativeSource={RelativeSource FindAncestor, AncestorType=Page}}">
                            <local:FZMaterial Color="{StaticResource A_Color_UpgradesBasket_Icon_Background}"
                                              Preset="{StaticResource A_FZMaterialPresetRoundtangle_FlatPanel_OuterLeftOnly}"
                                              Style="{StaticResource A_Style_FZMaterial_BasketUpdatedAnimation}">
                                <local:FZMaterial Color="{StaticResource A_Color_UpgradesBasket_Icon}"
                                                  Width="64"
                                                  Height="64"
                                                  ImageSource="/ForzaUI;component/Textures/Anthem/Icons/Garage/Tokens.png" />
                            </local:FZMaterial>
                            <local:FZMaterial Preset="{StaticResource A_FZMaterialPresetRoundtangle_FlatPanel_OuterRightOnly}"
                                              Color="{StaticResource A_Color_Tile_Background}"
                                              Margin="-0.5,0,0,0">
                                <local:FZTextBlock Text="{Binding TotalTokenCost, ConverterParameter=tokenmoney, Converter={StaticResource A_NumUnitConverter_NoUnit_0dp}, FallbackValue=0}"
                                                   Style="{StaticResource A_Style_FZTextBlock_UpgradesBasket_Value}" />
                            </local:FZMaterial>
                        </StackPanel>

                        <local:EventFire x:Name="EventFire" />
                    </StackPanel>
                    <ControlTemplate.Triggers>
                        <DataTrigger Binding="{Binding Updated}">
                            <DataTrigger.Value>
                                <System:Boolean>True</System:Boolean>
                            </DataTrigger.Value>
                            <DataTrigger.EnterActions>
                                <BeginStoryboard>
                                    <Storyboard>
                                        <StringAnimationUsingKeyFrames Storyboard.TargetProperty="(local:EventFire.EventName)"
                                                                       Storyboard.TargetName="EventFire">
                                            <DiscreteStringKeyFrame KeyTime="0:0:1.2"
                                                                    Value="BasketUpdateAnimationComplete" />
                                        </StringAnimationUsingKeyFrames>
                                    </Storyboard>
                                </BeginStoryboard>
                            </DataTrigger.EnterActions>
                        </DataTrigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="A_Style_FZMaterial_PerformanceChangeArrow"
           TargetType="local:FZMaterial">
        <Style.Triggers>
            <Trigger Property="Tag">
                <Trigger.Value>
                    <System:Int32>0</System:Int32>
                    <!-- 0 IsNeutral -->
                </Trigger.Value>
                <Setter Property="Color"
                        Value="{StaticResource A_Color_Stat_Neutral}" />
                <Setter Property="Data"
                        Value="{StaticResource A_FZGeometry_Default}" />
                <Setter Property="Height"
                        Value="7" />
                <Setter Property="Width"
                        Value="22" />
            </Trigger>
            <Trigger Property="Tag">
                <Trigger.Value>
                    <System:Int32>1</System:Int32>
                    <!-- 1 IsUpgrade -->
                </Trigger.Value>
                <Setter Property="RenderTransform">
                    <Setter.Value>
                        <RotateTransform Angle="180" />
                    </Setter.Value>
                </Setter>
            </Trigger>
        </Style.Triggers>
        <Setter Property="Data"
                Value="{StaticResource A_Geometry_SpinnerArrow}" />
        <Setter Property="Color"
                Value="{StaticResource A_Color_Stat_Neutral_Light}" />
        <Setter Property="Height"
                Value="12" />
        <Setter Property="Width"
                Value="22" />
        <Setter Property="RenderTransformOrigin"
                Value="0.5,0.5" />
    </Style>

    <Style x:Key="A_Style_FZMaterial_RankContainer_Background" TargetType="local:FZMaterial">
        <Setter Property="Preset" Value="{StaticResource A_FZMaterialPresetRoundtangle_FlatPanel_InnerAll}"/>
        <Setter Property="Color" Value="#40000000"/>
        <Setter Property="Height" Value="32"/>
        <Style.Triggers>
            <DataTrigger Binding="{Binding ThreadValue, Converter={StaticResource A_CompareConverter}, ConverterParameter=24}" Value="1">
                <Setter Property="Color" Value="{StaticResource A_Color_Header_Background}"/>
            </DataTrigger>
            <DataTrigger Binding="{Binding ThreadValue, Converter={StaticResource A_CompareConverter}, ConverterParameter=49}" Value="1">
                <Setter Property="ImageSourceNoPreload" Value="/ForzaUI;component/Textures/Data_Bound/Creator_Level/Silver_Panel.png" />
                <Setter Property="Color" Value="#FFFFFFFF"/>
            </DataTrigger>
            <DataTrigger Binding="{Binding ThreadValue, Converter={StaticResource A_CompareConverter}, ConverterParameter=74}" Value="1">
                <Setter Property="ImageSourceNoPreload" Value="/ForzaUI;component/Textures/Data_Bound/Creator_Level/Gold_Panel.png" />
                <Setter Property="Color" Value="#FFFFFFFF"/>
            </DataTrigger>
    
            <DataTrigger Binding="{Binding Tag, RelativeSource={RelativeSource TemplatedParent}}" Value="{x:Static local:UGCThreadType.Blueprint}">
                <Setter Property="DataContext" Value="{Binding ThreadLevels.BlueprintThread}"/>
            </DataTrigger>
            <DataTrigger Binding="{Binding Tag, RelativeSource={RelativeSource TemplatedParent}}" Value="{x:Static local:UGCThreadType.Livery}">
                <Setter Property="DataContext" Value="{Binding ThreadLevels.LiveryThread}"/>
            </DataTrigger>
            <DataTrigger Binding="{Binding Tag, RelativeSource={RelativeSource TemplatedParent}}" Value="{x:Static local:UGCThreadType.Photo}">
                <Setter Property="DataContext" Value="{Binding ThreadLevels.PhotoThread}"/>
            </DataTrigger>
            <DataTrigger Binding="{Binding Tag, RelativeSource={RelativeSource TemplatedParent}}" Value="{x:Static local:UGCThreadType.Tuning}">
                <Setter Property="DataContext" Value="{Binding ThreadLevels.TuningThread}"/>
            </DataTrigger>
            <DataTrigger Binding="{Binding Tag, RelativeSource={RelativeSource TemplatedParent}}" Value="{x:Static local:UGCThreadType.Vinyl}">
                <Setter Property="DataContext" Value="{Binding ThreadLevels.VinylThread}"/>
            </DataTrigger>
        </Style.Triggers>
    </Style>

    <local:MappingConverter x:Key="A_Converter_ThreadTypeToIcon">
        <local:MappingConverterEntry Key="{x:Static local:UGCThreadType.Blueprint}" Value="/ForzaUI;component/Textures/Data_Bound/Creator_Level/Blueprint_Rank.png"/>
        <local:MappingConverterEntry Key="{x:Static local:UGCThreadType.Livery}" Value="/ForzaUI;component/Textures/Data_Bound/Creator_Level/Livery_Rank.png"/>
        <local:MappingConverterEntry Key="{x:Static local:UGCThreadType.Photo}" Value="/ForzaUI;component/Textures/Data_Bound/Creator_Level/Photo_Rank.png"/>
        <local:MappingConverterEntry Key="{x:Static local:UGCThreadType.Tuning}" Value="/ForzaUI;component/Textures/Data_Bound/Creator_Level/Tuning_Rank.png"/>
        <local:MappingConverterEntry Key="{x:Static local:UGCThreadType.Vinyl}" Value="/ForzaUI;component/Textures/Data_Bound/Creator_Level/Vinyl_Rank.png"/>
    </local:MappingConverter>
    
    <Style x:Key="A_Style_UGC_Text_Style" TargetType="local:FZTextBlock" BasedOn="{StaticResource A_Style_FZTextBlock_HorizonA}">
        <Setter Property="Color" Value="{StaticResource A_Color_Header_Text}"/>
        <Setter Property="FontSize" Value="22"/>
        <Style.Triggers>
            <DataTrigger Binding="{Binding ThreadValue, Converter={StaticResource A_CompareConverter}, ConverterParameter=49}" Value="1">
                <Setter Property="Color" Value="{StaticResource A_Color_UGC_Alternate_Text_Color}"/>
            </DataTrigger>
            <DataTrigger Binding="{Binding DataContext, RelativeSource={RelativeSource TemplatedParent}}" Value="{x:Null}">
                <Setter Property="Visibility" Value="Hidden"/>
            </DataTrigger>
        </Style.Triggers>
    </Style>
        
    <ControlTemplate x:Key="A_ControlTemplate_RankLevel_Pill">
        <local:FZMaterial x:Name="RankPill" Style="{StaticResource A_Style_FZMaterial_RankContainer_Background}">
            <Grid>
                <local:FZMaterial ImageSource="{Binding ThreadType, Converter={StaticResource A_Converter_ThreadTypeToIcon}}"
                    HorizontalAlignment="Left"
                    GreedyMeasure="True"
                    Stretch="Uniform"/>

                <StackPanel Orientation="Horizontal" Margin="40,0,6,0">
                    <local:FZTextBlock x:Name="RankText" Text="{local:Loc Storefront.IDS_Rank}"
                        Style="{StaticResource A_Style_UGC_Text_Style}"
                        VerticalAlignment="Center"/>
                    <local:FZTextBlock x:Name="RankTextValue" Text="{Binding ThreadValue}"
                        Style="{StaticResource A_Style_UGC_Text_Style}"
                        Margin="6,0,0,0"
                        VerticalAlignment="Center"/>
                </StackPanel>
            </Grid>
        </local:FZMaterial>
    </ControlTemplate>

    <Style x:Key="A_Style_Control_UGC_Thread_Pill" TargetType="Control">
        <Setter Property="Template" Value="{StaticResource A_ControlTemplate_RankLevel_Pill}"/>
    </Style>
</ResourceDictionary>