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

    <Style x:Key="A_Style_FZTextblock_RewardPreviewText" TargetType="local:FZTextBlock">
        <Setter Property="FontFamily" Value="Horizon_A"/>
        <Setter Property="CapHeight" Value="14"/>
        <Setter Property="Color" Value="{StaticResource A_Color_White}"/>
        <Setter Property="Effect" Value="{StaticResource A_Effect_HighContrastModeDropShadow}" />
    </Style>

    <Color x:Key="A_Color_FestivalPass_Complete_Text">#BF000000</Color>

    <ColorAlias x:Key="A_Color_Reward_Text" Color="{StaticResource A_Color_HW_Dark_Blue}" />
    <ImageSource x:Key="A_BitmapImage_MissionPin_Icon">/ForzaUI;component/Textures/Data_Bound/PDLC1/MissionIcons/Parent/pinned_mission.png</ImageSource>

    <AutoScrollSettings x:Key="A_AutoScrollSettings_RewardPreviewTitle" 
        InitialPause="0:0:2.0"
        ScrollOrientation="Vertical"
        Speed="20"
        ScrollSeparation="40"/>

    <Style x:Key="A_Style_FZTextBlock_AutoScroll_RewardPreviewTitle" BasedOn="{StaticResource A_Style_FZTextblock_RewardPreviewText}" 
        TargetType="FZTextBlock">
        <Setter Property="AutoScroll" Value="{StaticResource A_AutoScrollSettings_RewardPreviewTitle}" />
        <Setter Property="AutoScroll.AllowScrolling" Value="True" />
        <Setter Property="Text" Value="{Binding Description, Converter={StaticResource A_StringToUpper}}" />
    </Style>

    <local:MappingConverter x:Key="A_Converter_Show_Reward_Icon" Default="False">
        <local:MappingConverterEntry Key="{x:Static local:UIRewardType.Credits}" Value="True" />
        <local:MappingConverterEntry Key="{x:Static local:UIRewardType.Currency}" Value="True" />
        <local:MappingConverterEntry Key="{x:Static local:UIRewardType.Horn}" Value="True" />
        <local:MappingConverterEntry Key="{x:Static local:UIRewardType.QuickChatPhrase}" Value="True" />
        <local:MappingConverterEntry Key="{x:Static local:UIRewardType.SuperWheelspin}" Value="True" />
        <local:MappingConverterEntry Key="{x:Static local:UIRewardType.Wheelspin}" Value="True" />
        <local:MappingConverterEntry Key="{x:Static local:UIRewardType.BarnFindRumour}" Value="True" />
        <local:MappingConverterEntry Key="{x:Static local:UIRewardType.SkillPoints}" Value="True" />
    </local:MappingConverter>

    <!--Custom reward icons for series rewards -->
    <local:MappingConverter x:Key="A_Converter_RewardTypeToSeriesRwardPrizeIcon">
        <local:MappingConverterEntry Key="{x:Static local:UIRewardType.Credits}" Value="/ForzaUI;component/Textures/Data_Bound/SeriesRewards/PrizeIcons/Credits_Shadow.png" />
        <local:MappingConverterEntry Key="{x:Static local:UIRewardType.Currency}" Value="/ForzaUI;component/Textures/Data_Bound/SeriesRewards/PrizeIcons/Influence_Shadow.png" />
        <local:MappingConverterEntry Key="{x:Static local:UIRewardType.Car}" Value="/ForzaUI;component/Textures/Data_Bound/SeriesRewards/PrizeIcons/Car_Shadow.png" />
        <local:MappingConverterEntry Key="{x:Static local:UIRewardType.Clothing}" Value="/ForzaUI;component/Textures/Data_Bound/SeriesRewards/PrizeIcons/Clothing_Shadow.png" />
        <local:MappingConverterEntry Key="{x:Static local:UIRewardType.Horn}" Value="/ForzaUI;component/Textures/Data_Bound/SeriesRewards/PrizeIcons/Horn_Shadow.png" />
        <local:MappingConverterEntry Key="{x:Static local:UIRewardType.QuickChatPhrase}" Value="/ForzaUI;component/Textures/Data_Bound/SeriesRewards/PrizeIcons/QuickChat_Shadow.png" />
        <local:MappingConverterEntry Key="{x:Static local:UIRewardType.Emote}" Value="/ForzaUI;component/Textures/Data_Bound/SeriesRewards/PrizeIcons/Emote_Shadow.png" />
        <local:MappingConverterEntry Key="{x:Static local:UIRewardType.SuperWheelspin}" Value="/ForzaUI;component/Textures/Data_Bound/SeriesRewards/Super_Wheelspin_Prize.png" />
        <local:MappingConverterEntry Key="{x:Static local:UIRewardType.Wheelspin}" Value="/ForzaUI;component/Textures/Data_Bound/SeriesRewards/PrizeIcons/WheelSpin_Shadow.png" />
        <local:MappingConverterEntry Key="{x:Static local:UIRewardType.BarnFindRumour}" Value="/ForzaUI;component/Textures/Data_Bound/SeriesRewards/PrizeIcons/BarnFind_Shadow.png" />
        <local:MappingConverterEntry Key="{x:Static local:UIRewardType.SkillPoints}" Value="/ForzaUI;component/Textures/Data_Bound/SeriesRewards/PrizeIcons/SkillPoint_Shadow.png" />
    </local:MappingConverter>

    <local:FZMaterialPresetRoundtangle x:Key="A_Preset_FZMaterial_Gradient_HorizonEdition"
        BasedOn="{StaticResource A_FZMaterialPreset_FlatPanel_Base}"
        CornerRadius="{StaticResource A_CornerRadius_InnerInner_Top}"
        GradientColorA="{StaticResource A_Color_HorizonEditionGradientA}"
        GradientColorB="{StaticResource A_Color_HorizonEditionGradientB}"
        GradientAngle="90"/>

    <local:FZMaterialPresetRoundtangle x:Key="A_Preset_FZMaterial_Gradient_HorizonEdition_Desaturated"
        BasedOn="{StaticResource A_FZMaterialPreset_FlatPanel_Base}"
        CornerRadius="{StaticResource A_CornerRadius_InnerInner_Top}"
        GradientColorA="{StaticResource A_Color_HorizonEditionGradientA_Desaturated}"
        GradientColorB="{StaticResource A_Color_HorizonEditionGradientB_Desaturated}"
        GradientAngle="90"/>

    <local:MappingConverter x:Key="A_Converter_Index_To_GoldState" Default="{x:Null}">
        <local:MappingConverterEntry Key="0" Value="/ForzaUI;component/Textures/Data_Bound/SeriesRewards/Gold_Border_Prize_1.png" />
        <local:MappingConverterEntry Key="1" Value="/ForzaUI;component/Textures/Data_Bound/SeriesRewards/Gold_Border_Prize_2.png" />
        <local:MappingConverterEntry Key="2" Value="/ForzaUI;component/Textures/Data_Bound/SeriesRewards/Gold_Border_Prize_3.png" />
        <local:MappingConverterEntry Key="3" Value="/ForzaUI;component/Textures/Data_Bound/SeriesRewards/Gold_Border_Prize_4.png" />
    </local:MappingConverter>

    <Style x:Key="A_Style_FZMaterial_FlatPanel_Tile_PreviewReward" TargetType="local:FZMaterial" BasedOn="{StaticResource A_Style_FZMaterial_FlatPanel_Tile}">
        <Setter Property="Preset" Value="{StaticResource A_FZMaterialPresetRoundtangle_FlatPanel_InnerAll}"/>
    </Style>

    <local:MappingConverter x:Key="A_Converter_RewardTypeToUIColor" Default="False">
        <local:MappingConverterEntry Key="{x:Static local:UIRewardType.QuickChatPhrase}" Value="True" />
        <local:MappingConverterEntry Key="{x:Static local:UIRewardType.SuperWheelspin}" Value="True" />
        <local:MappingConverterEntry Key="{x:Static local:UIRewardType.Wheelspin}" Value="True" />
    </local:MappingConverter>

    <DataTemplate DataType="local:XAMLReward">
        <local:FZMaterial Width="178" Height="178" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="0,0,8,0"  Style="{StaticResource A_Style_FZMaterial_FlatPanel_Tile_PreviewReward}">
            <Grid>
                <Grid x:Name="Content" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Margin="6">
                    <local:FZMaterial x:Name="RewardImageShadowBackground" ImageSource="/ForzaUI;component/Textures/Data_Bound/SeriesRewards/Gradient_BG.png"/>

                    <local:FZMaterial x:Name="PrizeRarityBackground" Visibility="Hidden" Preset="{StaticResource A_FZMaterialPresetRoundtangle_FlatPanel_InnerInnerAll}"
                                        Color="{Binding Rarity, Converter={StaticResource A_Converter_RarityToColor}}" />
                    <local:FZMaterial x:Name="PrizeRarityDarkTint" Visibility="Hidden" Preset="{StaticResource A_FZMaterialPresetRoundtangle_FlatPanel_InnerInnerAll}"
                                        Color="#FF000000" Opacity="0.2" />

                    <local:FZMaterial x:Name="RewardImage" Visibility="Visible" ImageSource="{Binding Thumbnail}" Margin="2,0,2,-42"
                                        Width="132" Height="132"
                                        VerticalAlignment="Center" HorizontalAlignment="Center"
                                        Effect="{Binding RewardType, Converter={StaticResource H_Converter_RewardTypeToIconEffect}}"/>

                    <local:FZMaterial x:Name="RewardTypeImage" ImageSource="{Binding RewardType, Converter={StaticResource A_Converter_RewardTypeToSeriesRwardPrizeIcon}}"
                                            VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Color="{StaticResource A_Color_White}" Preset="{StaticResource A_FZMaterialPresetRoundtangle_FlatPanel_InnerInnerAll}"
                                            Stretch="Uniform" Visibility="Hidden"/>

                    <local:FZMaterial x:Name="HeaderPanel" Preset="{StaticResource A_FZMaterialPresetRoundtangle_FlatPanel_InnerInnerTopOnly}"
                                        VerticalAlignment="Top" HorizontalAlignment="Stretch" Margin="0,0,0.5,0"
                                        Height="38" Color="{Binding Rarity, Converter={StaticResource A_Converter_RarityToColor}}"/>
                </Grid>

                <local:FZMaterial x:Name="GoldAchievedPanel" ImageSource="{Binding Path=(local:TickerItemsControlItem.Index), Converter={StaticResource A_Converter_Index_To_GoldState}}"
                                    Visibility="Hidden" Margin="6" Stretch="Uniform"/>
                
                <FZTextBlock VerticalAlignment="Top" HorizontalAlignment="Center" Margin="9,14" 
                    local:BindingProxy.A="{Binding Path=(local:BindingProxy.A), RelativeSource={RelativeSource TemplatedParent}}"/>
            </Grid>

        </local:FZMaterial>
        <DataTemplate.Triggers>
            <DataTrigger Binding="{Binding RewardType}" Value="{x:Static local:UIRewardType.Car}">
                <Setter TargetName="RewardImage" Property="ImageSource" Value="{Binding SmallThumbnail}"/>
                <Setter TargetName="RewardImage" Property="Height" Value="106"/>
                <Setter TargetName="RewardImage" Property="Margin" Value="2,0,2,-30"/>
                <Setter TargetName="RewardImage" Property="Width" Value="{Binding Height, RelativeSource={RelativeSource Self}, Converter={StaticResource A_Converter_CarThumb_Ratio}}"/>
            </DataTrigger>

            <DataTrigger Binding="{Binding RewardType,Converter={StaticResource A_Converter_Show_Reward_Icon}}" Value="True">
                <Setter TargetName="RewardTypeImage" Property="Visibility" Value="Visible"/>
                <Setter TargetName="PrizeRarityBackground" Property="Visibility" Value="Visible"/>
                <Setter TargetName="PrizeRarityDarkTint" Property="Visibility" Value="Visible"/>
                <Setter TargetName="RewardImageShadowBackground" Property="Visibility" Value="Hidden"/>
                <Setter TargetName="RewardImage" Property="Visibility" Value="Hidden"/>
            </DataTrigger>

            <!--Override image property for specific reward types -->
            <DataTrigger Binding="{Binding RewardType}" Value="{x:Static local:UIRewardType.SuperWheelspin}">
                <Setter TargetName="PrizeRarityBackground" Property="Visibility" Value="Hidden"/>
                <Setter TargetName="HeaderPanel" Property="Margin" Value="0,0,0,0"/>
            </DataTrigger>
            <DataTrigger Binding="{Binding RewardType}" Value="{x:Static local:UIRewardType.Wheelspin}">
                <Setter TargetName="PrizeRarityBackground" Property="Visibility" Value="Hidden"/>
                <Setter TargetName="HeaderPanel" Property="Margin" Value="0,0,0,0"/>
            </DataTrigger>
                    
            <!--Override color for the rewards with no rarity-->
            <DataTrigger Binding="{Binding RewardType, Converter={StaticResource A_Converter_RewardTypeToUIColor}}" Value="True">
                <Setter TargetName="PrizeRarityBackground" Property="Color" Value="{StaticResource A_Color_Header_Background}"/>
                <Setter TargetName="HeaderPanel" Property="Color" Value="{StaticResource A_Color_Header_Background}"/>
            </DataTrigger>

            <DataTrigger Binding="{Binding Rarity}" Value="{x:Static local:XAMLRarity.HorizonEdition}">
                <Setter TargetName="HeaderPanel" Property="Preset" Value="{StaticResource A_Preset_FZMaterial_Gradient_HorizonEdition}"/>
                <Setter TargetName="HeaderPanel" Property="Color" Value="#FFFFFFFF"/>
            </DataTrigger>
            
            <DataTrigger Binding="{Binding Path=(local:BindingProxy.A), RelativeSource={RelativeSource Self}}" Value="Grey">
                <Setter TargetName="PrizeRarityBackground" Property="Preset">
                    <Setter.Value>
                        <local:FZMaterialPresetRoundtangle BasedOn="{StaticResource A_FZMaterialPresetRoundtangle_FlatPanel_InnerInnerAll}" Saturation="0"/>
                    </Setter.Value>
                </Setter>
                <Setter TargetName="RewardImage" Property="Preset">
                    <Setter.Value>
                        <local:FZMaterialPresetRoundtangle Saturation="0"/>
                    </Setter.Value>
                </Setter>
                <Setter TargetName="RewardTypeImage" Property="Preset">
                    <Setter.Value>
                        <local:FZMaterialPresetRoundtangle BasedOn="{StaticResource A_FZMaterialPresetRoundtangle_FlatPanel_InnerInnerAll}" Saturation="0"/>
                    </Setter.Value>
                </Setter>
                <Setter TargetName="HeaderPanel" Property="Preset">
                    <Setter.Value>
                        <local:FZMaterialPresetRoundtangle BasedOn="{StaticResource A_FZMaterialPresetRoundtangle_FlatPanel_InnerInnerTopOnly}" Saturation="0"/>
                    </Setter.Value>
                </Setter>
            </DataTrigger>
            <DataTrigger Binding="{Binding Path=(local:BindingProxy.A), RelativeSource={RelativeSource Self}}" Value="Gold">
                <Setter TargetName="GoldAchievedPanel" Property="Visibility" Value="Visible"/>
                <Setter TargetName="HeaderPanel" Property="Visibility" Value="Hidden"/>

                <Setter TargetName="PrizeRarityBackground" Property="Margin" Value="2,1"/>
                <Setter TargetName="RewardTypeImage" Property="Margin" Value="2"/>
            </DataTrigger>

            <MultiDataTrigger>
                <MultiDataTrigger.Conditions>
                    <Condition Binding="{Binding Path=(local:BindingProxy.A), RelativeSource={RelativeSource Self}}" Value="Grey"/>
                    <Condition Binding="{Binding Rarity}" Value="{x:Static local:XAMLRarity.HorizonEdition}"/>
                </MultiDataTrigger.Conditions>
                <Setter TargetName="HeaderPanel" Property="Preset" Value="{StaticResource A_Preset_FZMaterial_Gradient_HorizonEdition_Desaturated}"/>
                <Setter TargetName="HeaderPanel" Property="Color" Value="#FFFFFFFF"/>
            </MultiDataTrigger>
        </DataTemplate.Triggers>
    </DataTemplate>

    <!-- reward handling -->
    <Style x:Key="A_Style_FZMaterial_RewardThumbnail"
           TargetType="{Type FZMaterial}">
        <Setter Property="Stretch"
                Value="Uniform" />
        <Setter Property="Visibility"
                Value="{Binding Downloaded, RelativeSource={RelativeSource Self}, Converter={FZBooleanToVisibilityConverter UseHidden=True}}" />
    </Style>

    <ControlTemplate x:Key="A_Template_DefaultRewardThumbnail">
        <FZMaterial ImageSource="{Binding Thumbnail}"
                    Effect="{Binding RewardType, Converter={StaticResource H_Converter_RewardTypeToIconEffect}}"
                    Style="{StaticResource A_Style_FZMaterial_RewardThumbnail}" />
    </ControlTemplate>

    <ControlTemplate x:Key="A_Template_WheelspinRewardThumbnail">
        <FZMaterial ImageSourceNoPreload="/ForzaUI;component/Textures/Data_Bound/PostRace/Wheelspin_Logo.png"
                    Style="{StaticResource A_Style_FZMaterial_RewardThumbnail}" />
    </ControlTemplate>

    <ControlTemplate x:Key="A_Template_SuperWheelspinRewardThumbnail">
        <FZMaterial ImageSourceNoPreload="/ForzaUI;component/Textures/Data_Bound/PostRace/Super_Wheelspin_Logo.png"
                    Style="{StaticResource A_Style_FZMaterial_RewardThumbnail}" />
    </ControlTemplate>

    <ControlTemplate x:Key="A_Template_HornRewardThumbnail">
        <FZMaterial ImageSourceNoPreload="/ForzaUI;component/Textures/Data_Bound/PostRace/Reward_Horn.png"
                    Style="{StaticResource A_Style_FZMaterial_RewardThumbnail}" />
    </ControlTemplate>

    <ControlTemplate x:Key="A_Template_QuickChatPhraseRewardThumbnail">
        <FZMaterial ImageSourceNoPreload="/ForzaUI;component/Textures/Data_Bound/PostRace/Reward_QuickChat.png"
                    Style="{StaticResource A_Style_FZMaterial_RewardThumbnail}" />
    </ControlTemplate>

    <ControlTemplate x:Key="A_Template_CreditsRewardThumbnail">
        <FZMaterial ImageSourceNoPreload="/ForzaUI;component/Textures/Anthem/Icons/CRIcon/CR_110_FilledCircle.png"
                    Style="{StaticResource A_Style_FZMaterial_RewardThumbnail}"
                    Width="110"
                    Height="110" />
    </ControlTemplate>

    <ControlTemplate x:Key="A_Template_TileRewardIcons">
        <DockPanel x:Name="TierPrizeCountContainer"
                    Width="{TemplateBinding ActualWidth}"
                    VerticalAlignment="Top"
                    Margin="0,4,0,0">
            <StackPanel Orientation="Horizontal"
                        HorizontalAlignment="Right"
                        DockPanel.Dock="Right"
                        Margin="0,0,9,0">
                <Grid Height="35"
                        Width="70"
                        HorizontalAlignment="Left"
                        Visibility="{Binding NormalRewardCount, Converter={StaticResource A_Converter_VisibleIfGreaterThanZero}}">
                    <local:FZMaterial Width="45"
                                        Height="30"
                                        Color="{StaticResource H_Color_Primary_Yellow}"
                                        HorizontalAlignment="Right">
                        <FZTextBlock Text="{Binding NormalRewardCount}"
                                        CapHeight="20"
                                        FontFamily="Horizon_A"
                                        Margin="6,0,0,0"
                                        Color="{DynamicResource A_Color_Reward_Text}"
                                        HorizontalAlignment="Center"
                                        VerticalAlignment="Center"/>
                    </local:FZMaterial>
                    <local:FZMaterial Width="35"
                                        Height="35"
                                        ImageSource="game:\Media\UI\Textures\Data_Bound\PDLC1\MissionIcons\Parent\prize_notification.png"
                                        HorizontalAlignment="Left"/>
                </Grid>
                <Decorator Width="5"/>
                <Grid Height="35"
                        Width="70"
                        HorizontalAlignment="Right"
                        Visibility="{Binding CarRewardCount, Converter={StaticResource A_Converter_VisibleIfGreaterThanZero}}">
                    <local:FZMaterial Width="45"
                                        Height="30"
                                        Color="{StaticResource H_Color_Primary_Yellow}"
                                        HorizontalAlignment="Right" >
                        <FZTextBlock Text="{Binding CarRewardCount}"
                                        CapHeight="20"
                                        FontFamily="Horizon_A"
                                        Color="{DynamicResource A_Color_Reward_Text}"
                                        HorizontalAlignment="Center"
                                        VerticalAlignment="Center" />
                    </local:FZMaterial>
                    <local:FZMaterial Width="35"
                                        Height="35"
                                        ImageSource="game:\Media\UI\Textures\Data_Bound\PDLC1\MissionIcons\Parent\car_prize_notification.png"
                                        HorizontalAlignment="Left"/>
                </Grid>
            </StackPanel>
            <FZMaterial ImageSource="{DynamicResource A_BitmapImage_MissionPin_Icon}"
                        Height="35"
                        Width="35"
                        DockPanel.Dock="Left"
                        Visibility="{Binding Pinned, Converter={FZBooleanToVisibilityConverter}}"
                        HorizontalAlignment="Left"
                        Margin="9,0,0,0"/>
        </DockPanel>
    </ControlTemplate>

    <ControlTemplate x:Key="A_Template_CarRewardThumbnail">
        <Grid>
            <FZMaterial x:Name="CarRewardBackgroundPattern"
                        ImageSource="ForzaUI;component/Textures/Data_Bound/FestivalPass/Car_Prize_Pattern.png"
                        Height="150"
                        Width="266"
                        HorizontalAlignment="Center"
                        VerticalAlignment="Center"/>
            <FZMaterial x:Name="RewardThumbnail"
                        ImageSource="{Binding RewardId, Converter={CarOrdinalConverter}, ConverterParameter=small}"
                        Style="{StaticResource A_Style_FZMaterial_RewardThumbnail}"
                        Width="328"
                        Height="328" />
        </Grid>
        <ControlTemplate.Triggers>

            <MultiDataTrigger>
                <MultiDataTrigger.Conditions>
                    <Condition Binding="{Binding ObscureType}" Value="{x:Static local:FestivalPassRewardObscureType.ObscureUsingNull}"/>
                    <Condition Binding="{Binding RewardState}" Value="{x:Static local:FestivalPassRewardState.Pending}"/>
                </MultiDataTrigger.Conditions>
                <Setter TargetName="RewardThumbnail" Property="ImageSource" Value="game:/Media/Stripped/RC0/Thumbnail_1215_Big.png"/>
                <Setter TargetName="RewardThumbnail" Property="Preset" Value="{StaticResource A_FZMaterialPreset_AlphaOnly}"/>
                <Setter TargetName="RewardThumbnail" Property="Color" Value="{StaticResource H_Color_Primary_Black}"/>
            </MultiDataTrigger>
          
          <MultiDataTrigger>
                <MultiDataTrigger.Conditions>
                    <Condition Binding="{Binding ObscureType}" Value="{x:Static local:FestivalPassRewardObscureType.ObscureImage}"/>
                    <Condition Binding="{Binding RewardState}" Value="{x:Static local:FestivalPassRewardState.Pending}"/>
                </MultiDataTrigger.Conditions>
                <Setter TargetName="RewardThumbnail" Property="ImageSource" Value="game:/Media/Stripped/RC0/Thumbnail_1215_Big.png"/>
                <Setter TargetName="RewardThumbnail" Property="Preset" Value="{StaticResource A_FZMaterialPreset_AlphaOnly}"/>
                <Setter TargetName="RewardThumbnail" Property="Color" Value="{StaticResource H_Color_Primary_Black}"/>
          </MultiDataTrigger>

        </ControlTemplate.Triggers>
    </ControlTemplate>

    <MappingConverter x:Key="A_Converter_RewardTypeThumbnail"
                      Default="{StaticResource A_Template_DefaultRewardThumbnail}">
        <MappingConverterEntry Key="{Static UIRewardType.Horn}"
                               Value="{StaticResource A_Template_HornRewardThumbnail}" />
        <MappingConverterEntry Key="{Static UIRewardType.Credits}"
                               Value="{StaticResource A_Template_CreditsRewardThumbnail}" />
        <MappingConverterEntry Key="{Static UIRewardType.QuickChatPhrase}"
                               Value="{StaticResource A_Template_QuickChatPhraseRewardThumbnail}" />
        <MappingConverterEntry Key="{Static UIRewardType.SuperWheelspin}"
                               Value="{StaticResource A_Template_SuperWheelspinRewardThumbnail}" />
        <MappingConverterEntry Key="{Static UIRewardType.Wheelspin}"
                               Value="{StaticResource A_Template_WheelspinRewardThumbnail}" />
        <MappingConverterEntry Key="{Static UIRewardType.Car}"
                               Value="{StaticResource A_Template_CarRewardThumbnail}" />
    </MappingConverter>

    <Style x:Key="A_Style_FZTextBlock_RewardDescription"
           TargetType="{Type FZTextBlock}">
        <Setter Property="FontFamily"
                Value="Horizon_A" />
        <Setter Property="CapHeight"
                Value="40" />
        <Setter Property="Margin"
                Value="0,2" />
        <Setter Property="Color"
                Value="{StaticResource H_Color_Primary_White}" />
        <Setter Property="Stretch"
                Value="None" />
        <Setter Property="TextTrimming"
                Value="CharacterEllipsis" />
        <Setter Property="Text"
                Value="{Binding Description, Converter={StringToUpper}}" />
        <Setter Property="Visibility"
                Value="{Binding Text, RelativeSource={RelativeSource Self}, Converter={StringVisConverter}}" />
    </Style>

    <Style x:Key="A_Style_FZTextBlock_RewardTopLine"
           TargetType="{Type FZTextBlock}"
           BasedOn="{StaticResource A_Style_FZTextBlock_RewardDescription}">
        <Setter Property="FontFamily"
                Value="Horizon_B" />
        <Style.Triggers>
            <DataTrigger Binding="{Binding RewardType}"
                         Value="{Static UIRewardType.Car}">
                <Setter Property="MultiStringFormatter.Param0"
                        Value="{Binding RewardId, Converter={CarOrdinalConverter}, ConverterParameter=year}" />
                <Setter Property="MultiStringFormatter.Param1"
                        Value="{Binding RewardId, Converter={CarOrdinalConverter}, ConverterParameter=displayname}" />
                <Setter Property="MultiStringFormatter.Format"
                        Value="{}{0} {1}" />
                <Setter Property="Text"
                        Value="{Binding (MultiStringFormatter.Output), RelativeSource={RelativeSource Self}, Converter={StringToUpper}}" />
            </DataTrigger>
        </Style.Triggers>
    </Style>

    <MultiConverter x:Key="A_RewardTypeHasText">
        <MultiConverterEntry Converter="{StaticResource A_Converter_RewardTypeToString}"
                             TargetType="{Type String}" />
        <MultiConverterEntry Converter="{StringVisConverter}"
                             TargetType="{Type Visibility}" />
    </MultiConverter>
    <MultiConverter x:Key="A_CarOrdinalToUpperMakeName">
        <MultiConverterEntry Converter="{CarOrdinalConverter}"
                                     Parameter="MakeName"
                                     TargetType="{Type String}" />
        <MultiConverterEntry Converter="{StringToUpper}"
                                     TargetType="{Type String}" />
    </MultiConverter>

    <Style x:Key="A_Style_FZTextBlock_RewardBottomLine"
           TargetType="{Type FZTextBlock}"
           BasedOn="{StaticResource A_Style_FZTextBlock_RewardDescription}">
        <Setter Property="Text"
                Value="{Null}" />
        <Style.Triggers>
            <DataTrigger Binding="{Binding RewardType, Converter={StaticResource A_RewardTypeHasText}}"
                         Value="{Static Visibility.Visible}">
                <Setter Property="Text"
                        Value="{Binding RewardType, Converter={StaticResource A_Converter_RewardTypeToString}}" />
            </DataTrigger>
            <DataTrigger Binding="{Binding RewardType}"
                         Value="{Static UIRewardType.Car}">
                <Setter Property="Text"
                        Value="{Binding RewardId, Converter={StaticResource A_CarOrdinalToUpperMakeName}}" />
            </DataTrigger>
        </Style.Triggers>
    </Style>

    <Double x:Key="A_Double_FloatingPinDefaultHeight">40</Double>
    <Thickness x:Key="A_Thickness_FloatingPinDefaultMargin">0,6,0,6</Thickness>

    <ControlTemplate x:Key="A_ControlTemplate_ExclusivityFloatingPin">
        <Grid Height="{TemplateBinding Height}">
            <FZMaterial Style="{StaticResource A_Style_FZMaterial_ExclusiveGlow}" />
            <FZMaterial Color="{StaticResource H_Color_Primary_Yellow}"
                        Preset="{StaticResource H_Roundtangle_Outer_1px}">
                <FZTextBlock x:Name="ExclusiveTagText"
                             Text="{Binding Path=(local:BindingProxy.A), RelativeSource={RelativeSource TemplatedParent}}"
                             Style="{StaticResource H_Style_PostRaceRow_HeaderText}"
                             Color="{StaticResource H_Color_Primary_Purple}"
                             TextAlignment="Center"
                             CapHeight="22" />
            </FZMaterial>
        </Grid>
    </ControlTemplate>
    <Style x:Key="A_Style_ExclusivityFloatingPin"
           TargetType="Control">
        <Setter Property="local:BindingProxy.A"
                Value="{local:Loc Main.IDS_Reward_Exclusive}" />
        <Setter Property="Height"
                Value="{StaticResource A_Double_FloatingPinDefaultHeight}" />
        <Setter Property="Margin"
                Value="{StaticResource A_Thickness_FloatingPinDefaultMargin}" />
        <Setter Property="Visibility"
                Value="{Binding IsExclusive, Converter={FZBooleanToVisibilityConverter}, FallbackValue=Collapsed}" />
        <Setter Property="Template"
                Value="{StaticResource A_ControlTemplate_ExclusivityFloatingPin}" />
    </Style>

    <Style x:Key="A_Style_FZMaterial_RarityTagText" TargetType="FZTextBlock" BasedOn="{StaticResource H_Style_PostRaceRow_HeaderText}" >
        <Setter Property="TextAlignment" Value="Center" /> 
        <Setter Property="CapHeight" Value="{DynamicDataBinding RarityTextCapHeight, FallbackValue=22}" />
        <Setter Property="Margin" Value="12,0" />
        <Setter Property="Color" Value="{Binding Rarity, Converter={StaticResource A_Converter_CarRarityToTextColor}}" />
    </Style>

    <ControlTemplate x:Key="A_ControlTemplate_RarityFloatingPin">
        <Decorator Height="{TemplateBinding Height}" 
                   MinWidth="{TemplateBinding MinWidth}">
            <FZMaterial Style="{StaticResource A_Style_FZMaterial_RewardBacking_InnerAll}">
                <FZTextBlock x:Name="RarityTagText"
                             Text="{Binding Path=(local:BindingProxy.A), RelativeSource={RelativeSource TemplatedParent}}"
                             Style="{StaticResource A_Style_FZMaterial_RarityTagText}"
                                 local:ScreenReader.Line="{Binding Text, RelativeSource={RelativeSource Self}, Converter={StaticResource A_Converter_TrimInlineMarkup}}"
                                 local:ScreenReader.LineType="ItemDescription"
                                 local:ScreenReader.Event="OnChange"/>
            </FZMaterial>
        </Decorator>
    </ControlTemplate>

    <Style x:Key="A_Style_RartiyFloatingPin_Base"
           TargetType="Control">
        <Setter Property="local:BindingProxy.A"
                Value="{Binding Rarity, Converter={StaticResource A_Converter_RarityToNameString}}" />
        <Setter Property="Visibility"
                Value="{Binding Path=(local:BindingProxy.A), RelativeSource={RelativeSource Self}, Converter={StaticResource A_StringVisConverter}}" />
        <Setter Property="Template"
                Value="{StaticResource A_ControlTemplate_RarityFloatingPin}" />
    </Style>

    <Style x:Key="A_Style_RarityFloatingPin_Mini"
           BasedOn="{StaticResource A_Style_RartiyFloatingPin_Base}"
           TargetType="Control">
        <Setter Property="DynamicData.Data">
            <Setter.Value>
                <DynamicDataSource>
                    <DynamicDataItem Name="RarityTextCapHeight"
                                     DataType="Double"
                                     Value="14" />
                </DynamicDataSource>
            </Setter.Value>
        </Setter>
        <Setter Property="MinWidth"
                Value="56" />
        <Setter Property="Height"
                Value="26" />
    </Style>
    <Style x:Key="A_Style_RarityFloatingPin_Small"
           BasedOn="{StaticResource A_Style_RartiyFloatingPin_Base}"
           TargetType="Control">
        <Setter Property="DynamicData.Data">
            <Setter.Value>
                <DynamicDataSource>
                    <DynamicDataItem Name="RarityTextCapHeight"
                                     DataType="Double"
                                     Value="22" />
                </DynamicDataSource>
            </Setter.Value>
        </Setter>
        <Setter Property="MinWidth"
                Value="120" />
        <Setter Property="Height"
                Value="32" />
    </Style>
    <Style x:Key="A_Style_RarityFloatingPin_Large"
           BasedOn="{StaticResource A_Style_RartiyFloatingPin_Base}"
           TargetType="Control">
        <Setter Property="DynamicData.Data">
            <Setter.Value>
                <DynamicDataSource>
                    <DynamicDataItem Name="RarityTextCapHeight" 
                                     DataType="Double" 
                                     Value="32" />
                </DynamicDataSource>
            </Setter.Value>
        </Setter>
        <Setter Property="MinWidth"
                Value="156" />
        <Setter Property="Height"
                Value="{StaticResource A_Double_FloatingPinDefaultHeight}" />
    </Style>
    <Style TargetType="ContentControl"
           x:Key="A_Style_RewardIconControl">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate
                TargetType="ContentControl">
                    <Grid x:Name="IconGrid">
                        <FZMaterial x:Name="RewardHalo"
                              VerticalAlignment="Center"
                              Margin="-10,-11,-10,-11"
                              Width="70"
                              Height="70"
                              Visibility="{Binding Content, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ContentControl}}, Converter={StaticResource A_FZBooleanToVisibilityConverter}}"
                              ImageSource="/ForzaUI;component/Textures/Anthem/Icons/PauseMenu/Reward_Halo.png"/>
                        <FZMaterial x:Name="RewardBackground"
                              VerticalAlignment="Center"
                              Width="50"
                              Height="50"
                              ImageSource="/ForzaUI;component/Textures/Anthem/Icons/PauseMenu/Reward_Back.png"/>
                        <FZMaterial x:Name="RewardCarIcon"
                              VerticalAlignment="Center"
                              Width="45"
                              Height="45"
                              ImageSource="{Binding Tag, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ContentControl}}}"/>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="A_Style_FZTextBlock_Accolades_RewardPreviewTitle_TopLine"
           BasedOn="{StaticResource A_Style_FZTextBlock_RewardDescription}"
           TargetType="local:FZTextBlock">
        <Setter Property="CapHeight" Value="19" />
        <Setter Property="FontFamily" Value="Horizon_B" />
        <Setter Property="TextTrimming" Value="None" />
        <Style.Triggers>
            <DataTrigger Binding="{Binding RewardType, Converter={StaticResource A_RewardTypeHasText}}"
                         Value="{Static Visibility.Visible}">
                <Setter Property="Text"
                        Value="{Binding RewardType, Converter={StaticResource A_Converter_RewardTypeToString}}" />
            </DataTrigger>
            <DataTrigger Binding="{Binding RewardType}"
                         Value="{Static UIRewardType.Car}">
                <Setter Property="MultiStringFormatter.Param0"
                        Value="{Binding RewardId, Converter={CarOrdinalConverter}, ConverterParameter=displayname}" />
                <Setter Property="MultiStringFormatter.Format"
                        Value="{}{0}" />
                <Setter Property="Text"
                        Value="{Binding (MultiStringFormatter.Output), RelativeSource={RelativeSource Self}, Converter={StringToUpper}}" />
            </DataTrigger>
        </Style.Triggers>
    </Style>

    <Style x:Key="A_Style_FZTextBlock_Accolades_RewardPreviewTitle_BottomLine"
           BasedOn="{StaticResource A_Style_FZTextBlock_RewardDescription}"
           TargetType="local:FZTextBlock">
        <Setter Property="CapHeight" Value="17" />
        <Setter Property="TextTrimming" Value="None" />
        <Style.Triggers>
            <DataTrigger Binding="{Binding RewardType}"
                         Value="{Static UIRewardType.Car}">
                <Setter Property="Text"
                        Value="{Binding RewardId, Converter={StaticResource A_CarOrdinalToUpperMakeName}}" />
            </DataTrigger>
        </Style.Triggers>
    </Style>

    <AutoScrollSettings x:Key="A_AutoScrollSettings_RewardPreviewTitle"
        InitialPause="0:0:2.0"
        ScrollSeparation="40"
        ScrollOrientation="Horizontal"/>
    <Style x:Key="A_Style_FZTextBlock_AutoScroll_RewardPreviewTitle_TopLine"
           BasedOn="{StaticResource A_Style_FZTextBlock_Accolades_RewardPreviewTitle_TopLine}"
           TargetType="FZTextBlock">
                <Setter Property="AutoScroll" Value="{StaticResource A_AutoScrollSettings_RewardPreviewTitle}" />
                <Setter Property="AutoScroll.AllowScrolling" Value="True" />
        <Style.Triggers>
            <DataTrigger Binding="{Binding RewardType}" Value="{x:Static local:UIRewardType.Wheelspin}">
                <Setter Property="Visibility" Value="Collapsed"/>
            </DataTrigger>
            <DataTrigger Binding="{Binding RewardType}" Value="{x:Static local:UIRewardType.SuperWheelspin}">
                <Setter Property="Visibility" Value="Collapsed"/>
            </DataTrigger>
        </Style.Triggers>
    </Style>

    <Style x:Key="A_Style_FZTextBlock_AutoScroll_RewardPreviewTitle_BottomLine" 
           BasedOn="{StaticResource A_Style_FZTextBlock_Accolades_RewardPreviewTitle_BottomLine}" 
           TargetType="FZTextBlock">
        <Setter Property="AutoScroll" Value="{StaticResource A_AutoScrollSettings_RewardPreviewTitle}" />
        <Setter Property="AutoScroll.AllowScrolling" Value="True" />
        <Setter Property="Height" Value="36" />
        <Setter Property="MaxWidth" Value="220" />
    </Style>

    <Style TargetType="local:FZMaterial"
           x:Key="A_Style_FZMaterial_DetailsPanel_AwardTitle_Background_Bar">
        <Setter Property="Height" Value="3"/>
        <Setter Property="VerticalAlignment" Value="Center" />
        <Setter Property="Color" Value="{StaticResource H_Color_Primary_Yellow}"/>
    </Style>

    <Style TargetType="FZTextBlock" 
               x:Key="A_Style_FZTextBlock_DetailsPanel_AwardTitle" 
               BasedOn="{StaticResource H_Style_Text_DescriptionTitle}">
        <Setter Property="TextAlignment" Value="Center" />
        <Setter Property="HorizontalAlignment" Value="Center" />
        <Setter Property="VerticalAlignment" Value="Center" />
        <Setter Property="Color" Value="{StaticResource H_Color_Primary_Purple}"/>
        <Setter Property="CapHeight" Value="18" />
        <Setter Property="Margin" Value="4,0,4,0" />
        <Setter Property="Stretch" Value="None"/>
        <Setter Property="TextTrimming" Value="None"/>
    </Style>

    <Style TargetType="local:FZMaterial"
               x:Key="A_Style_FZMaterial_DetailsPanel_AwardTitle_Background">
        <Style.Resources>
            <Double x:Key="A_Double_PrizeTitleBackGround_Height">80</Double>
            <local:FZMaterialUVMap x:Key="A_FZMaterialUVMap_Title_bg"
                                   StretchRegion="27,0,27,0"
                                   UnstretchedSize="64,69"/>
        </Style.Resources>
        <Setter Property="TextureWrap" Value="True"/>
        <Setter Property="UVMap" Value="{StaticResource A_FZMaterialUVMap_Title_bg}"/>
        <Setter Property="HorizontalAlignment" Value="Center"/>
        <Setter Property="Height" Value="{StaticResource A_Double_PrizeTitleBackGround_Height}"/>
        <Setter Property="MaxWidth" Value="300"/>
        <Setter Property="ImageSource" Value="game:\Media\UI\Textures\Data_Bound\AccoladesIcons\prize_text_item_glow.png"/>
    </Style>

    <DataTemplate DataType="local:XAMLReward"
                  x:Key="A_ControlTemplate_RewardThumbnailWithDescription_DetailsPanel">
        <DataTemplate.Resources>
            <Style x:Key="A_Style_FZMaterial_RewardThumbnail_DetailsPanel"
                    BasedOn="{StaticResource A_Style_FZMaterial_RewardThumbnail}"
                    TargetType="{Type FZMaterial}">
                <Setter Property="Width" Value="114"/>
                <Setter Property="Height" Value="114"/>
                <Setter Property="HorizontalAlignment" Value="Left"/>
                <Setter Property="ImageSource" Value="{Binding Thumbnail}"/>
                <Setter Property="Effect" Value="{Binding RewardType, Converter={StaticResource H_Converter_RewardTypeToIconEffect}}"/>
                <Style.Triggers>
                    <DataTrigger Binding="{Binding RewardType}" Value="{x:Static local:UIRewardType.Car}">
                        <Setter Property="ImageSource" Value="{Binding SmallThumbnail}"/>
                        <Setter Property="Margin" Value="2,0,6,0"/>
                    </DataTrigger>
                    <DataTrigger Binding="{Binding RewardType}" Value="{x:Static local:UIRewardType.Wheelspin}">
                        <Setter Property="ImageSource" Value="game:\Media\UI\Textures\Data_Bound\AccoladesIcons\wheelspin.png"/>
                        <Setter Property="Margin" Value="2,0,6,0"/>
                    </DataTrigger>
                    <DataTrigger Binding="{Binding RewardType}" Value="{x:Static local:UIRewardType.SuperWheelspin}">
                        <Setter Property="Margin" Value="2,0,6,0"/>
                        <Setter Property="ImageSource" Value="game:\Media\UI\Textures\Data_Bound\AccoladesIcons\superwheelspin.png"/>
                    </DataTrigger>
                    <DataTrigger Binding="{Binding RewardType}" Value="{x:Static local:UIRewardType.Badge}">
                        <Setter Property="Width" Value="102"/>
                        <Setter Property="Height" Value="85"/>
                        <Setter Property="Margin" Value="0,0,10,0"/>
                    </DataTrigger>
                </Style.Triggers>
            </Style>
            <local:MappingConverter x:Key="A_Converter_WheelspinRewardTypeToVisibility" Default="{x:Static Visibility.Collapsed}">
                <local:MappingConverterEntry Key="{x:Static local:UIRewardType.Wheelspin}" Value="{x:Static Visibility.Visible}" />
                <local:MappingConverterEntry Key="{x:Static local:UIRewardType.SuperWheelspin}" Value="{x:Static Visibility.Visible}" />
            </local:MappingConverter>

            <local:MappingConverter x:Key="A_Converter_WheelspinRewardTypeToVisibility_Inverse" Default="{x:Static Visibility.Visible}">
                <local:MappingConverterEntry Key="{x:Static local:UIRewardType.Wheelspin}" Value="{x:Static Visibility.Collapsed}" />
                <local:MappingConverterEntry Key="{x:Static local:UIRewardType.SuperWheelspin}" Value="{x:Static Visibility.Collapsed}" />
                <local:MappingConverterEntry Key="{x:Static local:UIRewardType.Badge}" Value="{x:Static Visibility.Collapsed}" />
            </local:MappingConverter>

            <local:MappingConverter x:Key="A_Converter_WheelspinRewardTypeToRarityColor" Default="#FFFFFFFF">
                <local:MappingConverterEntry Key="{x:Static local:UIRewardType.Wheelspin}" Value="{StaticResource A_Color_Rarity_Common}" />
                <local:MappingConverterEntry Key="{x:Static local:UIRewardType.SuperWheelspin}" Value="{StaticResource A_Color_Rarity_Epic}" />
            </local:MappingConverter>

            <local:MappingConverter x:Key="A_Converter_WheelspinRewardTypeToRarityNameString">
                <local:MappingConverterEntry Key="{x:Static local:UIRewardType.Wheelspin}" Value="{local:Loc Main.IDS_Rarity_Common}" />
                <local:MappingConverterEntry Key="{x:Static local:UIRewardType.SuperWheelspin}" Value="{local:Loc Main.IDS_Rarity_Epic}" />
            </local:MappingConverter>

        </DataTemplate.Resources>
        <Grid>
            <DockPanel Height="114"
                       Margin="2,0,2,0"
                       VerticalAlignment="Bottom">
                <Grid DockPanel.Dock="Left"
                      HorizontalAlignment="Left">
                    <local:FZMaterial DockPanel.Dock="Left"
                                      Style="{StaticResource A_Style_FZMaterial_RewardThumbnail_DetailsPanel}"/>
                </Grid>
                <StackPanel Orientation="Vertical"
                            DockPanel.Dock="Left"
                            HorizontalAlignment="Left"
                            VerticalAlignment="Center"
                            MaxWidth="200">
                    <Decorator HorizontalAlignment="Left" VerticalAlignment="Center" Margin="0,3,0,4" ClipToBounds="True">
                        <FZTextBlock Style="{StaticResource A_Style_FZTextBlock_AutoScroll_RewardPreviewTitle_TopLine}" />
                    </Decorator>
                    <Decorator HorizontalAlignment="Left" VerticalAlignment="Center" Margin="0,3,0,4" ClipToBounds="True">
                        <FZTextBlock Style="{StaticResource A_Style_FZTextBlock_AutoScroll_RewardPreviewTitle_BottomLine}" />
                    </Decorator> 
                    <Grid VerticalAlignment="Center"
                          HorizontalAlignment="Left">
                        <Control Style="{StaticResource A_Style_RarityFloatingPin_Mini}"

                                 Visibility="{Binding RewardType, Converter={StaticResource A_Converter_WheelspinRewardTypeToVisibility_Inverse}}"/>

                        <FZMaterial Style="{StaticResource A_Style_FZMaterial_RewardBacking_InnerAll}"
                                    Color="{Binding RewardType, Converter={StaticResource A_Converter_WheelspinRewardTypeToRarityColor}}"
                                    MinWidth="76"
                                    Height="20"
                                    Visibility="{Binding RewardType, Converter={StaticResource A_Converter_WheelspinRewardTypeToVisibility}}">
                            <FZTextBlock Text="{Binding RewardType, Converter={StaticResource A_Converter_WheelspinRewardTypeToRarityNameString}}"
                                         Style="{StaticResource H_Style_PostRaceRow_HeaderText}"
                                         TextAlignment="Center"
                                         CapHeight="11"
                                         Margin="12,0" />
                        </FZMaterial>
                    </Grid>
                </StackPanel>
            </DockPanel>
        </Grid>
    </DataTemplate>

    <AutoScrollSettings x:Key="A_AutoScrollSettings_Collection"
                        ScrollSeparation="100"
                        InitialPause="0:0:0.5"
                        Speed="40"
                        ScrollOrientation="Horizontal"
                        ApplyClip="True" />

    <ControlTemplate x:Key="A_ControlTemplate_RewardThumbnailOnly" TargetType="Control">
        <ControlTemplate.Resources>
            <Style x:Key="A_Style_FZMaterial_RewardThumbnail_DetailsPanel"
                    BasedOn="{StaticResource A_Style_FZMaterial_RewardThumbnail}"
                    TargetType="{Type FZMaterial}">
                <Setter Property="ImageSource" Value="{Binding Thumbnail}"/>
                <Setter Property="Effect" Value="{Binding RewardType, Converter={StaticResource H_Converter_RewardTypeToIconEffect}}"/>
                <Style.Triggers>
                    <DataTrigger Binding="{Binding RewardType}" Value="{x:Static UIRewardType.Wheelspin}">
                        <Setter Property="ImageSource" Value="game:\Media\UI\Textures\Data_Bound\Reward\Wheelspin.png"/>
                    </DataTrigger>
                    <DataTrigger Binding="{Binding RewardType}" Value="{x:Static UIRewardType.SuperWheelspin}">
                        <Setter Property="ImageSource" Value="game:\Media\UI\Textures\Data_Bound\Reward\Super_Wheelspin.png"/>
                    </DataTrigger>
                    <DataTrigger Binding="{Binding RewardType}" Value="{x:Static UIRewardType.Emote}">
                        <Setter Property="Preset" Value="{StaticResource A_FZMaterialPreset_AlphaOnly}"/>
                    </DataTrigger>
                </Style.Triggers>
            </Style>
        </ControlTemplate.Resources>
        <FZMaterial GreedyMeasure="True" 
                    Stretch="Uniform" 
                    Style="{StaticResource A_Style_FZMaterial_RewardThumbnail_DetailsPanel}" 
                    PlaceholderColor="{StaticResource H_Color_Primary_White}"/>
    </ControlTemplate>

    <ControlTemplate x:Key="H_Template_XAMLReward"
                    TargetType="Control">
        <ControlTemplate.Resources>

            <MappingConverter x:Key="A_Converter_RarityVisibility" Default="{x:Static Visibility.Visible}">
                <MappingConverterEntry Key="{x:Static UIRewardType.Badge}" Value="{x:Static Visibility.Collapsed}" />
                <MappingConverterEntry Key="{x:Static UIRewardType.LiveryDecals}" Value="{x:Static Visibility.Collapsed}" />
            </MappingConverter>

            <Style x:Key="A_Style_RarityFloatingPin"
                    BasedOn="{StaticResource A_Style_RartiyFloatingPin_Base}"
                    TargetType="Control">
                <Setter Property="DynamicData.Data">
                    <Setter.Value>
                        <DynamicDataSource>
                            <DynamicDataItem Name="RarityTextCapHeight"
                                                DataType="Double"
                                                Value="15" />
                        </DynamicDataSource>
                    </Setter.Value>
                </Setter>
                <Style.Triggers>
                    <DataTrigger Binding="{Binding RewardType}" Value="{x:Static UIRewardType.Wheelspin}">
                        <Setter Property="BindingProxy.A" Value="{Convert {x:Static XAMLRarity.Common}, Converter={StaticResource A_Converter_RarityToNameString}}"/>
                    </DataTrigger>
                    <DataTrigger Binding="{Binding RewardType}" Value="{x:Static UIRewardType.SuperWheelspin}">
                        <Setter Property="BindingProxy.A" Value="{Convert {x:Static XAMLRarity.Epic}, Converter={StaticResource A_Converter_RarityToNameString}}"/>
                    </DataTrigger>
                </Style.Triggers>
            </Style>

            <MultiConverter x:Key="A_CarOrdinalToUpperName">
                <MultiConverterEntry Converter="{CarOrdinalConverter}"
                                                Parameter="DisplayName"
                                                TargetType="{Type String}" />
                <MultiConverterEntry Converter="{StringToUpper}"
                                                TargetType="{Type String}" />
            </MultiConverter>

            <Style x:Key="H_Style_TopLine" BasedOn="{StaticResource A_Style_FZTextBlock_Accolades_RewardPreviewTitle_BottomLine}"
                    TargetType="FZTextBlock">
                <Setter Property="Margin" Value="0" />
                <Setter Property="Height" Value="auto" />
                <Setter Property="Width" Value="auto" />
                <Setter Property="MaxWidth" Value="infinity" />
                <Setter Property="TextTrimming" Value="None" />
                <Setter Property="AutoScroll.AllowScrolling" Value="True" />
                <Setter Property="AutoScroll" Value="{StaticResource A_AutoScrollSettings_Collection}"/>
                <Style.Triggers>
                    <DataTrigger Binding="{Binding RewardType}"
                                 Value="{Static UIRewardType.Car}">
                        <Setter Property="Text"
                                Value="{Binding RewardId, Converter={StaticResource A_CarOrdinalToUpperName}}" />
                    </DataTrigger>
                    <DataTrigger Binding="{Binding RewardType}"
                                 Value="{Static UIRewardType.Wheelspin}">
                        <Setter Property="Text"
                                Value="{Loc InGame.IDS_Rewards_WheelspinDescriptionFormat}" />
                    </DataTrigger>
                    <DataTrigger Binding="{Binding RewardType}"
                                 Value="{Static UIRewardType.SuperWheelspin}">
                        <Setter Property="Text"
                                Value="{Loc InGame.IDS_Rewards_SuperWheelspinDescriptionFormat}" />
                    </DataTrigger>
                    <DataTrigger Binding="{Binding RewardType}"
                                 Value="{Static UIRewardType.Credits}">
                        <Setter Property="Text"
                                Value="{Binding RewardType, Converter={StaticResource A_Converter_RewardTypeToString}}" />
                    </DataTrigger>
                </Style.Triggers>
            </Style>

            <MultiConverter x:Key="A_CarOrdinalToUpperMakeName">
                <MultiConverterEntry Converter="{CarOrdinalConverter}"
                                                Parameter="MakeName"
                                                TargetType="{Type String}" />
                <MultiConverterEntry Converter="{StringToUpper}"
                                                TargetType="{Type String}" />
            </MultiConverter>

            <Style x:Key="H_Style_BottomLine" BasedOn="{StaticResource A_Style_FZTextBlock_AutoScroll_RewardPreviewTitle_TopLine}"
                    TargetType="FZTextBlock">
                <Setter Property="Margin" Value="0" />
                <Setter Property="Height" Value="auto" />
                <Setter Property="Width" Value="auto" />
                <Setter Property="Color" Value="{StaticResource H_Color_Primary_Grey_70pc}" />
                <Setter Property="CapHeight" Value="19" />
                <Setter Property="MaxWidth" Value="infinity" />
                <Setter Property="TextTrimming" Value="None" />
                <Setter Property="AutoScroll.AllowScrolling" Value="True" />
                <Setter Property="AutoScroll" Value="{StaticResource A_AutoScrollSettings_Collection}"/>
                <Setter Property="Visibility" Value="{x:Static Visibility.Visible}"/>
                <Style.Triggers>
                    <DataTrigger Binding="{Binding RewardType}"
                                    Value="{Static UIRewardType.Car}">
                        <Setter Property="Text"
                                Value="{Binding RewardId, Converter={StaticResource A_CarOrdinalToUpperMakeName}}" />
                    </DataTrigger>
                </Style.Triggers>
            </Style>

            <Style x:Key="H_Style_BottomLine_Amount" TargetType="FZTextBlock">
                <Setter Property="CapHeight" Value="19"/>
                <Setter Property="Color" Value="{StaticResource H_Color_Primary_Green}"/>
                <Setter Property="Text" Value="{Binding Amount, ConverterParameter=money, Converter={StaticResource A_NumUnitConverter_NoUnit_0dp}}"/>
            </Style>

            <Style x:Key="H_BottomLine_Wheelspin" TargetType="FZTextBlock"
                BasedOn="{StaticResource H_Style_BottomLine_Amount}">
                <Setter Property="MultiStringFormatter.Format" Value="{Loc InGame.IDS_RewardNumber_X}"/>
                <Setter Property="MultiStringFormatter.Param0" Value="{Binding Amount}"/>
                <Setter Property="Text" Value="{Binding (local:MultiStringFormatter.Output), RelativeSource={RelativeSource Self}}"/>
            </Style>
            
            <MappingConverter x:Key="H_Converter_RewardType_to_BottomLineStyle" Default="{StaticResource H_Style_BottomLine}">
                <MappingConverterEntry Key="{x:Static UIRewardType.Wheelspin}" Value="{StaticResource H_BottomLine_Wheelspin}"/>
                <MappingConverterEntry Key="{x:Static UIRewardType.SuperWheelspin}" Value="{StaticResource H_BottomLine_Wheelspin}"/>
                <MappingConverterEntry Key="{x:Static UIRewardType.Credits}" Value="{StaticResource H_Style_BottomLine_Amount}"/>
            </MappingConverter>
        </ControlTemplate.Resources>
        <DockPanel DataContext="{TemplateBinding Tag}">
            <StackPanel DockPanel.Dock="Bottom"
                        HorizontalAlignment="Center">
                <Grid HorizontalAlignment="Center" Margin="0,0,0,15" Height="26">
                    <Control Style="{StaticResource A_Style_RarityFloatingPin}"
                             Visibility="{Binding RewardType, Converter={StaticResource A_Converter_RarityVisibility}}"/>
                </Grid>
                <Decorator HorizontalAlignment="Center" Margin="0,0,0,10">
                    <FZTextBlock Style="{StaticResource H_Style_TopLine}"
                        FontFamily="Horizon_A"
                        CapHeight="23" 
                        Color="{StaticResource H_Color_Primary_White}" 
                        local:ScreenReader.Line="{Binding Text, RelativeSource={RelativeSource Self}, Converter={StaticResource A_Converter_TrimInlineMarkup}}"
                        local:ScreenReader.LineType="SelectedItem"
                        local:ScreenReader.Event="OnChange"/>
                </Decorator>
                <Decorator HorizontalAlignment="Center" Margin="0,0,0,31">
                    <FZTextBlock Style="{Binding RewardType, Converter={StaticResource H_Converter_RewardType_to_BottomLineStyle}}"
                                 FontFamily="Horizon_A"
                                 local:ScreenReader.Line="{Binding Text, RelativeSource={RelativeSource Self}, Converter={StaticResource A_Converter_TrimInlineMarkup}}"
                                 local:ScreenReader.LineType="SelectedDetails"
                                 local:ScreenReader.Event="OnChange"/>
                </Decorator> 
            </StackPanel>
            <Grid VerticalAlignment="Center" HorizontalAlignment="Center" Margin="0,0,0,20">
                <Control Template="{StaticResource A_ControlTemplate_RewardThumbnailOnly}"/>
            </Grid>
        </DockPanel>
    </ControlTemplate>
</ResourceDictionary>