<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_Map_EventsSelectedBackground">#FFFFE600</Color>


    <ImageSource x:Key="Image_CompletedGoldSeparator">/ForzaUI;component/Textures/Data_Bound/Horizon_Map/pins/Header_Pictures/completed_separator.png</ImageSource>
    <ImageSource x:Key="Image_CompletedPillBackground">/ForzaUI;component/Textures/Data_Bound/Horizon_Map/pins/completed_pill_background.png</ImageSource>
    <ImageSource x:Key="Image_CompletedPRBackground">/ForzaUI;component/Textures/Data_Bound/Horizon_Map/pins/completed_pr_background.png</ImageSource>
    <ImageSource x:Key="Image_GoldStar">/ForzaUI;component/Textures/Data_Bound/Horizon_Map/pins/gold_star.png</ImageSource>
    <Color x:Key="A_Color_CompletedPillBackground">#FFFFFFFF</Color>

    <Color x:Key="A_Color_Theme_Primary_House">#2C5EDD</Color>  <!--Ligher-->
    <Color x:Key="A_Color_Theme_Secondary_House">#2920A1</Color> <!--Darker-->
    <Color x:Key="A_Color_Theme_Primary_RoadRace">#00586D</Color>
    <Color x:Key="A_Color_Theme_Secondary_RoadRace">#002930</Color>
    <Color x:Key="A_Color_Theme_Primary_DirtRace">#771B0C</Color>
    <Color x:Key="A_Color_Theme_Secondary_DirtRace">#541B02</Color>
    <Color x:Key="A_Color_Theme_Primary_CrossCountry">#445D33</Color>
    <Color x:Key="A_Color_Theme_Secondary_CrossCountry">#102304</Color>
    <Color x:Key="A_Color_Theme_Primary_Goliath">#431284</Color>
    <Color x:Key="A_Color_Theme_Secondary_Goliath">#280B4F</Color>  
    <Color x:Key="A_Color_Theme_Primary_Showcase">#431284</Color>
    <Color x:Key="A_Color_Theme_Secondary_Showcase">#4E0A4E</Color>
    <Color x:Key="A_Color_Theme_Primary_Boards">#6449D6</Color>
    <Color x:Key="A_Color_Theme_Secondary_Boards">#2D2077</Color>
    <Color x:Key="A_Color_Theme_Primary_PRStunts">#720000</Color>
    <Color x:Key="A_Color_Theme_Secondary_PRStunts">#320000</Color>
    <Color x:Key="A_Color_Theme_Primary_WristbandEvents">#008480</Color>
    <Color x:Key="A_Color_Theme_Secondary_WristbandEvents">#005456</Color>
    <Color x:Key="A_Color_Theme_Primary_Stories">#936C09</Color>
    <Color x:Key="A_Color_Theme_Secondary_Stories">#704800</Color>
    <Color x:Key="A_Color_Theme_Primary_Jobs">#3434F4</Color>
    <Color x:Key="A_Color_Theme_Secondary_Jobs">#201F4F</Color>

    <System:Double x:Key="A_Double_MapPin_Width">418</System:Double>
    <Thickness x:Key="A_Thickness_MapPinMainContentMargin_TopBottomAndRight">12</Thickness>
    <Color x:Key="A_Color_MapPinStar_Unachieved">#80000000</Color>

    <ControlTemplate x:Key="A_ControlTemplate_ViewAccoladesButton" TargetType="{x:Type Control}">
        <local:ControllerButtonControl Style="{StaticResource A_Style_ControllerButtonControl_Standalone}"
                                       Height="28"
                                       UseLargeIcon="False"
                                       Margin="0,0,3,0"
                                       Button="Start" />
    </ControlTemplate>

    <Style x:Key="A_Style_ViewAccolades_BUTTON" TargetType="{x:Type Control}">
        <Setter Property="Template" Value="{StaticResource A_ControlTemplate_ViewAccoladesButton}" />
        <Setter Property="VerticalAlignment" Value="Center" />
    </Style>

    <local:MappingConverter x:Key="A_Converter_ExpansionToStandardTextColour" Default="{StaticResource H_Color_Primary_Black}">
        <local:MappingConverterEntry Key="{x:Static local:XAMLTrack.ExpansionOne}" Value="{StaticResource H_Color_Primary_Black}" />
        <local:MappingConverterEntry Key="{x:Static local:XAMLTrack.ExpansionTwo}" Value="{StaticResource A_Color_Astra_Blue}" />
    </local:MappingConverter>

    <local:MappingConverter x:Key="A_Converter_ExpansionToStandardIconColour" Default="{StaticResource H_Color_Primary_Purple}">
        <local:MappingConverterEntry Key="{x:Static local:XAMLTrack.ExpansionOne}" Value="{StaticResource A_Color_HW_Dark_Blue}" />
        <local:MappingConverterEntry Key="{x:Static local:XAMLTrack.ExpansionTwo}" Value="{StaticResource A_Color_Astra_Blue}" />
    </local:MappingConverter>

    <Style x:Key="A_Style_FZTextBlock_MapPin_TitleText"
           TargetType="local:FZTextBlock"
           BasedOn="{StaticResource A_Style_FZTextBlock_HorizonA}">
        <Setter Property="CapHeight"
                Value="28" />
        <Setter Property="VerticalAlignment"
                Value="Center" />
        <Setter Property="HorizontalAlignment"
                Value="Left" />
        <Setter Property="Color"
                Value="{Binding ActiveTrack, RelativeSource={RelativeSource AncestorType=Page}, Converter={StaticResource A_Converter_ExpansionToStandardTextColour}}" />
        <Setter Property="Margin"
                Value="0,10,0,0" />
    </Style>

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

    <Style x:Key="A_Style_FZTextBlock_AutoScroll_MapPin_TitleText" BasedOn="{StaticResource A_Style_FZTextBlock_MapPin_TitleText}" TargetType="local:FZTextBlock">
        <Setter Property="Stretch" Value="None" />
        <Setter Property="AutoScroll" Value="{StaticResource A_AutoScrollSettings_MapPinTitle}" />
        <Setter Property="AutoScroll.AllowScrolling" Value="True" />
    </Style>

    <local:MappingConverter x:Key="A_Converter_ActiveTrackToMapPinIconLocation" Default="/ForzaUI;component/Textures/Data_Bound/Horizon_Map/pins/">
        <!--<local:MappingConverterEntry Key="{x:Static local:XAMLTrack.ExpansionOne}" Value="/ForzaUI;component/Textures/Data_Bound/PDLC1/Map/Pins/" />
        <local:MappingConverterEntry Key="{x:Static local:XAMLTrack.ExpansionTwo}" Value="/ForzaUI;component/Textures/Data_Bound/PDLC2/Map/Pins/" />-->
    </local:MappingConverter>

    <Style x:Key="A_Style_FZTextBlock_MapPinInfoPillSubtitle"
           TargetType="local:FZTextBlock"
           BasedOn="{StaticResource A_Style_FZTextBlock_HorizonA}">
        <Setter Property="CapHeight" Value="18" />
        <Setter Property="Color" Value="{Binding ActiveTrack, RelativeSource={RelativeSource AncestorType=Page}, Converter={StaticResource A_Converter_ExpansionToStandardTextColour}}" />
        <Setter Property="Text" Value="{Binding Subtitle}" />
        <Setter Property="Visibility" Value="{Binding Subtitle, Converter={StaticResource A_StringVisConverter}}" />
    </Style>

    <Style x:Key="A_Style_FZTextBlock_MapPinInfoPillDescription_Base"
           TargetType="local:FZTextBlock"
           BasedOn="{StaticResource A_Style_FZTextBlock_HorizonD}">
        <Setter Property="CapHeight" Value="14" />
        <Setter Property="Color" Value="{Binding ActiveTrack, RelativeSource={RelativeSource AncestorType=Page}, Converter={StaticResource A_Converter_ExpansionToStandardTextColour}}" />
        <Setter Property="TextWrapping" Value="Wrap" />
        <Setter Property="LineAdjust" Value="-0.35" />
        <Setter Property="Text" Value="{Binding Description}" />
        <Setter Property="Visibility" Value="{Binding Description, Converter={StaticResource A_StringVisConverter}}" />
    </Style>


    <Style x:Key="A_Style_FrameworkElement_MapPin_CollapsedIfUndiscovered"
           TargetType="{x:Type FrameworkElement}">
        <Setter Property="Visibility" Value="Visible" />
        <Style.Triggers>
            <DataTrigger Binding="{Binding IsDiscovered}" Value="False">
                <Setter Property="Visibility" Value="Collapsed" />
            </DataTrigger>
            <DataTrigger Binding="{Binding SeasonallyActive}" Value="True">
                <Setter Property="Visibility" Value="Visible" />
            </DataTrigger>
        </Style.Triggers>
    </Style>

    <local:MappingConverter x:Key="A_Converter_MapPinPillTagToStrokeVis"
                            Default="Collapsed">
        <local:MappingConverterEntry Key="Complete" Value="Visible" />
        <local:MappingConverterEntry Key="ShowStroke" Value="Visible" />
    </local:MappingConverter>

    <Style x:Key="A_Style_FZRun_MapPinChallengeDescription_HIGHLIGHT"
           TargetType="local:FZRun">
        <Setter Property="FontFamily"
                Value="Horizon_A" />
    </Style>
    
    <Style x:Key="A_Style_FZRun_MapPinChallengeDescription_BOLD"
           TargetType="local:FZRun">
        <Setter Property="FontFamily"
                Value="Horizon_C" />
    </Style>

    <Style x:Key="A_Style_FZRun_MapPinChallengeDescription_FPICON" TargetType="Control" BasedOn="{StaticResource H_Style_Control_FPIcon}">
        <Setter Property="Height" Value="20"/>
        <Setter Property="Margin" Value="2,0,0,0"/>
        <Setter Property="VerticalAlignment" Value="Center"/>
    </Style>
    
    
    <local:MappingConverter x:Key="A_MappingConverter_MapPinChallengeDesc" >
        <local:MappingConverterEntry Key="{NoCase HIGHLIGHT}" Value="{StaticResource A_Style_FZRun_MapPinChallengeDescription_HIGHLIGHT}" />
        <local:MappingConverterEntry Key="{NoCase BOLD}" Value="{StaticResource A_Style_FZRun_MapPinChallengeDescription_BOLD}" />
        <local:MappingConverterEntry Key="{NoCase FP_ICON}" Value="{StaticResource A_Style_FZRun_MapPinChallengeDescription_FPICON}" />
    </local:MappingConverter>

    <local:FZMaterialPresetRoundtangleStroke x:Key="A_FZMaterialPresetRoundtangleStroke_MapPinCompletionStroke"
                                            BasedOn="{StaticResource A_FZMaterialPresetRoundtangle_FlatPanel_InnerAll}"
                                            Thickness="3" />
    <Style x:Key="A_Style_FZMaterial_MapPinInfoPillBackgroundStroke_Base"
           TargetType="local:FZMaterial">
        <Setter Property="Preset" Value="{StaticResource A_FZMaterialPresetRoundtangleStroke_MapPinCompletionStroke}" />
        <Setter Property="Color" Value="#80000000" />
        <Setter Property="Visibility" Value="{Binding Tag, ElementName=background, Converter={StaticResource A_Converter_MapPinPillTagToStrokeVis}, FallbackValue=Collapsed}" />
    </Style>

    <Style x:Key="A_Style_FZTextBlock_MapPin3PartTitle" BasedOn="{StaticResource A_Style_FZTextBlock_MapPin_TitleText}" TargetType="local:FZTextBlock">
        <Setter Property="Text" Value="{Binding Title}" />
        <Setter Property="CapHeight" Value="24" />
        <Setter Property="MaxHeight" Value="62" />
        <Setter Property="MinHeight" Value="25" />
        <Setter Property="HorizontalAlignment" Value="Stretch" />
        <Setter Property="TextAlignment" Value="Left" />
        <Setter Property="TextWrapping" Value="Wrap" />
        <Setter Property="LineAdjust" Value="-0.6" />
        <Setter Property="Stretch" Value="None" />
        <Setter Property="Visibility" Value="{Binding Title, Converter={StaticResource A_StringVisConverter}}" />
        <Setter Property="AutoScroll" Value="{StaticResource H_AutoScrollSettings_Descriptions}"/>
    </Style>

    <Style x:Key="A_Style_FZTextBlock_MapPin3PartTitleDescription"
           BasedOn="{StaticResource A_Style_FZTextBlock_MapPinInfoPillDescription_Base}"
           TargetType="local:FZTextBlock" />

    <Style x:Key="A_Style_FZTextBlock_MapPinInfoPillTitle" BasedOn="{StaticResource A_Style_FZTextBlock_AutoScroll_MapPin_TitleText}" TargetType="local:FZTextBlock">
        <Setter Property="Visibility" Value="{Binding SubTitle, Converter={StaticResource A_StringVisConverter}}" />
        <Setter Property="Text" Value="{Binding SubTitle}" />
        <Setter Property="CapHeight" Value="18" />
        <Setter Property="Margin" Value="0" />
        <Setter Property="Color" Value="{StaticResource H_Color_Primary_Black}" />
    </Style>

    <Style x:Key="A_Style_FZTextBlock_MapPinInfoPillDescription"
           TargetType="local:FZTextBlock"
           BasedOn="{StaticResource A_Style_FZTextBlock_MapPinInfoPillDescription_Base}" >
        <Setter Property="Color" Value="{StaticResource H_Color_Primary_Black}" />
        <Setter Property="Text" Value="{Binding SubDescription}"/>
        <Setter Property="Visibility" Value="{Binding SubDescription, Converter={StaticResource A_StringVisConverter}}" />
        <Setter Property="MarkupConverter" Value="{StaticResource A_MappingConverter_MapPinChallengeDesc}" />
        <Setter Property="Margin" Value="0,10,0,0"/>
        <Setter Property="CapHeight" Value="14" />
        <Setter Property="FontFamily" Value="Horizon_D" />
    </Style>

    <Style x:Key="A_Style_FZTextBlock_MapPinPerkCost_Base" BasedOn="{StaticResource A_Style_FZTextBlock_AutoScroll_MapPin_TitleText}" TargetType="local:FZTextBlock">
        <Setter Property="Visibility" Value="{Binding PerkCost, Converter={StaticResource A_StringVisConverter}}"/>
        <Setter Property="Text" Value="{Binding PerkCost}"/>
        <Setter Property="CapHeight" Value="18" />
        <Setter Property="HorizontalAlignment" Value="Right" />
        <Setter Property="Color" Value="{StaticResource H_Color_Primary_White}" />
        <Setter Property="VerticalAlignment" Value="Center" />
    </Style>

    <Style x:Key="A_Style_FZTextBlock_MapPinPerkCost_Dynamic" BasedOn="{StaticResource A_Style_FZTextBlock_MapPinPerkCost_Base}" TargetType="local:FZTextBlock"/>

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

    <Style x:Key="A_Style_MapPinPill_TextSeparator_Base"
           TargetType="FrameworkElement">
        <Setter Property="Height" Value="10" />
    </Style>

    <Style x:Key="A_Style_MapPinPill_TextSeparator_Dynamic"
           BasedOn="{StaticResource A_Style_MapPinPill_TextSeparator_Base}"
           TargetType="FrameworkElement" />


    <local:FZMaterialUVMap x:Key="A_FZMaterialUVMap_MapPinInfoPill_ExpansionOneMask" StretchRegion="24,0,24,0" UnstretchedSize="332,70"/>

    <!--ImageSource needs to be set to show house preview image-->

    <ControlTemplate x:Key="A_ControlTemplate_MapPinTopImage">
        <local:FZMaterial Height="137"
                          Visibility="{Binding TopPicturePath, Converter={StaticResource A_StringVisConverter}}"
                          ImageSource="{Binding (local:MultiStringFormatter.Output), RelativeSource={RelativeSource Self}}"
                          local:MultiStringFormatter.Param0="{Binding ActiveTrack, RelativeSource={RelativeSource AncestorType=Page}, Converter={StaticResource A_Converter_ActiveTrackToMapPinIconLocation}}"
                          local:MultiStringFormatter.Param1="{Binding TopPicturePath}"
                          local:MultiStringFormatter.Format="{StaticResource A_String_01FormatString}"/>
    </ControlTemplate>

    <local:MappingConverter x:Key="A_Converter_PinEventCategoryToImageSource" Default="">
        <local:MappingConverterEntry Key="{x:Static local:PinEventCategory.DiscoverJapan}" Value="/ForzaUI;component/Textures/Data_Bound/Horizon_Map/pins/Header_Pictures/discover_japan.png" />
        <local:MappingConverterEntry Key="{x:Static local:PinEventCategory.HorizonFestival}" Value="/ForzaUI;component/Textures/Data_Bound/Horizon_Map/pins/Header_Pictures/horizon_festival.png" />
        <local:MappingConverterEntry Key="{x:Static local:PinEventCategory.Seasonal}" Value="/ForzaUI;component/Textures/Data_Bound/Horizon_Map/pins/Header_Pictures/seasonal.png" />
    </local:MappingConverter>

    <local:MappingConverter x:Key="A_Converter_PinEventCategoryToVisibility" Default="{x:Static Visibility.Collapsed}">
        <local:MappingConverterEntry Key="{x:Static local:PinEventCategory.DiscoverJapan}" Value="{x:Static Visibility.Visible}" />
        <local:MappingConverterEntry Key="{x:Static local:PinEventCategory.HorizonFestival}" Value="{x:Static Visibility.Visible}" />
        <local:MappingConverterEntry Key="{x:Static local:PinEventCategory.Seasonal}" Value="{x:Static Visibility.Visible}" />
    </local:MappingConverter>

    <local:MappingConverter x:Key="A_Converter_PinWristbandLevelToImageSource" Default="">
        <local:MappingConverterEntry Key="{x:Static local:WristbandLevels.None}" Value="" />
        <local:MappingConverterEntry Key="{x:Static local:WristbandLevels.Yellow}" Value="/ForzaUI;component/Textures/Data_Bound/Horizon_Map/pins/Wristbands/wristband_yellow.png" />
        <local:MappingConverterEntry Key="{x:Static local:WristbandLevels.Green}" Value="/ForzaUI;component/Textures/Data_Bound/Horizon_Map/pins/Wristbands/wristband_green.png" />
        <local:MappingConverterEntry Key="{x:Static local:WristbandLevels.Blue}" Value="/ForzaUI;component/Textures/Data_Bound/Horizon_Map/pins/Wristbands/wristband_blue.png" />
        <local:MappingConverterEntry Key="{x:Static local:WristbandLevels.Pink}" Value="/ForzaUI;component/Textures/Data_Bound/Horizon_Map/pins/Wristbands/wristband_pink.png" />
        <local:MappingConverterEntry Key="{x:Static local:WristbandLevels.Orange}" Value="/ForzaUI;component/Textures/Data_Bound/Horizon_Map/pins/Wristbands/wristband_orange.png" />
        <local:MappingConverterEntry Key="{x:Static local:WristbandLevels.Purple}" Value="/ForzaUI;component/Textures/Data_Bound/Horizon_Map/pins/Wristbands/wristband_purple.png" />
        <local:MappingConverterEntry Key="{x:Static local:WristbandLevels.Gold}" Value="/ForzaUI;component/Textures/Data_Bound/Horizon_Map/pins/Wristbands/wristband_gold.png" />
    </local:MappingConverter>

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

    <ControlTemplate x:Key="A_ControlTemplate_MapPinTopBanner">
        <Decorator Height="37">
            <local:FZMaterial Height="78"
                              Visibility="{Binding EventCategory, Converter={StaticResource A_Converter_PinEventCategoryToVisibility}}"
                              ImageSource="{Binding EventCategory, Converter={StaticResource A_Converter_PinEventCategoryToImageSource}}"
                              VerticalAlignment="Bottom">
                <local:FZMaterial Height="50"
                                  Width="60"
                                  HorizontalAlignment="Right"
                                  VerticalAlignment="Bottom"
                                  Margin="0,0,10,2"
                                  Visibility="{Binding WristbandLevel, Converter={StaticResource A_Converter_PinWristbandLevelToVisibility}}"
                                  ImageSource="{Binding WristbandLevel, Converter={StaticResource A_Converter_PinWristbandLevelToImageSource}}"/>
            </local:FZMaterial>
        </Decorator>
    </ControlTemplate>

    <ControlTemplate x:Key="A_ControlTemplate_MapPinCompletionGoldSeparator">
        <local:FZMaterial Height="8"
                          Visibility="{Binding IsCompleted, Converter={StaticResource A_FZBooleanToVisibilityConverter}}"
                          ImageSource="{StaticResource Image_CompletedGoldSeparator}"
                          Margin="0,-0.5,0,0"/>
    </ControlTemplate>

    <ImageSource x:Key="Image_CompletedTick">/ForzaUI;component/Textures/Data_Bound/Horizon_Map/pins/completed_tick.png</ImageSource>
    <ImageSource x:Key="Image_CompletedTrophy">/ForzaUI;component/Textures/Data_Bound/Horizon_Map/pins/CampaignProgress/won.png</ImageSource>
    <ImageSource x:Key="Image_CurrentHome">/ForzaUI;component/Textures/Data_Bound/Horizon_Map/pins/current_home_circle.png</ImageSource>
    <ImageSource x:Key="Image_Locked">/ForzaUI;component/Textures/Data_Bound/Horizon_Map/pins/locked.png</ImageSource>

    <Style x:Key="A_Style_FZMaterial_StateIcon"
           TargetType="local:FZMaterial">
        <Setter Property="Height" Value="29" />
        <Setter Property="Width" Value="29" />
        <Setter Property="HorizontalAlignment" Value="Right" />
        <Setter Property="VerticalAlignment" Value="Top" />
        <Setter Property="Visibility" Value="Collapsed" />
        <Style.Triggers>
            <MultiDataTrigger>
                <MultiDataTrigger.Conditions>
                    <Condition Binding="{Binding IsCompleted}" Value="True" />
                    <Condition Binding="{Binding Exceptions.IsUsingCompletedTick}" Value="True" />
                </MultiDataTrigger.Conditions>
                <Setter Property="ImageSource" Value="{StaticResource Image_CompletedTick}" />
                <Setter Property="Visibility" Value="Visible" />
            </MultiDataTrigger>
            <MultiDataTrigger>
                <MultiDataTrigger.Conditions>
                    <Condition Binding="{Binding IsCompleted}" Value="True" />
                    <Condition Binding="{Binding Exceptions.IsCurrentHome}" Value="True" />
                </MultiDataTrigger.Conditions>
                <Setter Property="ImageSource" Value="{StaticResource Image_CurrentHome}" />
                <Setter Property="Visibility" Value="Visible" />
            </MultiDataTrigger>
            <MultiDataTrigger>
                <MultiDataTrigger.Conditions>
                    <Condition Binding="{Binding IsCompleted}" Value="True" />
                    <Condition Binding="{Binding Exceptions.IsUsingCompletedTick}" Value="False" />
                </MultiDataTrigger.Conditions>
                <Setter Property="ImageSource" Value="{StaticResource Image_CompletedTrophy}" />
                <Setter Property="Visibility" Value="Visible" />
                <Setter Property="Height" Value="37" />
                <Setter Property="Width" Value="74" />
            </MultiDataTrigger>
            <DataTrigger Binding="{Binding IsLocked}" Value="True">
                <Setter Property="ImageSource" Value="{StaticResource Image_Locked}" />
                <Setter Property="Visibility" Value="Visible" />
            </DataTrigger>
        </Style.Triggers>
    </Style>
    
        <Style x:Key="A_Style_FZMaterial_CampaignCurrencyRewardBox"
           TargetType="local:FZMaterial">
        <Setter Property="Color" Value="{StaticResource H_Color_Primary_Black}" />
        <Setter Property="Visibility" Value="Visible" />
        <Style.Triggers>
            <DataTrigger Binding="{Binding CampaignCurrencyRewardAmount}" Value="0">
                <Setter Property="Visibility" Value="Collapsed" />
            </DataTrigger>
            <DataTrigger Binding="{Binding IsLocked}" Value="True">
                <Setter Property="Visibility" Value="Collapsed" />
            </DataTrigger>
        </Style.Triggers>
    </Style>

    <MappingConverter x:Key="H_Converter_CampaignCurrencyRewardControl">
        <MappingConverterEntry Key="{x:Static local:PinEventCategory.HorizonFestival}" Value="{StaticResource H_Style_Control_FPIcon}" />
        <MappingConverterEntry Key="{x:Static local:PinEventCategory.DiscoverJapan}" Value="{StaticResource H_Style_Control_DJIcon}" />
    </MappingConverter>

    <ControlTemplate x:Key="A_ControlTemplate_MapPin3PartTitlePill">
        <Grid>
            <StackPanel HorizontalAlignment="Stretch"
                        Margin="16,11,16,0">
                <DockPanel HorizontalAlignment="Stretch">

                    <!--Campaign Currency Reward-->
                    <local:FZMaterial x:Name="CampaignCurrencyRewardBox"
                                      Style="{StaticResource A_Style_FZMaterial_CampaignCurrencyRewardBox}"
                                      DockPanel.Dock="Right"
                                      Height="30"
                                      VerticalAlignment="Top">
                        <StackPanel Orientation="Horizontal"
                                    Margin="7">
                            <FZTextBlock Text="{Binding CampaignCurrencyRewardAmount}"
                                         CapHeight="18"
                                         Color="{StaticResource H_Color_Primary_White}"/>
                            <Control Width="18"
                                     Height="18"
                                     VerticalAlignment="Bottom"
                                     Style="{Binding CampaignCurrencyRewardCategory, Converter={StaticResource H_Converter_CampaignCurrencyRewardControl}}"
                                     Margin="5,0,0,0"
                                     />
                        </StackPanel>
                    </local:FZMaterial>
                    
                    <!--State Icon-->
                    <local:FZMaterial DockPanel.Dock="Right"
                                      Style="{StaticResource A_Style_FZMaterial_StateIcon}"
                                      VerticalAlignment="Top"/>


                    <local:FZTextBlock x:Name="Title"
                                       Style="{StaticResource A_Style_FZTextBlock_MapPin3PartTitle}"
                                       Margin="0,0,1,0"/>
                </DockPanel>

                <local:FZTextBlock x:Name="Subtitle"
                                   Style="{StaticResource A_Style_FZTextBlock_MapPinInfoPillSubtitle}"
		    					   Margin="0,10,0,0" />
                <local:FZTextBlock x:Name="Description"
		    					   Style="{StaticResource A_Style_FZTextBlock_MapPin3PartTitleDescription}"
		    					   Margin="0,12,0,0"/>
            </StackPanel>
        </Grid>
    </ControlTemplate>

    <local:MappingConverter x:Key="A_Converter_IsCompletedToSubTitleBgImageSource"
											Default="{x:Null}">
        <local:MappingConverterEntry Key="{StaticResource A_Boolean_True}" Value="{StaticResource Image_CompletedPillBackground}" />
    </local:MappingConverter>

    <local:MappingConverter x:Key="A_Converter_IsCompletedToSubTitleBgColor"
											Default="{StaticResource H_Color_Primary_Grey_90pc}">
        <local:MappingConverterEntry Key="{StaticResource A_Boolean_True}" Value="{StaticResource H_Color_Primary_White}" />
    </local:MappingConverter>

    <Style x:Key="A_Style_FZMaterial_MapPinInfoPillBackground"
           TargetType="local:FZMaterial" >
        <Setter Property="Preset" Value="{StaticResource A_FZMaterialPreset_FlatPanel_Base}" />
        <Setter Property="Margin" Value="0" />
        <Setter Property="Color" Value="{Binding IsCompleted, Converter={StaticResource A_Converter_IsCompletedToSubTitleBgColor}}" />
        <Setter Property="ImageSource" Value="{Binding IsCompleted, Converter={StaticResource A_Converter_IsCompletedToSubTitleBgImageSource}}" />
    </Style>
    
    <Style x:Key="A_Style_FZRun_CR_ICON" BasedOn="{StaticResource H_Style_Control_CreditsIcon}" TargetType="{x:Type Control}">
        <Setter Property="Height" Value="25" />
        <Setter Property="Width" Value="25" />
        <Setter Property="VerticalAlignment" Value="Center" />
    </Style>

    <MappingConverter x:Key="A_MappingConverter_TertiaryText" >
        <MappingConverterEntry Key="{NoCase CR_ICON}" Value="{StaticResource A_Style_FZRun_CR_ICON}" />
    </MappingConverter>

    <Style x:Key="A_Style_FZTextBlock_MapPinTertiaryText"
           TargetType="local:FZTextBlock">
        <Setter Property="CapHeight" Value="18" />
        <Setter Property="Color" Value="{StaticResource H_Color_Primary_White}" />
        <Setter Property="VerticalAlignment" Value="Center" />
        <Setter Property="Margin" Value="12,10" />
        <Setter Property="MarkupConverter" Value="{StaticResource A_MappingConverter_TertiaryText}" />
    </Style>

    <MappingConverter x:Key="A_Converter_SubTypeToImageSource">
        <local:MappingConverterEntry Key="{x:Static local:PinSubInfoCategory.None}" Value="" />
        <local:MappingConverterEntry Key="{x:Static local:PinSubInfoCategory.Chapters}" Value="/ForzaUI;component/Textures/Data_Bound/Horizon_Map/pins/chapter_icon" />
        <local:MappingConverterEntry Key="{x:Static local:PinSubInfoCategory.YellowWristband}" Value="/ForzaUI;component/Textures/Data_Bound/Horizon_Map/pins/Wristbands/wristband_yellow.png" />
        <local:MappingConverterEntry Key="{x:Static local:PinSubInfoCategory.GreenWristband}" Value="/ForzaUI;component/Textures/Data_Bound/Horizon_Map/pins/Wristbands/wristband_green.png" />
        <local:MappingConverterEntry Key="{x:Static local:PinSubInfoCategory.BlueWristband}" Value="/ForzaUI;component/Textures/Data_Bound/Horizon_Map/pins/Wristbands/wristband_blue.png" />
        <local:MappingConverterEntry Key="{x:Static local:PinSubInfoCategory.PinkWristband}" Value="/ForzaUI;component/Textures/Data_Bound/Horizon_Map/pins/Wristbands/wristband_pink.png" />
        <local:MappingConverterEntry Key="{x:Static local:PinSubInfoCategory.OrangeWristband}" Value="/ForzaUI;component/Textures/Data_Bound/Horizon_Map/pins/Wristbands/wristband_orange.png" />
        <local:MappingConverterEntry Key="{x:Static local:PinSubInfoCategory.PurpleWristband}" Value="/ForzaUI;component/Textures/Data_Bound/Horizon_Map/pins/Wristbands/wristband_purple.png" />
        <local:MappingConverterEntry Key="{x:Static local:PinSubInfoCategory.GoldWristband}" Value="/ForzaUI;component/Textures/Data_Bound/Horizon_Map/pins/Wristbands/wristband_gold.png" />
    </MappingConverter>
    
    <MappingConverter x:Key="A_Converter_SubTypeToVisibility" Default="Visible">
        <local:MappingConverterEntry Key="{x:Static local:PinSubInfoCategory.None}" Value="Collapsed" />
    </MappingConverter>
    

    
    <ControlTemplate x:Key="A_ControlTemplate_MapPinSubInfoPill">
        <StackPanel Visibility="{Binding IsEnabled, Converter={StaticResource A_FZBooleanToVisibilityConverter}}"
                    Margin="16,12,16,0">

            <!--Perk Type e.g Unlockable Perk-->
            <local:FZMaterial Height="38"
                              HorizontalAlignment="Left"
                              Color="{StaticResource H_Color_Primary_Black}"
                              Visibility="{Binding Title, Converter={StaticResource A_StringVisConverter}}">
                <local:FZTextBlock x:Name="SubInfoTitle"
                                   Style="{StaticResource A_Style_FZTextBlock_MapPin_TitleText}"
                                   Color="{StaticResource H_Color_Primary_White}"
                                   Margin="12,10"
								   FontSize="18"
								   Text="{Binding Title}"
								   DockPanel.Dock="Bottom" />
            </local:FZMaterial>

            <Grid>
                <local:FZMaterial x:Name="SubBackground" Style="{StaticResource A_Style_FZMaterial_MapPinInfoPillBackground}"/>

                <!--Perk Info, Title and Desc-->
                <ItemsControl ItemsSource="{Binding Entries}"
                              VerticalAlignment="Bottom">
                    <ItemsControl.ItemTemplate>
                        <DataTemplate>
                            <StackPanel>
                                <FZMaterial x:Name="EntrySeparator" Height="2" Margin="12,-2,12,0" Color="#A0A0A0"  Visibility="{Binding RelativeSource={RelativeSource PreviousData}, Converter={StaticResource A_FZBooleanToVisibilityConverter}}"/>
                                <Grid>
                                    <DockPanel HorizontalAlignment="Stretch"
                                               VerticalAlignment="Center"
                                               Margin="{StaticResource A_Thickness_MapPinMainContentMargin_TopBottomAndRight}">

                                        <local:FZMaterial DockPanel.Dock="Right"
                                                          ImageSource="{Binding SubType, Converter={StaticResource A_Converter_SubTypeToImageSource}}"
                                                          Visibility="{Binding SubType, Converter={StaticResource A_Converter_SubTypeToVisibility}}"
                                                          Height="50"
                                                          Width="60"
                                                          Stretch="Uniform"
                                                          Margin="0,-4,0,-4"/>

                                        <local:FZTextBlock x:Name="PART_PillTextTop"
                                                           DockPanel.Dock="Top"
                                                           Style="{StaticResource A_Style_FZTextBlock_MapPinInfoPillTitle}" />

                                        <local:FZTextBlock DockPanel.Dock="Bottom"
                                                           Style="{StaticResource A_Style_FZTextBlock_MapPinInfoPillDescription}"
                                                           Stretch="None"
                                                           TextWrapping="Wrap" />
                                    </DockPanel>
                                </Grid>
                            </StackPanel>

                        </DataTemplate>
                    </ItemsControl.ItemTemplate>
                </ItemsControl>
            </Grid>

            <!--Tertiary, Title and Description-->
            <local:FZMaterial x:Name="TertiaryBackground"
                              Height="42"
                              Color="{StaticResource H_Color_Primary_Black}"
                              Preset="{StaticResource A_FZMaterialPreset_FlatPanel_Base}"
                              Visibility="{Binding TertiaryTitle, Converter={StaticResource A_StringVisConverter}}">
                <DockPanel>
                    <local:FZTextBlock x:Name="TertiaryDescription"
                                       DockPanel.Dock="Right"
                                       Style="{StaticResource A_Style_FZTextBlock_MapPinTertiaryText}"
                                       Text="{Binding TertiaryDescription}"
                                       Visibility="{Binding TertiaryDescription, Converter={StaticResource A_StringVisConverter}}"
                                       HorizontalAlignment="Right" />

                    <local:FZTextBlock x:Name="TertiaryTitle"
                                       Style="{StaticResource A_Style_FZTextBlock_MapPinTertiaryText}"
                                       Text="{Binding TertiaryTitle}"
                                       Visibility="{Binding TertiaryTitle, Converter={StaticResource A_StringVisConverter}}"
                                       AutoScroll="{StaticResource H_AutoScrollSettings_Horizontal_Title}"
                                       AutoScroll.AllowScrolling="True"
                                       Stretch="None"
                                       TextWrapping="NoWrap"/>

                </DockPanel>
            </local:FZMaterial>

        </StackPanel>
    </ControlTemplate>

    
    <!--Car Info-->
    <Style x:Key="A_Style_FZTextBlock_MapPinCarInfoDescription"
           TargetType="local:FZTextBlock"
           BasedOn="{StaticResource A_Style_FZTextBlock_HorizonA}">
        <Setter Property="CapHeight" Value="18" />
        <Setter Property="Color" Value="{Binding ActiveTrack, RelativeSource={RelativeSource AncestorType=Page}, Converter={StaticResource A_Converter_ExpansionToStandardTextColour}}" />
        <Setter Property="Text" Value="{Binding SubDescription}"/>
        <Setter Property="Visibility" Value="{Binding SubDescription, Converter={StaticResource A_StringVisConverter}}"/>
        <Setter Property="MaxHeight" Value="25"/>
        <Setter Property="VerticalAlignment" Value="Center"/>
        <Style.Triggers>
            <DataTrigger Binding="{Binding CarInfo.HasCarClassOrPIRestriction}" Value="True">
                <Setter Property="Margin" Value="12,0,0,0"/>
            </DataTrigger>
        </Style.Triggers>
    </Style>

    <ControlTemplate x:Key="A_ControlTemplate_MapPinCarInfoPill">
        <StackPanel Visibility="{Binding IsEnabled, Converter={StaticResource A_FZBooleanToVisibilityConverter}}"
                    Margin="16,12,16,0">

            <!--Car info title e.g Restriction-->
            <local:FZMaterial Height="38"
                              HorizontalAlignment="Left"
                              Color="{StaticResource H_Color_Primary_Black}"
                              Visibility="{Binding Title, Converter={StaticResource A_StringVisConverter}}">
                <local:FZTextBlock x:Name="CarInfoTitle"
                                   Style="{StaticResource A_Style_FZTextBlock_MapPin_TitleText}"
                                   Color="{StaticResource H_Color_Primary_White}"
                                   Margin="12,10"
								   FontSize="18"
								   Text="{Binding Title}"
								   DockPanel.Dock="Bottom" />
            </local:FZMaterial>

            <!--Car Info and Desc-->
            <Grid>
                <local:FZMaterial x:Name="CarInfoBackground"
                                  Preset="{StaticResource A_FZMaterialPreset_FlatPanel_Base}"
                                  Color="{StaticResource H_Color_Primary_Grey_90pc}"/>
                <DockPanel HorizontalAlignment="Left"
                            VerticalAlignment="Center"
                            Margin="{StaticResource A_Thickness_MapPinMainContentMargin_TopBottomAndRight}">

                    <DockPanel>
                        <Control DockPanel.Dock="Left"  
                                 Style="{StaticResource H_Style_TemplatedElement_CarClassBadge_White}"
                                 HorizontalAlignment="Left"
                                 Height="35"
                                 local:BindingProxy.A="{Binding CarInfo.CarPIMaxRestriction}"
                                 local:BindingProxy.B="{Binding CarInfo.CarClassRestriction}"
                                 local:BindingProxy.C="{Binding CarInfo.CarPIMinRestriction}"
                                 Visibility="{Binding CarInfo.HasCarClassOrPIRestriction, FallbackValue=Collapsed, Converter={StaticResource A_FZBooleanToVisibilityConverter}}" />

                        <!--Drivetrain is collasped for the time being #pgEOzdemir-->
                        <Decorator Visibility="Collapsed"
                                   DockPanel.Dock="Left"
                                   Width="8"
                                   Visibility="{Binding CarInfo.HasCarClassOrPIRestriction, FallbackValue=Collapsed, Converter={StaticResource A_FZBooleanToVisibilityConverter}}" />
                        <Control Visibility="Collapsed"
                                 DockPanel.Dock="Left"
                                 Style="{StaticResource A_Style_Control_FlyerDriveTypeDisplay}"
                                 Height="35"
                                 Margin="0,0,8,0"
                                 local:BindingProxy.A="{Binding DriveTypeRestriction}"
                                 Visibility="{Binding HasDriveTypeRestriction, FallbackValue=Collapsed, Converter={StaticResource A_FZBooleanToVisibilityConverter}}"/>
                        <local:FZTextBlock Visibility="Collapsed"
                                           DockPanel.Dock="Left"
                                           Margin="0,0,10,0"
                                           Style="{StaticResource A_Style_FZTextBlock_MapPin_SeasonalText}"
                                           Text="{Binding RestrictionsTagline, Converter={StaticResource A_StringToUpper}}"
                                           Visibility="{Binding ValidRestrictionsTagline, Converter={StaticResource A_FZBooleanToVisibilityConverter}}"
                                           VerticalAlignment="Center" />
                    </DockPanel>

                    <local:FZTextBlock x:Name="CarInfoDescriptionText"
                                       Style="{StaticResource A_Style_FZTextBlock_MapPinCarInfoDescription}"
                                       AutoScroll="{StaticResource H_AutoScrollSettings_Horizontal_Title}"
                                       AutoScroll.AllowScrolling="True"
                                       Stretch="None"
                                       TextWrapping="NoWrap"/>
                </DockPanel>
            </Grid>

            <!--Tertiary, Title and Description-->
            <Grid Height="42" Visibility="{Binding TertiaryTitle, Converter={StaticResource A_StringVisConverter}}">
                <local:FZMaterial x:Name="TertiaryBackground"
                                  Color="{StaticResource H_Color_Primary_Black}"
                                  Preset="{StaticResource A_FZMaterialPreset_FlatPanel_Base}"/>

                <local:FZTextBlock x:Name="TertiaryTitle"
                                   Style="{StaticResource A_Style_FZTextBlock_MapPinTertiaryText}"
                                   Text="{Binding TertiaryTitle}"
                                   Visibility="{Binding TertiaryTitle, Converter={StaticResource A_StringVisConverter}}"/>

                <local:FZTextBlock x:Name="TertiaryDescription"
                                   Style="{StaticResource A_Style_FZTextBlock_MapPinTertiaryText}"
                                   Text="{Binding TertiaryDescription}"
                                   Visibility="{Binding TertiaryDescription, Converter={StaticResource A_StringVisConverter}}"
                                   HorizontalAlignment="Right"/>
            </Grid>

        </StackPanel>
    </ControlTemplate>

    <!--Campaign Progress-->
     
    <MappingConverter x:Key="A_Converter_CampaignProgressThemeToImageSource">
        <local:MappingConverterEntry Key="{x:Static local:CampaignProgressTheme.None}" Value="" />
        <local:MappingConverterEntry Key="{x:Static local:CampaignProgressTheme.Asphalt}" Value="/ForzaUI;component/Textures/Data_Bound/Horizon_Map/pins/CampaignProgress/finish_asphalt" />
        <local:MappingConverterEntry Key="{x:Static local:CampaignProgressTheme.CrossCountry}" Value="/ForzaUI;component/Textures/Data_Bound/Horizon_Map/pins/CampaignProgress/finish_cross_country" />
        <local:MappingConverterEntry Key="{x:Static local:CampaignProgressTheme.Dirt}" Value="/ForzaUI;component/Textures/Data_Bound/Horizon_Map/pins/CampaignProgress/finish_dirt" />
        <local:MappingConverterEntry Key="{x:Static local:CampaignProgressTheme.Drag}" Value="/ForzaUI;component/Textures/Data_Bound/Horizon_Map/pins/CampaignProgress/finish_drag" />
        <local:MappingConverterEntry Key="{x:Static local:CampaignProgressTheme.Milestone}" Value="/ForzaUI;component/Textures/Data_Bound/Horizon_Map/pins/CampaignProgress/finish_milestone" />
        <local:MappingConverterEntry Key="{x:Static local:CampaignProgressTheme.Street}" Value="/ForzaUI;component/Textures/Data_Bound/Horizon_Map/pins/CampaignProgress/finish_street" />
        <local:MappingConverterEntry Key="{x:Static local:CampaignProgressTheme.Touge}" Value="/ForzaUI;component/Textures/Data_Bound/Horizon_Map/pins/CampaignProgress/finish_touge" />
    </MappingConverter>
    
    <local:MappingConverter x:Key="A_Converter_CampaignProgressThemeToColorblindSuffix" Default=".png">
        <local:MappingConverterEntry Key="{x:Static local:CampaignProgressTheme.None}" Value="" />
        <local:MappingConverterEntry Key="{x:Static local:CampaignProgressTheme.Dirt}" Value="{StaticResource A_String_ColorblindModeSuffix_Basic}" />
    </local:MappingConverter>


    <local:MappingConverter x:Key="A_MappingConverter_CampaignProgress_IsWonToText">
        <local:MappingConverterEntry Key="{StaticResource A_Boolean_True}" Value="{local:Loc Map.IDS_MapPin_CampaignProgress_Won}" />
        <local:MappingConverterEntry Key="{StaticResource A_Boolean_False}" Value="{local:Loc Map.IDS_MapPin_CampaignProgress_NotWon}" />
    </local:MappingConverter>

    <local:MappingConverter x:Key="A_MappingConverter_CampaignProgress_IsFinishedToText">
        <local:MappingConverterEntry Key="{StaticResource A_Boolean_True}" Value="{local:Loc Map.IDS_MapPin_CampaignProgress_Finished}" />
        <local:MappingConverterEntry Key="{StaticResource A_Boolean_False}" Value="{local:Loc Map.IDS_MapPin_CampaignProgress_NotFinished}" />
    </local:MappingConverter>

    <Style x:Key="A_Style_FZMaterial_MapPinCampaignProgress_FinishedIcon"
           TargetType="local:FZMaterial">
        <Setter Property="VerticalAlignment" Value="Center" />
        <Setter Property="HorizontalAlignment" Value="Center" />
        <Setter Property="Width" Value="72"/>
        <Setter Property="Height" Value="37"/>
        <Setter Property="Margin" Value="0,5"/>
        <Setter Property="ImageSource" Value="/ForzaUI;component/Textures/Data_Bound/Horizon_Map/pins/CampaignProgress/finish_grey.png"/>
        <Setter Property="local:MultiStringFormatter.Format" Value="{StaticResource A_String_01FormatString}"/>
        <Setter Property="local:MultiStringFormatter.Param0" Value="{Binding Theme, Converter={StaticResource A_Converter_CampaignProgressThemeToImageSource}}"/>
        <Setter Property="local:MultiStringFormatter.Param1" Value="{Binding Theme, Converter={StaticResource A_Converter_CampaignProgressThemeToColorblindSuffix}}" />
        <Style.Triggers>
            <DataTrigger Binding="{Binding IsFinished}" Value="True">
                <Setter Property="ImageSource" Value="{Binding (local:MultiStringFormatter.Output), RelativeSource={RelativeSource Self}}"/>
            </DataTrigger>
        </Style.Triggers>
    </Style>
       
    <Style x:Key="A_Style_FZMaterial_MapPinCampaignProgress_WonIcon"
           TargetType="local:FZMaterial">
        <Setter Property="VerticalAlignment" Value="Center" />
        <Setter Property="HorizontalAlignment" Value="Center" />
        <Setter Property="Width" Value="72"/>
        <Setter Property="Height" Value="37"/>
        <Setter Property="Margin" Value="0,5"/>
        <Setter Property="ImageSource" Value="/ForzaUI;component/Textures/Data_Bound/Horizon_Map/pins/CampaignProgress/won_grey.png"/>
        <Style.Triggers>
            <DataTrigger Binding="{Binding IsWon}" Value="True">
                <Setter Property="ImageSource" Value="/ForzaUI;component/Textures/Data_Bound/Horizon_Map/pins/CampaignProgress/won.png"/>
            </DataTrigger>
        </Style.Triggers>
    </Style>
    
    <Style x:Key="A_Style_FZMaterial_MapPinCampaignProgress_BackgroundGild"
       TargetType="local:FZMaterial">
        <Setter Property="VerticalAlignment" Value="Center" />
        <Setter Property="HorizontalAlignment" Value="Center" />
        <Setter Property="Width" Value="188"/>
        <Setter Property="Height" Value="38"/>
        <Setter Property="Color" Value="{StaticResource A_Color_Transparent}"/>
        <Style.Triggers>
            <DataTrigger Binding="{Binding (local:BindingProxy.A), RelativeSource={RelativeSource Self}}" Value="True">
                <Setter Property="ImageSource" Value="/ForzaUI;component/Textures/Data_Bound/Horizon_Map/pins/CampaignProgress/race_gold.png"/>
                <Setter Property="Color" Value="{StaticResource A_Color_WhitePanel}"/>
            </DataTrigger>
        </Style.Triggers>
    </Style>
        
    <Style x:Key="A_Style_FZTextBlock_MapPinCampaignProgress_FinishedWonText"
           TargetType="local:FZTextBlock"
           BasedOn="{StaticResource A_Style_FZTextBlock_HorizonA}">
        <Setter Property="CapHeight" Value="18" />
        <Setter Property="Color" Value="{Binding ActiveTrack, RelativeSource={RelativeSource AncestorType=Page}, Converter={StaticResource A_Converter_ExpansionToStandardTextColour}}" />
        <Setter Property="MaxHeight" Value="25"/>
        <Setter Property="VerticalAlignment" Value="Center"/>
        <Setter Property="HorizontalAlignment" Value="Center"/>
        <Setter Property="AutoScroll" Value="{StaticResource H_AutoScrollSettings_Horizontal_Title}"/>
        <Setter Property="AutoScroll.AllowScrolling" Value="True"/>
        <Setter Property="Stretch" Value="None"/>
    </Style>
    
    <ControlTemplate x:Key="A_ControlTemplate_MapPinCampaignProgressInfo">
        <StackPanel Visibility="{Binding IsEnabled, Converter={StaticResource A_FZBooleanToVisibilityConverter}}"
                    Margin="16,10,16,0">

            <DockPanel>
                <local:FZMaterial x:Name="FinishedBox"
                                  DockPanel.Dock="Left"
                                  Color="{StaticResource H_Color_Primary_Grey_90pc}">
                    <DockPanel>
                        <local:FZMaterial x:Name="FinishedTextBackground"
                                          DockPanel.Dock="Bottom"
                                          Style="{StaticResource A_Style_FZMaterial_MapPinCampaignProgress_BackgroundGild}"
                                          local:BindingProxy.A="{Binding IsFinished}">
                            <local:FZTextBlock x:Name="FinishedText"
                                               Style="{StaticResource A_Style_FZTextBlock_MapPinCampaignProgress_FinishedWonText}"
                                               Text="{Binding IsFinished, Converter={StaticResource A_MappingConverter_CampaignProgress_IsFinishedToText}}"/>
                        </local:FZMaterial>
                        <local:FZMaterial x:Name="FinishedIcon"
                                          Style="{StaticResource A_Style_FZMaterial_MapPinCampaignProgress_FinishedIcon}"/>
                    </DockPanel>
                </local:FZMaterial>

                <Decorator Width="10"
                           DockPanel.Dock="Left"/>

                <local:FZMaterial x:Name="WonBox"
                                  Color="{StaticResource H_Color_Primary_Grey_90pc}">
                    <DockPanel>
                        <local:FZMaterial x:Name="WonTextBackground"
                                          DockPanel.Dock="Bottom"
                                          Style="{StaticResource A_Style_FZMaterial_MapPinCampaignProgress_BackgroundGild}"
                                          local:BindingProxy.A="{Binding IsWon}">
                            <local:FZTextBlock x:Name="WonText"
                                               Style="{StaticResource A_Style_FZTextBlock_MapPinCampaignProgress_FinishedWonText}"
                                               Text="{Binding IsWon, Converter={StaticResource A_MappingConverter_CampaignProgress_IsWonToText}}"/>
                        </local:FZMaterial>
                        <local:FZMaterial x:Name="WonIcon"
                                          Style="{StaticResource A_Style_FZMaterial_MapPinCampaignProgress_WonIcon}"/>
                    </DockPanel>
                </local:FZMaterial>
            </DockPanel>

            <!--Best Position Text-->
            <local:FZTextBlock Style="{StaticResource A_Style_FZTextBlock_PersonalBest}"
                               Text="{Binding BestFinishText}"
                               Visibility="{Binding BestFinishText, Converter={StaticResource A_StringVisConverter}}"/>

        </StackPanel>
    </ControlTemplate>
    
    <!--Seasonal Info-->
    <local:FZMaterialPresetRoundtangle x:Key="A_FZMaterialPresetRoundtangle_MapPinSesonal"
                                       BasedOn="{StaticResource A_FZMaterialPreset_FlatPanel_Base}"
                                       GradientColorA="#FF6214"
                                       GradientColorB="#FC0254"
                                       GradientAngle="90"
                                       CornerRadius="0"/>

    <local:FZMaterialPresetRoundtangle x:Key="A_FZMaterialPresetRoundtangle_MapPinEvolvingWorld"
                                       BasedOn="{StaticResource A_FZMaterialPreset_FlatPanel_Base}"
                                       GradientColorA="#CA238F"
                                       GradientColorB="#39BCD3"
                                       GradientAngle="90"
                                       CornerRadius="0"/>

    <local:MappingConverter x:Key="A_Converter_SeasonalThemeCategoryToPreset" Default="">
        <local:MappingConverterEntry Key="{x:Static local:SeasonalInfoTheme.Series}" Value="{StaticResource A_FZMaterialPresetRoundtangle_MapPinSesonal}" />
        <local:MappingConverterEntry Key="{x:Static local:SeasonalInfoTheme.EvolvingWorld}" Value="{StaticResource A_FZMaterialPresetRoundtangle_MapPinEvolvingWorld}" />
    </local:MappingConverter>

    <Style x:Key="A_Style_FZMaterial_SeasonalBackground"
           TargetType="local:FZMaterial">
        <Setter Property="Margin" Value="0" />
        <Setter Property="Visibility" Value="{Binding IsEnabled, Converter={StaticResource A_FZBooleanToVisibilityConverter}}" />
        <Setter Property="Preset" Value="{Binding SeasonalTheme, Converter={StaticResource A_Converter_SeasonalThemeCategoryToPreset}}" />
        <Style.Triggers>
            <MultiDataTrigger>
                <MultiDataTrigger.Conditions>
                    <Condition Binding="{Binding SnapContext.ProgressInfo.IsEnabled, RelativeSource={RelativeSource FindAncestor, AncestorType={Type Page}}}" Value="{StaticResource A_Boolean_False}" />
                </MultiDataTrigger.Conditions>
                <Setter Property="Margin" Value="0,16,0,0" />
            </MultiDataTrigger>
        </Style.Triggers>
    </Style>

    <Style x:Key="A_Style_FZTextBlock_SeasonalB"
           TargetType="local:FZTextBlock"
           BasedOn="{StaticResource A_Style_FZTextBlock_HorizonB}">
        <Setter Property="CapHeight" Value="18"/>
        <Setter Property="Margin" Value="0"/>
        <Setter Property="HorizontalAlignment" Value="Left"/>
        <Setter Property="Color" Value="{StaticResource H_Color_Primary_Black}"/>
    </Style>

    <Style x:Key="A_Style_FZTextBlock_SeasonalA"
           TargetType="local:FZTextBlock"
           BasedOn="{StaticResource A_Style_FZTextBlock_HorizonA}">
        <Setter Property="CapHeight" Value="18"/>
        <Setter Property="Margin" Value="0,10,0,0"/>
        <Setter Property="HorizontalAlignment" Value="Left"/>
        <Setter Property="Color" Value="{StaticResource H_Color_Primary_Black}"/>
    </Style>

    <local:MappingConverter x:Key="A_Converter_IsCompletedToSeasonalTicketImageSource"
                            Default="/ForzaUI;component/Textures/Data_Bound/Horizon_Map/pins/Seasonal/ticket.png">
        <local:MappingConverterEntry Key="{StaticResource A_Boolean_True}" Value="/ForzaUI;component/Textures/Data_Bound/Horizon_Map/pins/Seasonal/ticket_completed.png" />
    </local:MappingConverter>

    <local:MappingConverter x:Key="A_Converter_IsCompletedToSeasonalTicketImageSource_Short"
                            Default="/ForzaUI;component/Textures/Data_Bound/Horizon_Map/pins/Seasonal/ticket_short.png">
        <local:MappingConverterEntry Key="{StaticResource A_Boolean_True}" Value="/ForzaUI;component/Textures/Data_Bound/Horizon_Map/pins/Seasonal/ticket_short_completed.png" />
    </local:MappingConverter>

    <local:MappingConverter x:Key="A_Converter_TertiaryCategoryToImageSource"
                            Default="{x:Null}">
        <local:MappingConverterEntry Key="{x:Static local:UIRewardType.Credits}" Value="/ForzaUI;component/Textures/Data_Bound/Horizon_Map/pins/Seasonal/reward_credits.png" />
        <local:MappingConverterEntry Key="{x:Static local:UIRewardType.Currency}" Value="/ForzaUI;component/Textures/Data_Bound/Horizon_Map/pins/Seasonal/reward_currency.png" />
        <local:MappingConverterEntry Key="{x:Static local:UIRewardType.Car}" Value="/ForzaUI;component/Textures/Data_Bound/Horizon_Map/pins/Seasonal/reward_car.png" />
        <local:MappingConverterEntry Key="{x:Static local:UIRewardType.Clothing}" Value="/ForzaUI;component/Textures/Data_Bound/Horizon_Map/pins/Seasonal/reward_cosmetic.png" />
        <local:MappingConverterEntry Key="{x:Static local:UIRewardType.Horn}" Value="/ForzaUI;component/Textures/Data_Bound/Horizon_Map/pins/Seasonal/reward_horn.png" />
        <local:MappingConverterEntry Key="{x:Static local:UIRewardType.QuickChatPhrase}" Value="/ForzaUI;component/Textures/Data_Bound/Horizon_Map/pins/Seasonal/reward_forzalink.png" />
        <local:MappingConverterEntry Key="{x:Static local:UIRewardType.Emote}" Value="/ForzaUI;component/Textures/Data_Bound/Horizon_Map/pins/Seasonal/reward_emote.png" />
        <local:MappingConverterEntry Key="{x:Static local:UIRewardType.SuperWheelspin}" Value="/ForzaUI;component/Textures/Data_Bound/Horizon_Map/pins/Seasonal/reward_superwheelspin.png" />
        <local:MappingConverterEntry Key="{x:Static local:UIRewardType.Wheelspin}" Value="/ForzaUI;component/Textures/Data_Bound/Horizon_Map/pins/Seasonal/reward_wheelspin.png" />
        <local:MappingConverterEntry Key="{x:Static local:UIRewardType.BarnFindRumour}" Value="/ForzaUI;component/Textures/Data_Bound/Horizon_Map/pins/Seasonal/reward_barnfindrumour.png" />
        <local:MappingConverterEntry Key="{x:Static local:UIRewardType.SkillPoints}" Value="/ForzaUI;component/Textures/Data_Bound/Horizon_Map/pins/Seasonal/reward_skillpoints.png" />
        <local:MappingConverterEntry Key="{x:Static local:UIRewardType.LiveryDecals}" Value="/ForzaUI;component/Textures/Data_Bound/Horizon_Map/pins/Seasonal/reward_decal.png" />
    </local:MappingConverter>

    <Style x:Key="A_Style_FZMaterial_SeasonalRewardIcon"
           TargetType="FZMaterial">
        <Setter Property="Width" Value="54"/>
        <Setter Property="Height" Value="54"/>
        <Setter Property="Margin" Value="0,-4,-6,0"/>
        <Setter Property="ImageSource" Value="{Binding TertiaryCategory, Converter={StaticResource A_Converter_TertiaryCategoryToImageSource}}"/>
        <Setter Property="HorizontalAlignment" Value="Right"/>
        <Setter Property="VerticalAlignment" Value="Center"/>
        <Setter Property="Visibility" Value="Collapsed"/>
        <Style.Triggers>
            <DataTrigger
                    Binding="{Binding TertiaryCategory, Converter={StaticResource H_TrueIfNotNull}}"
                    Value="True">
                <Setter Property="Visibility" Value="Visible"/>
            </DataTrigger>
        </Style.Triggers>
    </Style>
    
    <!--Ticket visuals change depending on if the seasonal event has restrictions or not #pgEOzdemir-->
    <Style x:Key="A_Style_FZMaterial_Ticket"
           TargetType="FZMaterial">
        <Setter Property="Width" Value="386"/>
        <Setter Property="Height" Value="246"/>
        <Setter Property="Margin" Value="0,12,0,0"/>
        <Setter Property="HorizontalAlignment" Value="Center"/>
        <Setter Property="ImageSource" Value="{Binding IsComplete, Converter={StaticResource A_Converter_IsCompletedToSeasonalTicketImageSource}}"/>
        <Setter Property="Visibility" Value="{Binding IsTicketEnabled, Converter={StaticResource A_FZBooleanToVisibilityConverter}}"/>
        <Style.Triggers>
            <DataTrigger Binding="{Binding CarInfoTitle}" Value="">
                <Setter Property="Height" Value="161" />
                <Setter Property="ImageSource" Value="{Binding IsComplete, Converter={StaticResource A_Converter_IsCompletedToSeasonalTicketImageSource_Short}}" />
            </DataTrigger>
            <DataTrigger Binding="{Binding CarInfoTitle}" Value="{x:Null}">
                <Setter Property="Height" Value="161" />
                <Setter Property="ImageSource" Value="{Binding IsComplete, Converter={StaticResource A_Converter_IsCompletedToSeasonalTicketImageSource_Short}}" />
            </DataTrigger>
        </Style.Triggers>
    </Style>

    <Style x:Key="A_Style_StackPanel_TicketTop">
        <Setter Property="Height" Value="132"/>
        <Style.Triggers>
            <DataTrigger Binding="{Binding CarInfoTitle}" Value="">
                <Setter Property="Height" Value="47" />
            </DataTrigger>
            <DataTrigger Binding="{Binding CarInfoTitle}" Value="{x:Null}">
                <Setter Property="Height" Value="47" />
            </DataTrigger>
        </Style.Triggers>
    </Style>
    
    <local:MappingConverter x:Key="A_Converter_SeasonalThemeCategoryToTimerImage" Default="">
        <local:MappingConverterEntry Key="{x:Static local:SeasonalInfoTheme.Series}" Value="/ForzaUI;component/Textures/Data_Bound/Horizon_Map/pins/Seasonal/timer.png" />
        <local:MappingConverterEntry Key="{x:Static local:SeasonalInfoTheme.EvolvingWorld}" Value="/ForzaUI;component/Textures/Data_Bound/Horizon_Map/pins/Seasonal/evolving_world_timer.png" />
    </local:MappingConverter>

    <ControlTemplate x:Key="A_ControlTemplate_MapPinSeasonalInfo">
        <ControlTemplate.Resources>
            <Style x:Key="A_Style_NetworkCountdownControl_TimeRemaining_Map"
                TargetType="local:NetworkCountdownControl">
                <Setter Property="CountdownType" Value="{Binding TitleCountdownType}" />
                <Setter Property="GenerateFormattedString" Value="True" />
                <Setter Property="AbbreviateFormattedDurationString" Value="{local:Loc Map.IDS_MapPin_SeasonTimeRemainingFormat}" />
                <Setter Property="Visibility" Value="Collapsed" />
            </Style>
        </ControlTemplate.Resources>
        <local:FZMaterial Style="{DynamicResource A_Style_FZMaterial_SeasonalBackground}">
            <Grid Margin="16">
                <FZMaterial Width="44"
                            Height="44"
                            Margin="0,4"
                            HorizontalAlignment="Right"
                            VerticalAlignment="Top"
                            ImageSource="{Binding SeasonalTheme,Converter={StaticResource A_Converter_SeasonalThemeCategoryToTimerImage}}"/>

                <StackPanel>
                    <!--Title-->
                    <local:FZTextBlock Style="{StaticResource A_Style_FZTextBlock_SeasonalB}"
                                       Text="{Binding Title}"
                                       Visibility="{Binding Title, Converter={StaticResource A_StringVisConverter}}"
                                       Color="{StaticResource H_Color_Primary_White}"/>

                    <!--Description-->
                    <local:NetworkCountdownControl
                                               x:Name="TimeRemainingControl"
                                               Style="{StaticResource A_Style_NetworkCountdownControl_TimeRemaining_Map}" />
                    <local:FZTextBlock Color="{StaticResource H_Color_Primary_White}"
                                       Text="{Binding TimeRemaining, ElementName=TimeRemainingControl}"
                                       Style="{StaticResource A_Style_FZTextBlock_SeasonalA}"
                                       CapHeight="22"/>

                    <!--Seasonal Ticket-->
                    <local:FZMaterial x:Name="SeasonalTicketBackground"
                                      Style="{StaticResource A_Style_FZMaterial_Ticket}">
                        
                        <StackPanel Margin="12,12,12,22">

                            <StackPanel x:Name="TicketTopPart"
                                        Style="{StaticResource A_Style_StackPanel_TicketTop}">
                                
                                <FZTextBlock x:Name="SeasonalSubTitle"
                                             Text="{Binding SubTitle}"
                                             Style="{StaticResource A_Style_FZTextBlock_SeasonalB}"/>
                                <FZTextBlock x:Name="SeasonalSubDescription"
                                             Text="{Binding SubDescription}"
                                             Style="{StaticResource A_Style_FZTextBlock_SeasonalA}"/>


                                <local:FZMaterial x:Name="Seperator"
                                                  Opacity="0.4"
                                                  Height="2"
                                                  Margin="0,12,0,10"
                                                  Color="{StaticResource H_Color_Primary_Black}"
                                                  Visibility="{Binding CarInfoTitle, Converter={StaticResource A_StringVisConverter}}"/>

                                <FZTextBlock x:Name="SeasonalCarInfoTitle"
                                             Text="{Binding CarInfoTitle}"
                                             Style="{StaticResource A_Style_FZTextBlock_SeasonalB}"
                                             Visibility="{Binding CarInfoTitle, Converter={StaticResource A_StringVisConverter}}"/>

                                <DockPanel Margin="0,10,0,0"
                                           Visibility="{Binding CarInfoTitle, Converter={StaticResource A_StringVisConverter}}">
                                    
                                    <Control DockPanel.Dock="Left"  
                                             Style="{StaticResource H_Style_TemplatedElement_CarClassBadge_White}"
                                             HorizontalAlignment="Left"
                                             Height="35"
                                             local:BindingProxy.A="{Binding CarInfo.CarPIMaxRestriction}"
                                             local:BindingProxy.B="{Binding CarInfo.CarClassRestriction}"
                                             local:BindingProxy.C="{Binding CarInfo.CarPIMinRestriction}"
                                             Visibility="{Binding CarInfo.HasCarClassOrPIRestriction, FallbackValue=Collapsed, Converter={StaticResource A_FZBooleanToVisibilityConverter}}"
                                             Margin="0,0,9,0"/>

                                    <FZTextBlock x:Name="SeasonalCarInfoDescription"
                                                 Text="{Binding CarInfoDescription}"
                                                 Margin="1,0,0,1"
                                                 Style="{StaticResource A_Style_FZTextBlock_SeasonalA}"
                                                 VerticalAlignment="Center"
                                                 AutoScroll="{StaticResource A_AutoScrollSettings_MapPinTitle}"
                                                 AutoScroll.AllowScrolling="True" 
                                                 Stretch="None"/>
                                </DockPanel>
                            </StackPanel>


                            <local:FZMaterial Width="36"
                                              Height="36"
                                              ImageSource="/ForzaUI;component/Textures/Data_Bound/Horizon_Map/pins/Seasonal/present.png"/>

                            <!--Ticket Bottom Part-->
                            <Grid Height="45">
                                <StackPanel>
                                    <FZTextBlock x:Name="SeasonalTertiaryTitle"
                                                 Text="{Binding TertiaryTitle}"
                                                 Style="{StaticResource A_Style_FZTextBlock_SeasonalB}"/>
                                    <FZTextBlock x:Name="SeasonalTertiaryDescription"
                                                 Text="{Binding TertiaryDescription}"
                                                 Style="{StaticResource A_Style_FZTextBlock_SeasonalA}"/>

                                </StackPanel>

                                <local:FZMaterial Style="{StaticResource A_Style_FZMaterial_SeasonalRewardIcon}"/>
                            </Grid>
                            
                        </StackPanel>

                    </local:FZMaterial>
                    
                </StackPanel>
            </Grid>
        </local:FZMaterial>

    </ControlTemplate>
    
    
    <local:MappingConverter x:Key="A_Converter_PinProgressThemeToPrimaryColor"
                            Default="{StaticResource H_Color_Primary_White}">
        <local:MappingConverterEntry Key="{x:Static local:PinProgressTheme.House}" Value="{StaticResource A_Color_Theme_Primary_House}" />
        <local:MappingConverterEntry Key="{x:Static local:PinProgressTheme.RoadRace}" Value="{StaticResource A_Color_Theme_Primary_RoadRace}" />
        <local:MappingConverterEntry Key="{x:Static local:PinProgressTheme.DirtRace}" Value="{StaticResource A_Color_Theme_Primary_DirtRace}" />
        <local:MappingConverterEntry Key="{x:Static local:PinProgressTheme.CrossCountry}" Value="{StaticResource A_Color_Theme_Primary_CrossCountry}" />
        <local:MappingConverterEntry Key="{x:Static local:PinProgressTheme.Goliath}" Value="{StaticResource A_Color_Theme_Primary_Goliath}" />
        <local:MappingConverterEntry Key="{x:Static local:PinProgressTheme.Boards}" Value="{StaticResource A_Color_Theme_Primary_Boards}" />
        <local:MappingConverterEntry Key="{x:Static local:PinProgressTheme.PRStunts}" Value="{StaticResource A_Color_Theme_Primary_PRStunts}" />
        <local:MappingConverterEntry Key="{x:Static local:PinProgressTheme.WristbandEvents}" Value="{StaticResource A_Color_Theme_Primary_WristbandEvents}" />
        <local:MappingConverterEntry Key="{x:Static local:PinProgressTheme.Stories}" Value="{StaticResource A_Color_Theme_Primary_Stories}" />
        <local:MappingConverterEntry Key="{x:Static local:PinProgressTheme.Jobs}" Value="{StaticResource A_Color_Theme_Primary_Jobs}" />
    </local:MappingConverter>

    <local:MappingConverter x:Key="A_Converter_PinProgressThemeToSecondaryColor"
                            Default="{StaticResource H_Color_Primary_Black}">
        <local:MappingConverterEntry Key="{x:Static local:PinProgressTheme.House}" Value="{StaticResource A_Color_Theme_Secondary_House}" />
        <local:MappingConverterEntry Key="{x:Static local:PinProgressTheme.RoadRace}" Value="{StaticResource A_Color_Theme_Secondary_RoadRace}" />
        <local:MappingConverterEntry Key="{x:Static local:PinProgressTheme.DirtRace}" Value="{StaticResource A_Color_Theme_Secondary_DirtRace}" />
        <local:MappingConverterEntry Key="{x:Static local:PinProgressTheme.CrossCountry}" Value="{StaticResource A_Color_Theme_Secondary_CrossCountry}" />
        <local:MappingConverterEntry Key="{x:Static local:PinProgressTheme.Goliath}" Value="{StaticResource A_Color_Theme_Secondary_Goliath}" />
        <local:MappingConverterEntry Key="{x:Static local:PinProgressTheme.Boards}" Value="{StaticResource A_Color_Theme_Secondary_Boards}" />
        <local:MappingConverterEntry Key="{x:Static local:PinProgressTheme.PRStunts}" Value="{StaticResource A_Color_Theme_Secondary_PRStunts}" />
        <local:MappingConverterEntry Key="{x:Static local:PinProgressTheme.WristbandEvents}" Value="{StaticResource A_Color_Theme_Secondary_WristbandEvents}" />
        <local:MappingConverterEntry Key="{x:Static local:PinProgressTheme.Stories}" Value="{StaticResource A_Color_Theme_Secondary_Stories}" />
        <local:MappingConverterEntry Key="{x:Static local:PinProgressTheme.Jobs}" Value="{StaticResource A_Color_Theme_Secondary_Jobs}" />
    </local:MappingConverter>

    <Style x:Key="A_Style_ProgressBar_PinProgress"
           TargetType="{x:Type ProgressBar}">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ProgressBar}">
                    <DockPanel x:Name="PART_Track"
                                   Height="45">
                        <local:FZMaterial x:Name="PART_Indicator"
                                              Color="{Binding Theme, Converter={StaticResource A_Converter_PinProgressThemeToPrimaryColor}}"
                                              Height="45"
                                              ClipToBounds="True"
                                              HorizontalAlignment="Left" />
                    </DockPanel>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <local:MappingConverter x:Key="A_Converter_WhiteIfGreaterThanOrEqual"
                            Default="{StaticResource H_Color_Primary_White}">
        <local:MappingConverterEntry Key="{x:Static local:CompareResult.GreaterThan}" Value="{StaticResource H_Color_Primary_White}" />
        <local:MappingConverterEntry Key="{x:Static local:CompareResult.Equal}" Value="{StaticResource H_Color_Primary_Black}" />
    </local:MappingConverter>

    <local:MappingConverter x:Key="A_Converter_ProgressToTextColor"
                          Default="{StaticResource H_Color_Primary_White}">
        <local:MappingConverterEntry Key="{StaticResource A_Boolean_True}" Value="{StaticResource H_Color_Primary_Black}"/>
    </local:MappingConverter>

    <Style x:Key="A_Style_FZTextBlock_MapPinProgressName" BasedOn="{StaticResource A_Style_FZTextBlock_AutoScroll_MapPin_TitleText}" TargetType="local:FZTextBlock">
        <Setter Property="Visibility" Value="{Binding Name, Converter={StaticResource A_StringVisConverter}}" />
        <Setter Property="FontFamily" Value="Horizon_B"/>
        <Setter Property="Text" Value="{Binding Name}" />
        <Setter Property="CapHeight" Value="17" />
        <Setter Property="Color" Value="{Binding IsComplete, Converter={StaticResource A_Converter_ProgressToTextColor}}" />
        <Setter Property="VerticalAlignment" Value="Center" />
        <Setter Property="Margin" Value="0,0,5,0" />
    </Style>

    <Style x:Key="A_Style_FZTextBlock_MapPinProgressValue" BasedOn="{StaticResource A_Style_FZTextBlock_AutoScroll_MapPin_TitleText}" TargetType="local:FZTextBlock">
        <Setter Property="Visibility" Value="{Binding Description, Converter={StaticResource A_StringVisConverter}}" />
        <Setter Property="FontFamily" Value="Horizon_A_tf"/>
        <Setter Property="Text" Value="{Binding Description}" />
        <Setter Property="CapHeight" Value="17" />
        <Setter Property="Color" Value="{Binding IsComplete, Converter={StaticResource A_Converter_ProgressToTextColor}}" />
        <Setter Property="VerticalAlignment" Value="Center" />
        <Setter Property="HorizontalAlignment" Value="Right" />
        <Setter Property="Margin" Value="0" />
    </Style>

    <!--Progress Bar Template-->
    <ControlTemplate x:Key="A_ControlTemplate_MapPinProgressBar">
        <Grid Height="45"
              Margin="0,16,0,0"
              Visibility="{Binding IsEnabled, Converter={StaticResource A_FZBooleanToVisibilityConverter}}">

            <!--Midas-->
            <local:FZMaterial x:Name="ProgressMidas"
                              Visibility="{Binding IsComplete, Converter={StaticResource A_FZBooleanToVisibilityConverter}}"
                              Preset="{StaticResource A_FZMaterialPreset_FlatPanel_Base}"
                              ImageSource="/ForzaUI;component/Textures/Data_Bound/Horizon_Map/pins/completed_progress.png"/>

            <!--Progress Bar-->
            <local:FZMaterial x:Name="PinProgressBarBackground"
                              Visibility="{Binding IsComplete, Converter={StaticResource A_FZBooleanToVisibilityConverter_Inverse}}"
                              DockPanel.Dock="Right"
                              Color="{Binding Theme, Converter={StaticResource A_Converter_PinProgressThemeToSecondaryColor}}"
                              Preset="{StaticResource A_FZMaterialPreset_FlatPanel_Base}">
                <ProgressBar x:Name="PinProgressBar"
                             Focusable="False"
                             Style="{StaticResource A_Style_ProgressBar_PinProgress}"
                             Minimum="0"
                             Maximum="1"
                             Value="{Binding Value}" />
            </local:FZMaterial>

            <DockPanel Margin="16,14"
                       VerticalAlignment="Center">
                
                <local:FZTextBlock DockPanel.Dock="Right"
                                   x:Name="ProgressValueText"
                                   Style="{StaticResource A_Style_FZTextBlock_MapPinProgressValue}"/>

                <local:FZTextBlock x:Name="ProgressName"
                                   Style="{StaticResource A_Style_FZTextBlock_MapPinProgressName}"/>

            </DockPanel>
        </Grid>
    </ControlTemplate>

    <!--Score Info-->
    <local:MappingConverter x:Key="A_Converter_ExpansionToStarColor_Unachieved" Default="{StaticResource A_Color_MapPinStar_Unachieved}">
        <local:MappingConverterEntry Key="{x:Static local:XAMLTrack.ExpansionOne}" Value="{StaticResource A_Color_HW_Dark_Blue_40pc}" />
    </local:MappingConverter>

    <Style x:Key="A_Style_FZMaterial_MapPin_ProgressStar"
           TargetType="local:FZMaterial">
        <Setter Property="local:MultiStringFormatter.Format" Value="{StaticResource A_String_01FormatString}" />
        <Setter Property="local:MultiStringFormatter.Param0" Value="{Binding ActiveTrack, RelativeSource={RelativeSource AncestorType=Page}, Converter={StaticResource A_Converter_ActiveTrackToMapPinIconLocation}}" />
        <Setter Property="ImageSource" Value="{Binding (local:MultiStringFormatter.Output), RelativeSource={RelativeSource Self}}" />
        <Setter Property="local:MultiStringFormatter.Param1" Value="star.png" />
        <Setter Property="Height" Value="29" />
        <Setter Property="Width" Value="29" />
        <Setter Property="Color" Value="{Binding ActiveTrack, RelativeSource={RelativeSource AncestorType=Page}, Converter={StaticResource A_Converter_ExpansionToStarColor_Unachieved}}" />
        <Style.Triggers>
            <DataTrigger Binding="{Binding Tag, RelativeSource={RelativeSource AncestorType=ContentControl}}" Value="Achieved">
                <Setter Property="Color" Value="{StaticResource H_Color_Primary_White}" />
                <Setter Property="ImageSource" Value="{StaticResource Image_GoldStar}" />
            </DataTrigger>
        </Style.Triggers>
    </Style>

    <Style x:Key="A_Style_FZTextBlock_MedalScoreText"
                           BasedOn="{StaticResource A_Style_FZTextBlock_HorizonA}"
                           TargetType="local:FZTextBlock">
        <Setter Property="Color" Value="{Binding ActiveTrack, RelativeSource={RelativeSource AncestorType=Page}, Converter={StaticResource A_Converter_ExpansionToStandardTextColour}}" />
        <Setter Property="CapHeight" Value="18" />
        <Setter Property="HorizontalAlignment" Value="Center" />
        <Setter Property="VerticalAlignment" Value="Center" />
        <Setter Property="Margin" Value="8,0" />
    </Style>
    <Style x:Key="A_Style_UniformGrid_StarsLayout"
                           TargetType="UniformGrid">
        <Setter Property="Tag" Value="0" />
        <Setter Property="Height" Value="85" />
        <Setter Property="Margin" Value="0,0,0,0" />
        <Setter Property="Visibility" Value="{Binding IsStarsEnabled, Converter={StaticResource A_FZBooleanToVisibilityConverter}}" />
        <Style.Triggers>
            <DataTrigger Binding="{Binding HasBronze}" Value="True">
                <Setter Property="Tag" Value="1" />
            </DataTrigger>
            <DataTrigger Binding="{Binding HasSilver}" Value="True">
                <Setter Property="Tag" Value="2" />
            </DataTrigger>
            <DataTrigger Binding="{Binding HasGold}" Value="True">
                <Setter Property="Tag" Value="3" />
            </DataTrigger>
            <DataTrigger Binding="{Binding IsDiscovered}" Value="False">
                <Setter Property="Visibility" Value="Collapsed" />
            </DataTrigger>
        </Style.Triggers>
    </Style>

    <Style x:Key="A_Style_FZMaterial_StarAchievedBackground"
           TargetType="local:FZMaterial">
        <Setter Property="Color" Value="{StaticResource H_Color_Primary_Grey_90pc}"/>
        <Setter Property="Tag" Value="{Binding Tag, RelativeSource={RelativeSource AncestorType=ContentControl}}" />
        <Setter Property="Height" Value="39" />
        <Setter Property="VerticalAlignment" Value="Bottom" />
        <Style.Triggers>
            <DataTrigger Binding="{Binding Tag, RelativeSource={RelativeSource AncestorType=ContentControl}}" Value="Achieved">
                <Setter Property="ImageSource" Value="{StaticResource Image_CompletedPRBackground}" />
                <Setter Property="Color" Value="{StaticResource H_Color_Primary_White}"/>
            </DataTrigger>
        </Style.Triggers>
    </Style>

    <Style x:Key="A_Style_StackPanel_StarContainer"
           TargetType="StackPanel">
        <Setter Property="Orientation" Value="Horizontal" />
        <Setter Property="HorizontalAlignment" Value="Center" />
        <Setter Property="VerticalAlignment" Value="Top" />
        <Setter Property="Margin" Value="0,10,0,0" />
    </Style>

    <Style x:Key="A_Style_FZRun_PersonalBest_Bold" TargetType="local:FZRun">
        <Setter Property="FontFamily" Value="Horizon_A" />
    </Style>

    <Style x:Key="A_Style_FZRun_PersonalBest_THIN" TargetType="local:FZRun">
        <Setter Property="FontFamily" Value="Horizon_B" />
    </Style>

    <MappingConverter x:Key="A_MappingConverter_MapPinScore_PersonalBest_Text" >
        <MappingConverterEntry Key="{NoCase BOLD}" Value="{StaticResource A_Style_FZRun_PersonalBest_Bold}" />
    </MappingConverter>

    <Style x:Key="A_Style_FZTextBlock_PersonalBest"
           TargetType="local:FZTextBlock">
        <Setter Property="FontFamily" Value="Horizon_B" />
        <Setter Property="CapHeight" Value="18" />
        <Setter Property="Color" Value="{Binding ActiveTrack, RelativeSource={RelativeSource AncestorType=Page}, Converter={StaticResource A_Converter_ExpansionToStandardTextColour}}" />
        <Setter Property="VerticalAlignment" Value="Center" />
        <Setter Property="Text" Value="{Binding PersonalBestText}" />
        <Setter Property="Visibility" Value="{Binding PersonalBestText, Converter={StaticResource A_StringVisConverter}}" />
        <Setter Property="Margin" Value="0,12,0,0" />
        <Setter Property="MarkupConverter" Value="{StaticResource A_MappingConverter_MapPinScore_PersonalBest_Text}" />
    </Style>

    <ControlTemplate x:Key="A_ControlTemplate_MapPinScore">
        <Grid Margin="16,12,16,0" Visibility="{Binding IsEnabled, Converter={StaticResource A_FZBooleanToVisibilityConverter}}">
            <StackPanel>
                <UniformGrid Rows="1"
                             Style="{StaticResource A_Style_UniformGrid_StarsLayout}">
                    <ContentControl Style="{StaticResource A_Style_ContentControl_MapPin3StarInfoPill}"
                                    local:BindingProxy.A="1"
                                    local:BindingProxy.B="{Binding Tag, RelativeSource={RelativeSource AncestorType=UniformGrid}}"
                                    HorizontalAlignment="Left">
                        <Grid>
                            <StackPanel Style="{StaticResource A_Style_StackPanel_StarContainer}">
                                <local:FZMaterial Style="{StaticResource A_Style_FZMaterial_MapPin_ProgressStar}"/>
                            </StackPanel>
                            <local:FZMaterial Style="{StaticResource A_Style_FZMaterial_StarAchievedBackground}">
                                <local:FZTextBlock Style="{StaticResource A_Style_FZTextBlock_MedalScoreText}"
                                                   Text="{Binding BronzeScore}" />
                            </local:FZMaterial>
                        </Grid>
                    </ContentControl>
                    <ContentControl Style="{StaticResource A_Style_ContentControl_MapPin3StarInfoPill}"
                                    local:BindingProxy.A="2"
                                    local:BindingProxy.B="{Binding Tag, RelativeSource={RelativeSource AncestorType=UniformGrid}}">
                        <Grid>
                            <StackPanel Style="{StaticResource A_Style_StackPanel_StarContainer}">
                                <local:FZMaterial Style="{StaticResource A_Style_FZMaterial_MapPin_ProgressStar}" />
                                <Decorator Width="7" />
                                <local:FZMaterial Style="{StaticResource A_Style_FZMaterial_MapPin_ProgressStar}" />
                            </StackPanel>
                            <local:FZMaterial Style="{StaticResource A_Style_FZMaterial_StarAchievedBackground}">
                                <local:FZTextBlock Style="{StaticResource A_Style_FZTextBlock_MedalScoreText}"
                                                       Text="{Binding SilverScore}" />
                            </local:FZMaterial>
                        </Grid>
                    </ContentControl>
                    <ContentControl Style="{StaticResource A_Style_ContentControl_MapPin3StarInfoPill}"
                                    local:BindingProxy.A="3"
                                    local:BindingProxy.B="{Binding Tag, RelativeSource={RelativeSource AncestorType=UniformGrid}}"
                                    HorizontalAlignment="Right">
                        <Grid>
                            <StackPanel Style="{StaticResource A_Style_StackPanel_StarContainer}">
                                <local:FZMaterial Style="{StaticResource A_Style_FZMaterial_MapPin_ProgressStar}" />
                                <Decorator Width="7" />
                                <local:FZMaterial Style="{StaticResource A_Style_FZMaterial_MapPin_ProgressStar}" />
                                <Decorator Width="7" />
                                <local:FZMaterial Style="{StaticResource A_Style_FZMaterial_MapPin_ProgressStar}" />
                            </StackPanel>
                            <local:FZMaterial Style="{StaticResource A_Style_FZMaterial_StarAchievedBackground}">
                                <local:FZTextBlock Style="{StaticResource A_Style_FZTextBlock_MedalScoreText}"
                                                       Text="{Binding GoldScore}" />
                            </local:FZMaterial>
                        </Grid>
                    </ContentControl>
                </UniformGrid>

                <!--Personal Best-->
                <local:FZTextBlock Style="{StaticResource A_Style_FZTextBlock_PersonalBest}"/>
            </StackPanel>
        </Grid>
    </ControlTemplate>

    <Style x:Key="A_Style_FZTextBlock_MapPinFooterCommandText" BasedOn="{StaticResource A_Style_FZTextBlock_AutoScroll_MapPin_TitleText}" TargetType="local:FZTextBlock">
        <Setter Property="FontFamily" Value="Horizon_B"/>
        <Setter Property="Text" Value="{Loc Map.IDS_MapPin_ViewAdventureJournal}" />
        <Setter Property="CapHeight" Value="17" />
        <Setter Property="VerticalAlignment" Value="Center" />
        <Setter Property="Color" Value="{StaticResource H_Color_Primary_White}" />
    </Style>

    <!--Footer with command-->
    <Style x:Key="A_Style_Grid_MapPinFooterWithCommand"
           TargetType="Grid">
        <Setter Property="Height" Value="40" />
        <Setter Property="Margin" Value="0" />
        <Style.Triggers>
            <DataTrigger Binding="{Binding CampaignCollectionInfo.IsEnabled}" Value="{StaticResource A_Boolean_False}">
                <Setter Property="Visibility" Value="Collapsed"/>
            </DataTrigger>
            <DataTrigger Binding="{Binding ShouldDisplayViewChallengeButton, RelativeSource={RelativeSource AncestorType=Page}}" Value="False">
                <Setter Property="Visibility" Value="Collapsed"/>
            </DataTrigger>
        </Style.Triggers>
    </Style>

    <ControlTemplate x:Key="A_ControlTemplate_MapPinFooterWithCommand">
        <Decorator x:Name="Container">
            <Grid Style="{StaticResource A_Style_Grid_MapPinFooterWithCommand}">

                <local:FZMaterial x:Name="FooterCommandBackground"
                                Color="{StaticResource H_Color_Primary_Black}"
                                Preset="{StaticResource A_FZMaterialPreset_FlatPanel_Base}"
                                Margin="0,-0.5"/>

                <DockPanel Margin="16,0">
                    <!--Input-->
                    <local:ControllerButtonControl DockPanel.Dock="Left"
                                                   Style="{StaticResource A_Style_ControllerButtonControl_Standalone}"
                                                   Button="Start"
                                                   IsHitTestVisible="False"
                                                   MaxHeight="21"
                                                   SupportsControllerInput="True" />

                    <!--Text-->
                    <local:FZTextBlock x:Name="CommandText"
                                       Style="{StaticResource A_Style_FZTextBlock_MapPinFooterCommandText}"
                                       Margin="5,14"
                                       AutoScroll="{StaticResource H_AutoScrollSettings_Horizontal_Title}"
                                       AutoScroll.AllowScrolling="True"
                                       Stretch="None"
                                       TextWrapping="NoWrap" />
                </DockPanel>
                
            </Grid>
        </Decorator>
        <ControlTemplate.Triggers>
            <MultiDataTrigger>
                <MultiDataTrigger.Conditions>
                    <Condition Binding="{Binding ProgressInfo.IsEnabled}" Value="{StaticResource A_Boolean_False}" />
                    <Condition Binding="{Binding SeasonalInfo.IsEnabled}" Value="{StaticResource A_Boolean_False}" />
                </MultiDataTrigger.Conditions>
                <Setter TargetName="Container" Property="Margin" Value="0,16,0,0" />
            </MultiDataTrigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>

    <Style x:Key="A_Style_FZTextBlock_MapPin_SeasonalText"
           BasedOn="{StaticResource A_Style_FZTextBlock_HorizonA}"
           TargetType="local:FZTextBlock">
        <Setter Property="Color" Value="{Binding ActiveTrack, RelativeSource={RelativeSource AncestorType=Page}, Converter={StaticResource A_Converter_ExpansionToStandardTextColour}}" />
        <Setter Property="CapHeight" Value="16" />
        <Setter Property="HorizontalAlignment" Value="Left" />
    </Style>
    <local:MappingConverter x:Key="A_Converter_TrackToViewAccoladesButton_Title" Default="{local:Loc Map.IDS_ViewAccolades}">
        <local:MappingConverterEntry Key="{x:Static local:XAMLTrack.ExpansionOne}" Value="{local:Loc Map.IDS_ViewMissions}" />
        <local:MappingConverterEntry Key="{x:Static local:XAMLTrack.ExpansionTwo}" Value="{local:Loc Map.IDS_ViewChallenges}" />
    </local:MappingConverter>

    <Style x:Key="A_Style_FZMaterial_MapPin_SeasonalRewardTick" 
           TargetType="local:FZMaterial">
        <Setter Property="local:MultiStringFormatter.Format" Value="{StaticResource A_String_01FormatString}" />
        <Setter Property="local:MultiStringFormatter.Param0" Value="{Binding ActiveTrack, RelativeSource={RelativeSource AncestorType=Page}, Converter={StaticResource A_Converter_ActiveTrackToMapPinIconLocation}}" />
        <Setter Property="ImageSource" Value="{Binding (local:MultiStringFormatter.Output), RelativeSource={RelativeSource Self}}" />
        <Setter Property="local:MultiStringFormatter.Param1" Value="icon_complete_opaque.png" />
        <Setter Property="Visibility" Value="Hidden" />
        <Setter Property="Margin" Value="0,0,7,4" />
        <Setter Property="VerticalAlignment" Value="Bottom" />
        <Setter Property="HorizontalAlignment" Value="Right" />
        <Setter Property="Height" Value="30" />
        <Setter Property="Width" Value="30" />
        <Setter Property="Opacity" Value="0.4" />
        <Style.Triggers>
            <DataTrigger Binding="{Binding Tag, RelativeSource={RelativeSource TemplatedParent}}" Value="Achieved">
                <Setter Property="Visibility" Value="Visible" />
            </DataTrigger>
        </Style.Triggers>
    </Style>
    
    <Style x:Key="A_Style_Grid_MapPin3StarInfoPill"
                           TargetType="Grid">
        <Setter Property="Width" Value="122" />
    </Style>

    <ControlTemplate x:Key="A_ControlTemplate_MapPin3StarInfoPill"
                     TargetType="{x:Type ContentControl}">
        <Grid Width="122"  Style="{StaticResource A_Style_Grid_MapPin3StarInfoPill}">
            <local:FZMaterial x:Name="background"
                              Color="{StaticResource H_Color_Primary_Grey_90pc}"/>
            <ContentPresenter />
        </Grid>
    </ControlTemplate>

    <Style x:Key="A_Style_ContentControl_MapPin3StarInfoPill"
           TargetType="ContentControl">
        <Setter Property="Template" Value="{StaticResource A_ControlTemplate_MapPin3StarInfoPill}" />
        <Style.Triggers>
            <DataTrigger Binding="{Binding (local:BindingProxy.B), RelativeSource={RelativeSource Self}}" Value="3">
                <Setter Property="Tag" Value="Achieved" />
            </DataTrigger>
            <MultiDataTrigger>
                <MultiDataTrigger.Conditions>
                    <Condition Binding="{Binding (local:BindingProxy.A), RelativeSource={RelativeSource Self}}" Value="2" />
                    <Condition Binding="{Binding (local:BindingProxy.B), RelativeSource={RelativeSource Self}}" Value="2" />
                </MultiDataTrigger.Conditions>
                <Setter Property="Tag" Value="Achieved" />
            </MultiDataTrigger>
            <MultiDataTrigger>
                <MultiDataTrigger.Conditions>
                    <Condition Binding="{Binding (local:BindingProxy.A), RelativeSource={RelativeSource Self}}" Value="1" />
                    <Condition Binding="{Binding (local:BindingProxy.B), RelativeSource={RelativeSource Self}}" Value="2" />
                </MultiDataTrigger.Conditions>
                <Setter Property="Tag" Value="Achieved" />
            </MultiDataTrigger>
            <MultiDataTrigger>
                <MultiDataTrigger.Conditions>
                    <Condition Binding="{Binding (local:BindingProxy.A), RelativeSource={RelativeSource Self}}" Value="1" />
                    <Condition Binding="{Binding (local:BindingProxy.B), RelativeSource={RelativeSource Self}}" Value="1" />
                </MultiDataTrigger.Conditions>
                <Setter Property="Tag" Value="Achieved" />
            </MultiDataTrigger>
        </Style.Triggers>
    </Style>

    <local:MappingConverter x:Key="A_Converter_TrackToStrokeColor" Default="{StaticResource H_Color_Primary_Purple}">
        <local:MappingConverterEntry Key="{x:Static local:XAMLTrack.ExpansionOne}" Value="{StaticResource A_Color_HW_Dark_Blue}" />
    </local:MappingConverter>

    <Style x:Key="A_Style_FZMaterial_ChallengeItemContainerStroke" TargetType="FZMaterial">
        <Setter Property="Margin" Value="0" />
        <Setter Property="Opacity" Value="0.4" />
        <Setter Property="Color" Value="{Binding ActiveTrack, RelativeSource={RelativeSource AncestorType=Page}, Converter={StaticResource A_Converter_TrackToStrokeColor}}" />
        <Setter Property="Preset">
            <Setter.Value>
                <FZMaterialPresetRoundtangleStroke Thickness="2"
                                                   CornerRadius="{StaticResource H_CornerRadius_All_3px}">
                </FZMaterialPresetRoundtangleStroke>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="A_Style_Grid_AccoladesComplete" TargetType="Grid">
        <Setter Property="MinWidth" Value="410" />
        <Setter Property="Height" Value="72" />
        <Setter Property="Margin" Value="40,0,0,0" />
        <Setter Property="Visibility" Value="Collapsed" />
        <Style.Triggers>
            <MultiDataTrigger>
                <MultiDataTrigger.Conditions>
                    <Condition Binding="{Binding CompletedChallengesRawCount, Converter={StaticResource A_CompareConverter}, ConverterParameter=0}" Value="{x:Static local:CompareResult.GreaterThan}" />
                    <Condition Binding="{Binding UncompletedChallengesRawCount, Converter={StaticResource A_CompareConverter}, ConverterParameter=0}" Value="{x:Static local:CompareResult.Equal}" />
                </MultiDataTrigger.Conditions>
                <Setter Property="Visibility" Value="Visible" />
            </MultiDataTrigger>
        </Style.Triggers>
    </Style>

    <Style x:Key="A_Style_FrameworkElement_AccoladesComplete_Visibility_Visible" TargetType="FrameworkElement">
        <Setter Property="Visibility" Value="Collapsed" />
        <Style.Triggers>
            <MultiDataTrigger>
                <MultiDataTrigger.Conditions>
                    <Condition Binding="{Binding CompletedChallengesRawCount, Converter={StaticResource A_CompareConverter}, ConverterParameter=0}" Value="{x:Static local:CompareResult.GreaterThan}" />
                    <Condition Binding="{Binding UncompletedChallengesRawCount, Converter={StaticResource A_CompareConverter}, ConverterParameter=0}" Value="{x:Static local:CompareResult.Equal}" />
                </MultiDataTrigger.Conditions>
                <Setter Property="Visibility" Value="Visible" />
            </MultiDataTrigger>
        </Style.Triggers>
    </Style>

    <Style x:Key="A_Style_FrameworkElement_MapPin_VisibleIfUndiscovered"
           TargetType="{x:Type FrameworkElement}">
        <Setter Property="Visibility" Value="Collapsed" />
        <Style.Triggers>
            <DataTrigger Binding="{Binding IsDiscovered}" Value="False">
                <Setter Property="Visibility" Value="Visible" />
            </DataTrigger>
            <DataTrigger Binding="{Binding SeasonallyActive}" Value="True">
                <Setter Property="Visibility" Value="Collapsed" />
            </DataTrigger>
        </Style.Triggers>
    </Style>
    
    
    <Style TargetType="ContentControl"
           x:Key="A_Style_ContentControl_MapPin">
        <Style.Resources>
            <!--Car Pin-->
            <DataTemplate DataType="{x:Type local:MapVehicleDataSource}">
                <Grid Width="{StaticResource A_Double_MapPin_Width}" UseLayoutRounding="True" SnapsToDevicePixels="True">
                    
                    <StackPanel>
                        <Grid Height="14">
                            <!--I don't know why this decorator was needed but without it the bounds for the grid below with the ClipToBounds get Height of the parent Grid and clip incorrectly pgEOzdemir-->
                            <Decorator Height="44" VerticalAlignment="Bottom">
                                <!--XP/Level-->
                                <Grid Height="44" ClipToBounds="True" VerticalAlignment="Bottom"  Panel.ZIndex="10" Margin="0,0,0,-1">
                                    <Grid DataContext="{Binding UserProfile}"
                                          Margin="-2"
                                          VerticalAlignment="Bottom">
                                        <local:FZMaterial Height="44" VerticalAlignment="Bottom" CaptureSubgraph="True" Style="{Binding XP, Converter={StaticResource A_XPConverter_PlayerBarStyle}}">
                                            <Grid>
                                                <local:FZMaterial Height="14"
                                                                  VerticalAlignment="Bottom"/>

                                                <DockPanel Margin="16,0,0,0">
                                                    <Decorator DockPanel.Dock="Left" Width="{Binding ActualWidth, ElementName=prestige_level}"/>
                                                    <local:FZMaterial DockPanel.Dock="Left" 
                                                                      ClipToBounds="True" Width="{Binding ActualWidth, ElementName=text_backing}"/>
                                                    <local:FZMaterial Height="14"
                                                                      VerticalAlignment="Bottom"/>

                                                </DockPanel>
                                            </Grid>
                                        </local:FZMaterial>

                                        <StackPanel Orientation="Horizontal" Margin="16,0,0,0" VerticalAlignment="Bottom">
                                            <FZMaterial x:Name="prestige_level"
                                                        Width="21"
                                                        Height="44"
                                                        VerticalAlignment="Bottom"
                                                        Color="{StaticResource H_Color_Primary_Black}" 
                                                        Visibility="{Binding XP, Converter={StaticResource A_Converter_PrestigeLevelToVisibilityFromXP},FallbackValue=Collapsed}">
                                                <StackPanel VerticalAlignment="Center">
                                                    <local:FZMaterial Style="{StaticResource A_Style_FZMaterial_PrestigeIcon_Leaderboard}" />
                                                    <local:FZTextBlock Style="{StaticResource A_Style_FZTextBlock_PrestigeLevel_Leaderboard}" 
                                                                                                       Text="{Binding XP, Converter={StaticResource A_XPConverter_Prestige}}" />
                                                </StackPanel>
                                            </FZMaterial>
                                            <Grid Height="44" HorizontalAlignment="Left" VerticalAlignment="Bottom" x:Name="text_backing">
                                                <local:FZTextBlock Style="{StaticResource A_Style_FZTextBlock_PlayerLevelText_Base}"
                                                                   FontFamily="Horizon_A"
                                                                   VerticalAlignment="Center"
                                                                   CapHeight="24"
                                                                   Margin="10,0"/>
                                            </Grid>
                                        </StackPanel>
                                    </Grid>
                                </Grid>
                            </Decorator>
                        </Grid>

                        <local:FZMaterial Preset="{StaticResource A_FZMaterialPreset_FlatPanel_Base}"
				                          Color="{StaticResource H_Color_Primary_White}"
				                          Margin="0,0,0,-0.5">
                            <StackPanel Margin="16,18,16,16" UseLayoutRounding="False" SnapsToDevicePixels="False">
                                
                                <!--Player Name-->
                                <local:FZTextBlock Style="{StaticResource A_Style_FZTextBlock_MapPin_TitleText}"
                                                   Text="{Binding UserProfile.FormattedGamertag}"
                                                   Margin="0"/>


                                <StackPanel Orientation="Horizontal"
                                            HorizontalAlignment="Left"
                                            Margin="0,10,0,0">
                                    <!--Car Badge-->
                                    <Control Style="{StaticResource A_Style_Control_CarClassBadge_Small_Default}" 
                                             local:BindingProxy.A="{Binding PerformanceIndex}" 
                                             local:BindingProxy.B="{Binding CarClass}" 
                                             Tag="White"
                                             Focusable="False" />

                                    <!--Car Name-->
                                    <local:FZTextBlock Text="{Binding Description}"
                                                   Margin="10,0,0,0"
                                                   FontFamily="Horizon_A"
                                                   CapHeight="18"
                                                   TextAlignment="Center"
                                                   Color="{StaticResource H_Color_Primary_Black}"
                                                   VerticalAlignment="Center"
                                                   Visibility="{Binding Description, Converter={StaticResource A_StringVisConverter}}" />
                                </StackPanel>
                            </StackPanel>
                        </local:FZMaterial>

                        <local:FZMaterial Preset="{StaticResource A_FZMaterialPreset_FlatPanel_Base}"
                                          Color="{StaticResource H_Color_Primary_Black}"
                                          Height="10"/>

                    </StackPanel>

                </Grid>
            </DataTemplate>

            <DataTemplate DataType="{x:Type local:MapSIDICarPackUpsellCarLocationDataSource}">
                <DataTemplate.Resources>
                    <Color x:Key="A_Color_SIDI_CarPack">#6D009B</Color>

                    <Style x:Key="A_Style_FZMaterial_SeasonalBackground" TargetType="local:FZMaterial">
                        <Setter Property="Color" Value="{StaticResource A_Color_SIDI_CarPack}"/>
                    </Style>
                </DataTemplate.Resources>
                <StackPanel Width="{StaticResource A_Double_MapPin_Width}"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center">
                    
                        <!--Top Banner-->
                        <FZMaterial x:Name="TopPinBanner"
                                    Height="14"
                                    VerticalAlignment="Bottom"
                                    Color="{StaticResource A_Color_SIDI_CarPack}"
                                    Margin="0,0,0,-0.5"/>

                        <FZMaterial Preset="{StaticResource A_FZMaterialPreset_FlatPanel_Base}"
                                    Color="#FFFFFF"
                                    Margin="0,0,0,-0.5">
                            <Decorator Style="{StaticResource A_Style_FrameworkElement_MapPin_VisibleIfUndiscovered}">
                                <FZTextBlock x:Name="UndiscoveredText"
                                             Text="{Binding Source={local:Loc Map.IDS_MapPin_PlayerHouse_Undiscovered}}"
                                             Style="{StaticResource A_Style_FZTextBlock_MapPin_TitleText}"
                                             Margin="0,-5,0,11" />
                            </Decorator>
                            <StackPanel Style="{StaticResource A_Style_FrameworkElement_MapPin_CollapsedIfUndiscovered}" 
                                        VerticalAlignment="Center"
                                        HorizontalAlignment="Stretch">

                                <!--Title, Subtitle, Description-->
                                <Control Template="{StaticResource A_ControlTemplate_MapPin3PartTitlePill}"
                                         Margin="0,0,0,20"/>

                                <!--Seasonal Info-->
                                <Control Template="{StaticResource A_ControlTemplate_MapPinSeasonalInfo}"
                                            DataContext="{Binding SeasonalInfo}"/>

                                <FZMaterial Preset="{StaticResource A_FZMaterialPreset_FlatPanel_Base}"
                                            Color="{StaticResource H_Color_Primary_Black}"
                                            Height="10"/>
                            </StackPanel>
                        </FZMaterial>
                </StackPanel>
            </DataTemplate>

            <!--Generic Map Pin-->
            <DataTemplate DataType="{x:Type local:MapPinDataSource}">
                <Grid>
                    <StackPanel Width="{StaticResource A_Double_MapPin_Width}"
                                HorizontalAlignment="Center"
                                VerticalAlignment="Center">

                        <Decorator Style="{StaticResource A_Style_FrameworkElement_MapPin_CollapsedIfUndiscovered}">

                            <!--Top Image-->
                            <Control Template="{StaticResource A_ControlTemplate_MapPinTopImage}"/>

                        </Decorator>

                        <!--Top Banner-->
                        <Control Template="{StaticResource A_ControlTemplate_MapPinTopBanner}"
                                 Margin="0,0,0,-0.5"/>

                        <local:FZMaterial Preset="{StaticResource A_FZMaterialPreset_FlatPanel_Base}"
                                          Color="#FFFFFF"
                                          Margin="0,0,0,-0.5">
                            <Grid>
                                <Decorator Style="{StaticResource A_Style_FrameworkElement_MapPin_VisibleIfUndiscovered}">
                                    <local:FZTextBlock x:Name="UndiscoveredText"
                                                       Text="{Binding Source={local:Loc Map.IDS_MapPin_PlayerHouse_Undiscovered}}"
                                                       Style="{StaticResource A_Style_FZTextBlock_MapPin_TitleText}"
                                                       Margin="0,-5,0,11" />
                                </Decorator>
                                <StackPanel Style="{StaticResource A_Style_FrameworkElement_MapPin_CollapsedIfUndiscovered}" 
                                            VerticalAlignment="Center"
                                            HorizontalAlignment="Stretch">

                                    <!--Gold Separator-->
                                    <Control Template="{StaticResource A_ControlTemplate_MapPinCompletionGoldSeparator}"/>

                                    <!--Title, Subtitle, Description-->
                                    <Control Template="{StaticResource A_ControlTemplate_MapPin3PartTitlePill}"/>

                                    <!--Optional, Car specification-->
                                    <Control Template="{StaticResource A_ControlTemplate_MapPinCarInfoPill}"
                                             DataContext="{Binding CarInfo}"/>

                                    <!--Optional, 3 parts SubInfo -->
                                    <Control Template="{StaticResource A_ControlTemplate_MapPinSubInfoPill}"
                                             DataContext="{Binding SubInfo}"/>
                                    
                                    <!--Optonal, Campaign progress, Finised, Won-->
                                    <Control Template="{StaticResource A_ControlTemplate_MapPinCampaignProgressInfo}"
                                             DataContext="{Binding CampaignProgressInfo}"/>

                                    <!--Optonal, Score info, Bronze, Silver, Gold-->
                                    <Control Template="{StaticResource A_ControlTemplate_MapPinScore}"
                                             DataContext="{Binding ScoreInfo}"/>

                                    <!--Optional, Progress Bar-->
                                    <Control Template="{StaticResource A_ControlTemplate_MapPinProgressBar}"
                                             DataContext="{Binding ProgressInfo}"/>

                                    <!--Optional, Seasonal Info-->
                                    <Control Template="{StaticResource A_ControlTemplate_MapPinSeasonalInfo}"
                                             DataContext="{Binding SeasonalInfo}"/>

                                    <!--Button and Button Description-->
                                    <Control Template="{StaticResource A_ControlTemplate_MapPinFooterWithCommand}"/>

                                </StackPanel>
                            </Grid>
                        </local:FZMaterial>
                    </StackPanel>
                </Grid>
            </DataTemplate>

            <DataTemplate DataType="{x:Type local:MapRareCarDealershipLocationDataSource}">
                <DataTemplate.Resources>
                    <Style TargetType="FrameworkElement" x:Key="A_Style_FrameworkElement_Pin_Title">
                        <Setter Property="Margin" Value="16"/>
                        <Setter Property="HorizontalAlignment" Value="Left"/>
                        <Setter Property="VerticalAlignment" Value="Center"/>
                    </Style>
                    <Style x:Key="A_Style_FZMaterial_LocationIcon_Festival" TargetType="{x:Type local:FZMaterial}">
                        <Setter Property="ImageSource" Value="{Binding (local:MultiStringFormatter.Output), RelativeSource={RelativeSource Self}}" />
                        <Setter Property="HorizontalAlignment" Value="Left" />
                        <Setter Property="VerticalAlignment" Value="Top" />
                        <Setter Property="Width" Value="69"/>
                        <Setter Property="Height" Value="67"/>
                        <Setter Property="Margin" Value="-38,-45,0,0"/>
                    </Style>
                </DataTemplate.Resources>
                <StackPanel>
                    <Grid>
                        <FZMaterial Style="{StaticResource A_Style_FZMaterial_ChallengeItemContainerStroke}"
                                    Width="484"
                                    Height="164"
                                    Opacity="1" 
                                    VerticalAlignment="Bottom"/>
                        <local:FZMaterial ImageSource="/ForzaUI;component/Textures/Data_Bound/Rare_Car_Dealership/Backstage_Pin_Image.png"
                                          Width="{StaticResource A_Double_MapPin_Width}"
                                          Height="160"/>
                    </Grid>
                    <Grid>
                        <FZMaterial Style="{StaticResource A_Style_FZMaterial_ChallengeItemContainerStroke}"
                                        Opacity="1" />
                        <local:FZMaterial Preset="{StaticResource H_Roundtangle_TopOnly_3px}"
                                        Width="{StaticResource A_Double_MapPin_Width}"
                                        Color="#FFFFFF">
                            <Grid>
                                <DockPanel>
                                    <local:FZMaterial DockPanel.Dock="Top" Style="{StaticResource A_Style_FZMaterial_MapPinHeader_LocationBase}" ImageSource="/ForzaUI;component/Textures/Data_Bound/Rare_Car_Dealership/Backstage_Pin_Colour_Strip.png"/>
                                    <Grid>
                                        <local:FZMaterial Style="{StaticResource A_Style_FZMaterial_LocationIcon_Festival}"
                                                        DockPanel.Dock="Left"
                                                        ImageSource="{Binding Icon}"/>
                                        <StackPanel Style="{StaticResource A_Style_FrameworkElement_Pin_Title}"
                                                Margin="56,16,16,16">
                                            <local:AutoScrollPanel Style="{StaticResource A_Style_AutoScrollPanel_MapPinTitle}"
                                                                Margin="0,0,0,16"/>
                                            <local:FZTextBlock Style="{StaticResource A_Style_FZTextBlock_MapPinInfoPillDescription_Base}" 
                                                            Text="{Binding Description}"/>
                                        </StackPanel>
                                    </Grid>
                                </DockPanel>
                            </Grid>
                        </local:FZMaterial>
                    </Grid>
                </StackPanel>
            </DataTemplate>
        </Style.Resources>
    </Style>


    <Style x:Key="A_Style_ControllerButtonControl_MapAButton"
           BasedOn="{StaticResource A_Style_ControllerButtonControl_Default}"
           TargetType="local:ControllerButtonControl">
        <Setter Property="Description"
                Value="{Binding ADescription}" />
        <Setter Property="AllowMouseClick"
                Value="False" />
    </Style>

    <Style x:Key="A_Style_ControllerButtonControl_MapXButton"
           BasedOn="{StaticResource A_Style_ControllerButtonControl_Default}"
           TargetType="local:ControllerButtonControl">
        <Setter Property="Description"
                Value="{Binding XDescription}" />
        <Style.Triggers>
            <DataTrigger Binding="{Binding IsMapFastTravelEnabled}"
                         Value="False">
                <Setter Property="Visibility"
                        Value="{x:Static Visibility.Collapsed}" />
            </DataTrigger>
        </Style.Triggers>
    </Style>

    <Style x:Key="A_Style_ControllerButtonControl_MapYButton" 
           BasedOn="{StaticResource A_Style_ControllerButtonControl_Default}"
           TargetType="ControllerButtonControl">
        <Setter Property="Description"
                Value="{Binding YDescription}"/>
    </Style>

    <local:LinearTransformConverter Scale="-0.5"
                                    x:Key="A_Converter_PinXPosition" />
    <local:LinearTransformConverter Scale="-1"
                                    x:Key="A_Converter_PinYPosition" />


    <Style x:Key="A_Style_PlayerBarControl_Map"
           BasedOn="{StaticResource A_Style_PlayerBarControl}"
           TargetType="{x:Type local:PlayerBarControl}">
        <Setter Property="ShowPlayerAndCarInfo" Value="False"/>
        <Setter Property="local:BindingProxy.A" Value="is_in_map" />
        <Style.Triggers>
            <DataTrigger Binding="{Binding SceneEnum, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Page}}}" Value="{x:Static local:SceneEntryEnum.MapEliminator}">
                <Setter Property="Visibility" Value="Hidden"/>
            </DataTrigger>
            <DataTrigger Binding="{Binding SceneEnum, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Page}}}" Value="{x:Static local:SceneEntryEnum.MapHideSeekPreGame}">
                <Setter Property="Visibility" Value="Hidden"/>
            </DataTrigger>
            <DataTrigger Binding="{Binding SceneEnum, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Page}}}" Value="{x:Static local:SceneEntryEnum.MapHideSeek}">
                <Setter Property="Visibility" Value="Hidden"/>
            </DataTrigger>
            <DataTrigger Binding="{Binding SceneEnum, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Page}}}" Value="{x:Static local:SceneEntryEnum.MapLabyrinth}">
                <Setter Property="Visibility" Value="Hidden"/>
            </DataTrigger>
        </Style.Triggers>
    </Style>

    <Style x:Key="A_Style_MapViewController_UIMap"
           TargetType="{x:Type local:MapViewControllerWindowed}">
        <Setter Property="MapId" Value="default" />
        <Setter Property="TagName" Value="route" />
        <Setter Property="DataContext" Value="{Binding RouteMap, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Page}}}" />
        <Setter Property="TagValue" Value="{Binding RouteTag}" />
        <Setter Property="IsolatedTagValue" Value="{Binding RouteType}" />
        <Setter Property="ProgressionThreadTagValue" Value="{Binding RouteProgressionThread}" />
        <Setter Property="DesiredMargin" Value="15,15,15,15" />
        <Setter Property="MinimumMargin" Value="15,15,15,15" />
        <Setter Property="MaxHeightForDesiredMargin" Value="20000" />
        <Setter Property="MinMapHeight" Value="800" />
        <Setter Property="MaxMapHeight" Value="20000" />
    </Style>

    <!-- MapCustomRenderElement is ideally meant to be used with the UIMapRouteDataSource code property -->
    <Style x:Key="A_Style_MapCustomRenderElement_UIMap" TargetType="local:MapCustomRenderElement">
        <Setter Property="MapId" Value="default" />
        <Setter Property="ClipToBounds" Value="True" />
        <Setter Property="MapProfile" Value="{Binding MapProfileName}" />
    </Style>

    <local:FZMaterialPresetRoundtangle x:Key="A_FZMaterialPresetRoundtangle_Shadow_MapPin"
                                       Softness="50"
                                       Reflectivity="0"
                                       SpecularBrightness="0"
                                       SpecularPower="0" />

    <Style x:Key="A_Style_FZMaterial_MapFloatingPanelShadow"
               TargetType="{x:Type local:FZMaterial}">
        <Setter Property="Color" Value="Black" />
        <Setter Property="Opacity" Value="0.5" />
        <Setter Property="Preset" Value="{StaticResource A_FZMaterialPresetRoundtangle_Shadow_MapPin}" />
        <Setter Property="IsHitTestVisible" Value="False" />
        <Setter Property="Margin" Value="-25" />
    </Style>

</ResourceDictionary>
