<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">
    
    <local:StringVisConverter x:Key="A_Converter_StringVis_Map" />

    <Color x:Key="A_Color_Map_EventsSelectedBackground">#FFFFE600</Color>

    <Color x:Key="A_Color_Map_RaceEventStateBacking_Locked">#FF6B6B6D</Color>

    <System:Double x:Key="A_Double_MountainMapRotation">2.00713</System:Double>

    <local:MappingConverter x:Key="A_Converter_IsStorySpecial" Default="{StaticResource A_Boolean_False}">
        <local:MappingConverterEntry Key="drift_club_2" Value="{StaticResource A_Boolean_True}" />
        <local:MappingConverterEntry Key="story_11" Value="{StaticResource A_Boolean_True}" />
    </local:MappingConverter>

    <Color x:Key="A_Color_Pin_Background">#FF454549</Color>
    <Color x:Key="A_Color_Pin_TitleBackground">#FF454549</Color>
    <System:Double x:Key="A_Double_MapPin_MinWidth">360</System:Double>
    <System:Double x:Key="A_Double_MapPin_MaxWidth">492</System:Double>
    <Color x:Key="A_Color_AmbientChallenge_DisabledText">#FF999999</Color>
    <Color x:Key="A_Color_MapPinPillBackground">#DCDCDC</Color>
    <Color x:Key="A_Color_MapPinPillBackground_Achieved">#00B592</Color>
    <Color x:Key="A_Color_MapPinPillBackground_Complete">#FFFFFF</Color>
    <Thickness x:Key="A_Thickness_MapPinMainContentMargin_TopAndSides">16,16,16,0</Thickness>
    <Thickness x:Key="A_Thickness_MapPinMainContentMargin_BottomAndSides">16,0,16,16</Thickness>
    <Thickness x:Key="A_Thickness_MapPinMainContentMargin_TopBottomAndRight">0,16,16,16</Thickness>
    <Thickness x:Key="A_Thickness_MapPinMainContentMargin_Sides">16,0,16,0</Thickness>
    <Thickness x:Key="A_Thickness_MapPinMainContentMargin">16</Thickness>
    <Color x:Key="A_Color_MapPinStar_Unachieved">#80000000</Color>
    <Color x:Key="A_Color_MapPinStar_Achieved">#FFFFFF</Color>
    <Color x:Key="A_Color_MapPinStar_Completed">#80000000</Color>

    <Style x:Key="A_Style_FZMaterial_MapPinFooter"
           TargetType="local:FZMaterial">
        <Setter Property="Preset" Value="{StaticResource A_FZMaterialPresetRoundtangle_FlatPanel_OuterBottomOnly}" />
        <Setter Property="Color" Value="{Binding InfluenceThread, Converter={StaticResource A_Converter_InfluenceThreadIdToColor}}" />
        <Setter Property="MinHeight" Value="29" />
    </Style>

    <Style x:Key="A_Style_FZTextBlock_MapPin_TitleText"
           TargetType="local:FZTextBlock"
           BasedOn="{StaticResource A_Style_FZTextBlock_HorizonA}">
        <Setter Property="CapHeight"
                Value="19" />
        <Setter Property="VerticalAlignment"
                Value="Center" />
        <Setter Property="HorizontalAlignment"
                Value="Left" />
        <Setter Property="Color"
                Value="{StaticResource A_Color_MapPinTitle}" />
    </Style>

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

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

    <Style x:Key="A_Style_FZTextBlock_MapPin_DescriptionText"
           TargetType="local:FZTextBlock"
           BasedOn="{local:LocalizedResource  A_Style_FZTextBlock_Map_Description}">
        <Setter Property="CapHeight"
                Value="15" />
        <Setter Property="VerticalAlignment"
                Value="Center" />
        <Setter Property="HorizontalAlignment"
                Value="Left" />
        <Setter Property="Color"
                Value="{StaticResource A_Color_MapPinDescription}" />
        <Setter Property="TextWrapping"
                Value="Wrap" />
    </Style>

    <local:MappingConverter x:Key="A_Converter_ThreadToFinaleIcon">
        <local:MappingConverterEntry Key="asphalt_series" Value="/ForzaUI;component/Textures/Data_Bound/Horizon_Map/pins/colossus.png" />
        <local:MappingConverterEntry Key="cross_country_series" Value="/ForzaUI;component/Textures/Data_Bound/Horizon_Map/pins/titan.png" />
        <local:MappingConverterEntry Key="mixed_surface_series" Value="/ForzaUI;component/Textures/Data_Bound/Horizon_Map/pins/gauntlet.png" />
        <local:MappingConverterEntry Key="street_racing_series" Value="/ForzaUI;component/Textures/Data_Bound/Horizon_Map/pins/marathon.png" />
    </local:MappingConverter>

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

    <local:MappingConverter x:Key="A_Converter_RaceEventTypeTagToIcon">
        <local:MappingConverterEntry Key="tag_asphalt_circuit" Value="Asphalt_Circuit.png" />
        <local:MappingConverterEntry Key="tag_asphalt_p2p" Value="Asphalt_Sprint.png" />
        <local:MappingConverterEntry Key="tag_cross_country_circuit" Value="Cross_Country_Circuit.png" />
        <local:MappingConverterEntry Key="tag_cross_country_p2p" Value="Cross_Country_Sprint.png" />
        <local:MappingConverterEntry Key="tag_mixed_surface_circuit" Value="Mixed_Surface_Circuit.png" />
        <local:MappingConverterEntry Key="tag_mixed_surface_p2p" Value="Mixed_Surface_Sprint.png" />
        <local:MappingConverterEntry Key="tag_street_racing" Value="Street_Race.png" />
        <local:MappingConverterEntry Key="tag_drag_racing" Value="Drag_Race.png" />
    </local:MappingConverter>
    <local:MappingConverter x:Key="A_Converter_RaceEventTypeTagToIcon_Seasonal">
        <local:MappingConverterEntry Key="tag_asphalt_circuit" Value="seasonal_asphalt_circuit.png" />
        <local:MappingConverterEntry Key="tag_asphalt_p2p" Value="seasonal_asphalt_p2p.png" />
        <local:MappingConverterEntry Key="tag_cross_country_circuit" Value="seasonal_crosscountry_circuit.png" />
        <local:MappingConverterEntry Key="tag_cross_country_p2p" Value="seasonal_crosscountry_p2p.png" />
        <local:MappingConverterEntry Key="tag_mixed_surface_circuit" Value="seasonal_mixedsurface_circuit.png" />
        <local:MappingConverterEntry Key="tag_mixed_surface_p2p" Value="seasonal_mixedsurface_p2p.png" />
        <local:MappingConverterEntry Key="tag_street_racing" Value="seasonal_streetracing.png" />
        <local:MappingConverterEntry Key="tag_drag_racing" Value="seasonal_dragracing.png" />
    </local:MappingConverter>

    <Style x:Key="A_Style_FZMaterial_MapPinRaceEventIcon"
           TargetType="local:FZMaterial">
        <Setter Property="Color" Value="#FFFFFF" />
        <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="local:MultiStringFormatter.Param1" Value="{Binding Tag, RelativeSource={RelativeSource Self}, Converter={StaticResource A_Converter_RaceEventTypeTagToIcon}}" />
        <Setter Property="ImageSourceNoPreload" Value="{Binding (local:MultiStringFormatter.Output), RelativeSource={RelativeSource Self}}" />
        <Style.Triggers>
            <MultiDataTrigger>
                <MultiDataTrigger.Conditions>
                    <Condition Binding="{Binding RibbonConfig}" Value="{x:Static local:XAMLRibbonConfig.Circuit}" />
                    <Condition Binding="{Binding InfluenceThread}" Value="asphalt_series" />
                </MultiDataTrigger.Conditions>
                <Setter Property="Tag" Value="tag_asphalt_circuit" />
            </MultiDataTrigger>
            <MultiDataTrigger>
                <MultiDataTrigger.Conditions>
                    <Condition Binding="{Binding RibbonConfig}" Value="{x:Static local:XAMLRibbonConfig.P2P}" />
                    <Condition Binding="{Binding InfluenceThread}" Value="asphalt_series" />
                </MultiDataTrigger.Conditions>
                <Setter Property="Tag" Value="tag_asphalt_p2p" />
            </MultiDataTrigger>
            <MultiDataTrigger>
                <MultiDataTrigger.Conditions>
                    <Condition Binding="{Binding RibbonConfig}" Value="{x:Static local:XAMLRibbonConfig.Circuit}" />
                    <Condition Binding="{Binding InfluenceThread}" Value="cross_country_series" />
                </MultiDataTrigger.Conditions>
                <Setter Property="Tag" Value="tag_cross_country_circuit" />
            </MultiDataTrigger>
            <MultiDataTrigger>
                <MultiDataTrigger.Conditions>
                    <Condition Binding="{Binding RibbonConfig}" Value="{x:Static local:XAMLRibbonConfig.P2P}" />
                    <Condition Binding="{Binding InfluenceThread}" Value="cross_country_series" />
                </MultiDataTrigger.Conditions>
                <Setter Property="Tag" Value="tag_cross_country_p2p" />
            </MultiDataTrigger>
            <MultiDataTrigger>
                <MultiDataTrigger.Conditions>
                    <Condition Binding="{Binding RibbonConfig}" Value="{x:Static local:XAMLRibbonConfig.Circuit}" />
                    <Condition Binding="{Binding InfluenceThread}" Value="mixed_surface_series" />
                </MultiDataTrigger.Conditions>
                <Setter Property="Tag" Value="tag_mixed_surface_circuit" />
            </MultiDataTrigger>
            <MultiDataTrigger>
                <MultiDataTrigger.Conditions>
                    <Condition Binding="{Binding RibbonConfig}" Value="{x:Static local:XAMLRibbonConfig.P2P}" />
                    <Condition Binding="{Binding InfluenceThread}" Value="mixed_surface_series" />
                </MultiDataTrigger.Conditions>
                <Setter Property="Tag" Value="tag_mixed_surface_p2p" />
            </MultiDataTrigger>
            <DataTrigger Binding="{Binding InfluenceThread}" Value="drag_racing">
                <Setter Property="Tag" Value="tag_drag_racing" />
            </DataTrigger>
            <DataTrigger Binding="{Binding InfluenceThread}" Value="street_racing_series">
                <Setter Property="Tag" Value="tag_street_racing" />
            </DataTrigger>
            <DataTrigger Binding="{Binding SeasonallyActive}" Value="True">
                <Setter Property="local:MultiStringFormatter.Param1" Value="{Binding Tag, RelativeSource={RelativeSource Self}, Converter={StaticResource A_Converter_RaceEventTypeTagToIcon_Seasonal}}" />
            </DataTrigger>
            <DataTrigger Binding="{Binding UIRacificationMode}" Value="{x:Static local:UIRacificationMode.Infected}">
                <Setter Property="ImageSourceNoPreload"
                        Value="/ForzaUI;component/Textures/Data_Bound/ActivityPanel/Infected.png" />
            </DataTrigger>
            <DataTrigger Binding="{Binding UIRacificationMode}" Value="{x:Static local:UIRacificationMode.King}">
                <Setter Property="ImageSourceNoPreload"
                        Value="/ForzaUI;component/Textures/Data_Bound/ActivityPanel/King.png" />
            </DataTrigger>
            <DataTrigger Binding="{Binding UIRacificationMode}" Value="{x:Static local:UIRacificationMode.FlagRush}">
                <Setter Property="ImageSourceNoPreload"
                        Value="/ForzaUI;component/Textures/Data_Bound/ActivityPanel/Flag_Rush.png" />
            </DataTrigger>
            <DataTrigger Binding="{Binding UIRacificationMode}" Value="{x:Static local:UIRacificationMode.TeamInfected}">
                <Setter Property="ImageSourceNoPreload"
                        Value="/ForzaUI;component/Textures/Data_Bound/ActivityPanel/Survival.png" />
            </DataTrigger>
            <DataTrigger Binding="{Binding UIRacificationMode}" Value="{x:Static local:UIRacificationMode.TeamKing}">
                <Setter Property="ImageSourceNoPreload"
                        Value="/ForzaUI;component/Textures/Data_Bound/ActivityPanel/Team_King.png" />
            </DataTrigger>
            <DataTrigger Binding="{Binding UIRacificationMode}" Value="{x:Static local:UIRacificationMode.TeamFlagRush}">
                <Setter Property="ImageSourceNoPreload"
                        Value="/ForzaUI;component/Textures/Data_Bound/ActivityPanel/Team_Flag_Rush.png" />
            </DataTrigger>
            <DataTrigger Binding="{Binding IsFinale}" Value="True">
                <Setter Property="ImageSourceNoPreload"
                        Value="{Binding InfluenceThread, Converter={StaticResource A_Converter_ThreadToFinaleIcon}}" />
            </DataTrigger>
            <DataTrigger Binding="{Binding XamlId}" Value="Goliath">
                <Setter Property="ImageSourceNoPreload"
                        Value="/ForzaUI;component/Textures/Data_Bound/Horizon_Map/pins/goliath.png" />
            </DataTrigger>
            <DataTrigger Binding="{Binding XamlId}" Value="Kraken">
                <Setter Property="ImageSourceNoPreload"
                        Value="/ForzaUI;component/Textures/Data_Bound/PDLC1/Map/pins/kraken.png" />
            </DataTrigger>
            <DataTrigger Binding="{Binding XamlId}" Value="Leviathan">
                <Setter Property="ImageSourceNoPreload"
                        Value="/ForzaUI;component/Textures/Data_Bound/PDLC1/Map/pins/leviathan.png" />
            </DataTrigger>
            <DataTrigger Binding="{Binding XamlId}" Value="SpeedChampions">
                <Setter Property="ImageSourceNoPreload"
                        Value="/ForzaUI;component/Textures/Data_Bound/PDLC2/Map/pins/speedchampions.png" />
            </DataTrigger>
            <DataTrigger Binding="{Binding XamlId}" Value="SpeedChampionsFinale">
                <Setter Property="ImageSourceNoPreload"
                        Value="/ForzaUI;component/Textures/Data_Bound/PDLC2/Map/pins/speedchampionsfinale.png" />
            </DataTrigger>
            <DataTrigger Binding="{Binding XamlId}" Value="RedGoliath">
                <Setter Property="ImageSourceNoPreload"
                        Value="/ForzaUI;component/Textures/Data_Bound/PDLC2/Map/pins/redgoliath.png" />
            </DataTrigger>
            <DataTrigger Binding="{Binding IsEliteSeries}" Value="True">
                <Setter Property="local:MultiStringFormatter.Param1"
                        Value="elite_series.png" />
            </DataTrigger>
            <DataTrigger Binding="{Binding IsShowcaseEvent}" Value="True">
                <Setter Property="ImageSourceNoPreload"
                        Value="/ForzaUI;component/Textures/Data_Bound/Horizon_Map/pins/showcase_event.png" />
            </DataTrigger>
            <MultiDataTrigger>
                <MultiDataTrigger.Conditions>
                    <Condition Binding="{Binding IsDiscovered}" Value="False" />
                    <Condition Binding="{Binding SeasonallyActive}" Value="False" />
                </MultiDataTrigger.Conditions>
                <Setter Property="ImageSourceNoPreload"
                        Value="/ForzaUI;component/Textures/Data_Bound/PDLC2/Map/Pins/Undiscovered_Event.png" />
            </MultiDataTrigger>
        </Style.Triggers>
    </Style>

    <local:FZMaterialPresetRoundtangle x:Key="A_FZMaterialPresetRoundtangle_CompleteProgress_InnerAll"
                                       BasedOn="{StaticResource A_FZMaterialPreset_FlatPanel_Base}"
                                       GradientColorA="#B78432"
                                       GradientColorB="#FCE270"
                                       GradientAngle="90"
                                       CornerRadius="{StaticResource A_CornerRadius_Inner_All}" />
    <local:FZMaterialPresetRoundtangle x:Key="A_FZMaterialPresetRoundtangle_MapPin_SeasonallyActive_InnerAll"
                                       BasedOn="{StaticResource A_FZMaterialPreset_FlatPanel_Base}"
                                       GradientColorA="{StaticResource A_Color_ShowcaseGradientA}"
                                       GradientColorB="{StaticResource A_Color_ShowcaseGradientB}"
                                       GradientAngle="90"
                                       CornerRadius="{StaticResource A_CornerRadius_Inner_All}" />

    <Color x:Key="A_Color_MapPinPillBackground_Normal">#DCDCDC</Color>
    <Color x:Key="A_Color_MapPinPillBackground_InProgress">#00B592</Color>

    <Color x:Key="A_Color_MapPinPillText_InProgress">#FFFFFF</Color>

    <Style x:Key="A_Style_FZMaterial_MapPinInfoPillIcon_Base"
           TargetType="local:FZMaterial">
        <Setter Property="Width" Value="106" />
        <Setter Property="Height" Value="72" />
        <Setter Property="Margin" Value="0,0,-31,0" />
        <Setter Property="DockPanel.Dock" Value="Left" />
    </Style>
    <Style x:Key="A_Style_FZTextBlock_MapPinInfoPillTitle_Base"
           TargetType="local:FZTextBlock"
           BasedOn="{StaticResource A_Style_FZTextBlock_HorizonA}">
        <Setter Property="CapHeight" Value="16" />
        <Setter Property="Color" Value="{StaticResource A_Color_MapPinPillText_Normal}" />
    </Style>
    <Style x:Key="A_Style_FZTextBlock_MapPinInfoPillDescription_Base"
           TargetType="local:FZTextBlock"
           BasedOn="{local:LocalizedResource  A_Style_FZTextBlock_Map_Description}">
        <Setter Property="CapHeight" Value="15" />
        <Setter Property="Color" Value="{StaticResource A_Color_MapPinPillText_Normal}" />
        <Setter Property="TextWrapping" Value="NoWrap" />
        <Setter Property="Stretch" Value="None" />
    </Style>

    <local:MappingConverter x:Key="A_Converter_MapPinPillTagToColor"
                            Default="{StaticResource A_Color_MapPinPillBackground}">
        <local:MappingConverterEntry Key="Achieved" Value="{StaticResource A_Color_MapPinPillBackground_Achieved}" />
        <local:MappingConverterEntry Key="Complete" Value="{StaticResource A_Color_MapPinPillBackground_Complete}" />
    </local:MappingConverter>
    <local:MappingConverter x:Key="A_Converter_MapPinPillTagToPreset"
                            Default="{StaticResource A_FZMaterialPresetRoundtangle_FlatPanel_InnerAll}">
        <local:MappingConverterEntry Key="Complete" Value="{StaticResource A_FZMaterialPresetRoundtangle_CompleteProgress_InnerAll}" />
    </local:MappingConverter>
    <Style x:Key="A_Style_FZMaterial_MapPinInfoPillBackground_Base"
           TargetType="local:FZMaterial">
        <Setter Property="Color" Value="{Binding Tag, RelativeSource={RelativeSource Self}, Converter={StaticResource A_Converter_MapPinPillTagToColor}}" />
        <Setter Property="Preset" Value="{Binding Tag, RelativeSource={RelativeSource Self}, Converter={StaticResource A_Converter_MapPinPillTagToPreset}}" />
        <Setter Property="Margin" Value="0,0,0,1" />
    </Style>
    <local:MappingConverter x:Key="A_Converter_MapPinPillTagToStrokeVis"
                            Default="Collapsed">
        <local:MappingConverterEntry Key="Complete" Value="Visible" />
        <local:MappingConverterEntry Key="ShowStroke" Value="Visible" />
    </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_FZMaterial_MapPinInfoPillTextContainer_Base"
           TargetType="Panel">
        <Setter Property="HorizontalAlignment" Value="Left" />
        <Setter Property="VerticalAlignment" Value="Center" />
        <Setter Property="Margin" Value="{StaticResource A_Thickness_MapPinMainContentMargin_TopBottomAndRight}" />
    </Style>

    <Style x:Key="A_Style_FZMaterial_MapPinInfoPillIcon_Dynamic"
           BasedOn="{StaticResource A_Style_FZMaterial_MapPinInfoPillIcon_Base}"
           TargetType="local:FZMaterial" />
    <Style x:Key="A_Style_FZTextBlock_MapPinInfoPillTitle_Dynamic"
           BasedOn="{StaticResource A_Style_FZTextBlock_MapPinInfoPillTitle_Base}"
           TargetType="local:FZTextBlock" />
    <Style x:Key="A_Style_FZTextBlock_MapPinInfoPillDescription_Dynamic"
           BasedOn="{StaticResource A_Style_FZTextBlock_MapPinInfoPillDescription_Base}"
           TargetType="local:FZTextBlock" />
    <Style x:Key="A_Style_FZMaterial_MapPinInfoPillBackground_Dynamic"
           BasedOn="{StaticResource A_Style_FZMaterial_MapPinInfoPillBackground_Base}"
           TargetType="local:FZMaterial" />
    <Style x:Key="A_Style_FZMaterial_MapPinInfoPillBackgroundStroke_Dynamic"
           BasedOn="{StaticResource A_Style_FZMaterial_MapPinInfoPillBackgroundStroke_Base}"
           TargetType="local:FZMaterial" />
    <Style x:Key="A_Style_FZMaterial_MapPinInfoPillTextContainer_Dynamic"
           BasedOn="{StaticResource A_Style_FZMaterial_MapPinInfoPillTextContainer_Base}"
           TargetType="Panel" />

    <Style x:Key="A_Style_AutoScrollPanel_MapPinInfoPillDescription_Base" BasedOn="{StaticResource A_Style_AutoScrollPanel_Masked}" TargetType="local:AutoScrollPanel">
        <!-- Ticker-tape the pill descriptions as we don't have a lot of space to scale or wrap the text -->
        <Setter Property="MaxHeight" Value="25" />
        <Setter Property="Orientation" Value="Horizontal" />
        <Style.Resources>
            <ControlTemplate x:Key="A_ControlTemplate_AutoscrollTemplate_Dynamic">
                <local:FZTextBlock Style="{DynamicResource A_Style_FZTextBlock_MapPinInfoPillDescription_Dynamic}" />
            </ControlTemplate>
        </Style.Resources>
    </Style>

    <Style x:Key="A_Style_AutoScrollPanel_MapPinInfoPillDescription_Dynamic"
           BasedOn="{StaticResource A_Style_AutoScrollPanel_MapPinInfoPillDescription_Base}"
           TargetType="local:AutoScrollPanel" />

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

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

    <local:MappingConverter x:Key="A_Converter_FZMaterial_ImageSource_UIStuntPartyTypeToIcon">
        <local:MappingConverterEntry Key="{x:Static local:UIStuntPartyType.DangerSign}" Value="ForzathonLive_DangerSign.png" />
        <local:MappingConverterEntry Key="{x:Static local:UIStuntPartyType.SpeedZone}" Value="ForzathonLive_SpeedZone.png" />
        <local:MappingConverterEntry Key="{x:Static local:UIStuntPartyType.SpeedTrap}" Value="ForzathonLive_SpeedTrap.png" />
        <local:MappingConverterEntry Key="{x:Static local:UIStuntPartyType.DriftZone}" Value="ForzathonLive_DriftZone.png" />
        <local:MappingConverterEntry Key="{x:Static local:UIStuntPartyType.SkillMastery}" Value="ForzathonLive_Skills.png" />
        <local:MappingConverterEntry Key="{x:Static local:UIStuntPartyType.SkillChain}" Value="ForzathonLive_Skills.png" />
        <local:MappingConverterEntry Key="{x:Static local:UIStuntPartyType.Trailblazer}" Value="ForzathonLive_Trailblazer.png" />
    </local:MappingConverter>

    <local:MappingConverter x:Key="A_Converter_CollapsedIfExpansionOneMap"
                            Default="{x:Static Visibility.Visible}">
        <local:MappingConverterEntry Key="{x:Static local:XAMLTrack.ExpansionOne}" Value="{x:Static Visibility.Collapsed}" />
    </local:MappingConverter>
    <local:MappingConverter x:Key="A_Converter_VisibleIfExpansionOneMap"
                            Default="{x:Static Visibility.Collapsed}">
        <local:MappingConverterEntry Key="{x:Static local:XAMLTrack.ExpansionOne}" Value="{x:Static Visibility.Visible}" />
    </local:MappingConverter>
    <local:MappingConverter x:Key="A_Converter_CollapsedIfExpansionTwoMap"
                            Default="{x:Static Visibility.Visible}">
        <local:MappingConverterEntry Key="{x:Static local:XAMLTrack.ExpansionTwo}" Value="{x:Static Visibility.Collapsed}" />
    </local:MappingConverter>

    <local:MappingConverter x:Key="A_Converter_ActiveTrackToMapPinPillOffset"
                            Default="0,0,0,0">
        <local:MappingConverterEntry Key="{x:Static local:XAMLTrack.ExpansionOne}" Value="-7,0,-7,0" />
    </local:MappingConverter>

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

    <ControlTemplate x:Key="A_ControlTemplate_MapPinInfoPill">
        <Grid>
            <local:FZMaterial CaptureSubgraph="True"
                              Margin="{Binding ActiveTrack, RelativeSource={RelativeSource AncestorType=Page}, Converter={StaticResource A_Converter_ActiveTrackToMapPinPillOffset}}">
                <local:FZMaterial x:Name="background" Style="{DynamicResource A_Style_FZMaterial_MapPinInfoPillBackground_Dynamic}">
                    <local:FZMaterial ImageSource="/ForzaUI;component/Textures/Data_Bound/PDLC1/Map/pins/pill_mask.png"
                                      UVMap="{StaticResource A_FZMaterialUVMap_MapPinInfoPill_ExpansionOneMask}"
                                      Preset="{StaticResource A_FZMaterialPreset_Cutout}"
                                      Visibility="{Binding ActiveTrack, RelativeSource={RelativeSource AncestorType=Page}, Converter={StaticResource A_Converter_VisibleIfExpansionOneMap}}" />
                </local:FZMaterial>
            </local:FZMaterial>
            <Grid>
                <Decorator Visibility="{Binding ActiveTrack, RelativeSource={RelativeSource AncestorType=Page}, Converter={StaticResource A_Converter_CollapsedIfExpansionOneMap}}">
                    <local:FZMaterial x:Name="MidasTouch"
                                      Style="{StaticResource A_Style_FZMaterial_MapPinInfoPillBackgroundStroke_Dynamic}" />
                </Decorator>
                <DockPanel>
                    <local:FZMaterial Style="{DynamicResource A_Style_FZMaterial_MapPinInfoPillIcon_Dynamic}" />
                    <StackPanel Style="{DynamicResource A_Style_FZMaterial_MapPinInfoPillTextContainer_Dynamic}">
                            <local:FZTextBlock x:Name="PART_PillTextTop" Style="{DynamicResource A_Style_FZTextBlock_MapPinInfoPillTitle_Dynamic}" />
                            <Decorator Visibility="{Binding Visibility, ElementName=PART_PillTextTop}">
                                <Decorator Style="{DynamicResource A_Style_MapPinPill_TextSeparator_Dynamic}" Visibility="{Binding Visibility, ElementName=PART_PillTextBottom}" />
                            </Decorator>
                            <local:AutoScrollPanel x:Name="PART_PillTextBottom"
                                                   Style="{DynamicResource A_Style_AutoScrollPanel_MapPinInfoPillDescription_Dynamic}" />
                    </StackPanel>
                </DockPanel>
            </Grid>
        </Grid>
    </ControlTemplate>

    <local:MappingConverter x:Key="A_Converter_EventStateToPillBackgroundStrokeVisibility"
                            Default="Collapsed">
        <local:MappingConverterEntry Key="{x:Static local:RaceEventState.Complete}" Value="Visible" />
    </local:MappingConverter>

    <local:MappingConverter x:Key="A_Converter_CampaignRaceEventStateToVisibility"
                            Default="Collapsed">
        <local:MappingConverterEntry Key="{x:Static local:RaceEventState.Unlocked}" Value="Visible" />
        <local:MappingConverterEntry Key="{x:Static local:RaceEventState.Complete}" Value="Visible" />
    </local:MappingConverter>

    <local:MappingConverter x:Key="A_Converter_MapPinRaceEventStateToString"
                            Default="{local:Loc Map.IDS_Available}">
        <local:MappingConverterEntry Key="{x:Static local:RaceEventState.Complete}" Value="{local:Loc Map.IDS_Completed}" />
    </local:MappingConverter>

    <local:MappingConverter x:Key="A_Converter_MapPinPillHasCompletedToString"
                            Default="{local:Loc Map.IDS_Available}">
        <local:MappingConverterEntry Key="True" Value="{local:Loc Map.IDS_Completed}" />
    </local:MappingConverter>
    <local:MappingConverter x:Key="A_Converter_MapPinPillHasCompletedToBgTag"
                            Default="{x:Null}">
        <local:MappingConverterEntry Key="True" Value="Complete" />
    </local:MappingConverter>

    <local:MultiConverter x:Key="A_Converter_KingOfInfluenceThreadString">
        <local:MultiConverterEntry Converter="{StaticResource A_Converter_StringFormatConverter}" Parameter="{local:Loc Map.IDS_MapPin_Race_ChampionsSeries}" />
        <local:MultiConverterEntry Converter="{StaticResource A_StringToUpper}" />
    </local:MultiConverter>

    <local:MappingConverter x:Key="A_Converter_MapPinRaceEventStateToBgTag"
                            Default="{x:Null}">
        <local:MappingConverterEntry Key="{x:Static local:RaceEventState.Complete}" Value="Complete" />
    </local:MappingConverter>

    <local:FZMaterialPresetRoundtangle x:Key="A_FZMaterialPresetRoundtangle_MapPinCompleteProgress_Left_InnerAll"
                           BasedOn="{StaticResource A_FZMaterialPresetRoundtangle_CompleteProgress_InnerAll}"
                           GradientColorA="#A87632"
                           GradientColorB="#C79431" />
    <local:FZMaterialPresetRoundtangle x:Key="A_FZMaterialPresetRoundtangle_MapPinCompleteProgress_Middle_InnerAll"
                           BasedOn="{StaticResource A_FZMaterialPresetRoundtangle_CompleteProgress_InnerAll}"
                           GradientColorA="#C79431"
                           GradientColorB="#E1BA4E" />
    <local:FZMaterialPresetRoundtangle x:Key="A_FZMaterialPresetRoundtangle_MapPinCompleteProgress_Right_InnerAll"
                           BasedOn="{StaticResource A_FZMaterialPresetRoundtangle_CompleteProgress_InnerAll}"
                           GradientColorA="#E1BA4E"
                           GradientColorB="#F9DE6D" />
    <local:MappingConverter x:Key="A_Converter_StarCountToCompletePreset"
                            Default="{StaticResource A_FZMaterialPresetRoundtangle_MapPinCompleteProgress_Left_InnerAll}">
        <local:MappingConverterEntry Key="2" Value="{StaticResource A_FZMaterialPresetRoundtangle_MapPinCompleteProgress_Middle_InnerAll}" />
        <local:MappingConverterEntry Key="3" Value="{StaticResource A_FZMaterialPresetRoundtangle_MapPinCompleteProgress_Right_InnerAll}" />
    </local:MappingConverter>

    <Style x:Key="A_Style_FZMaterial_MapPin3StarPillBackground"
           BasedOn="{StaticResource A_Style_FZMaterial_MapPinInfoPillBackground_Base}"
           TargetType="local:FZMaterial">
        <Setter Property="Tag" Value="{Binding Tag, RelativeSource={RelativeSource TemplatedParent}}" />
        <Style.Triggers>
            <DataTrigger Binding="{Binding Tag, RelativeSource={RelativeSource TemplatedParent}}" Value="Complete">
                <Setter Property="Preset" Value="{Binding (local:BindingProxy.A), RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource A_Converter_StarCountToCompletePreset}}" />
            </DataTrigger>
        </Style.Triggers>
    </Style>

    <local:MappingConverter x:Key="A_Converter_StarTagToForegroundColor"
                            Default="{StaticResource A_Color_MapPinStar_Unachieved}">
        <local:MappingConverterEntry Key="Achieved" Value="{StaticResource A_Color_MapPinStar_Achieved}" />
        <local:MappingConverterEntry Key="Completed" Value="{StaticResource A_Color_MapPinStar_Completed}" />
    </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="23" />
        <Setter Property="Width" Value="23" />
        <Setter Property="Margin" Value="0,11" />
        <Setter Property="Color" Value="{Binding Tag, RelativeSource={RelativeSource AncestorType=ContentControl}, Converter={StaticResource A_Converter_StarTagToForegroundColor}}" />
    </Style>
    <Style x:Key="A_Style_FZMaterial_MapPinStarsCompletionStroke"
           TargetType="local:FZMaterial">
        <Setter Property="Preset" Value="{StaticResource A_FZMaterialPresetRoundtangleStroke_MapPinCompletionStroke}" />
        <Setter Property="Color" Value="#80000000" />
        <Setter Property="Visibility" Value="{Binding Tag, RelativeSource={RelativeSource AncestorType=ContentControl}, Converter={StaticResource A_Converter_MapPinPillTagToStrokeVis}, FallbackValue=Collapsed}" />
    </Style>
    <local:FZMaterialUVMap x:Key="A_FZMaterialUVMap_MapPin3StarInfoPill_ExpansionOneMask" StretchRegion="15,0,15,0" UnstretchedSize="110,46"/>
    <ControlTemplate x:Key="A_ControlTemplate_MapPin3StarInfoPill"
                     TargetType="{x:Type ContentControl}">
        <Grid>
            <local:FZMaterial CaptureSubgraph="True">
                <local:FZMaterial x:Name="background"
                                  Style="{DynamicResource A_Style_FZMaterial_MapPin3StarPillBackground}">
                    <local:FZMaterial ImageSource="/ForzaUI;component/Textures/Data_Bound/PDLC1/Map/pins/stars_pill_mask.png"
                                      Preset="{StaticResource A_FZMaterialPreset_Cutout}"
                                      UVMap="{StaticResource A_FZMaterialUVMap_MapPin3StarInfoPill_ExpansionOneMask}"
                                      Visibility="{Binding ActiveTrack, RelativeSource={RelativeSource AncestorType=Page}, Converter={StaticResource A_Converter_VisibleIfExpansionOneMap}}" />
                </local:FZMaterial>
            </local:FZMaterial>
            <Grid>
                <Decorator Visibility="{Binding ActiveTrack, RelativeSource={RelativeSource AncestorType=Page}, Converter={StaticResource A_Converter_CollapsedIfExpansionOneMap}}">
                    <local:FZMaterial Style="{StaticResource A_Style_FZMaterial_MapPinStarsCompletionStroke}" />
                </Decorator>
                <ContentPresenter />
            </Grid>
        </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="Complete" />
            </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:FZMaterialPresetRoundtangle x:Key="A_FZMaterialPresetRoundtangle_MapPinChampionsSeriesCompleted_OuterBottomOnly"
                                       BasedOn="{StaticResource A_FZMaterialPreset_FlatPanel_Base}"
                                       GradientColorA="#B78432"
                                       GradientColorB="#FCE270"
                                       GradientAngle="90"
                                       CornerRadius="{StaticResource A_CornerRadius_Outer_Bottom}"/>
    <local:FZMaterialPresetRoundtangle x:Key="A_FZMaterialPresetRoundtangle_MapPinSeasonEvent_OuterBottomOnly"
                                       BasedOn="{StaticResource A_FZMaterialPreset_FlatPanel_Base}"
                                       GradientColorA="{StaticResource A_Color_ShowcaseGradientA}"
                                       GradientColorB="{StaticResource A_Color_ShowcaseGradientB}"
                                       GradientAngle="90"
                                       CornerRadius="{StaticResource A_CornerRadius_Outer_Bottom}"/>
    <Style x:Key="A_Style_FZMaterial_RaceEventMapPinFooter"
           TargetType="local:FZMaterial"
           BasedOn="{StaticResource A_Style_FZMaterial_MapPinFooter}">
        <Setter Property="Preset" Value="{StaticResource A_FZMaterialPresetRoundtangle_FlatPanel_OuterBottomOnly}" />
        <Setter Property="Color" Value="{Binding InfluenceThread, Converter={StaticResource A_Converter_InfluenceThreadIdToColor}}" />
        <Style.Triggers>
            <DataTrigger Binding="{Binding IsDiscovered}" Value="False">
                <Setter Property="Color" Value="#969696" />
            </DataTrigger>
            <DataTrigger Binding="{Binding IsShowcaseEvent}" Value="True">
                <Setter Property="Preset" Value="{StaticResource A_FZMaterialPresetRoundtangle_MapPinSeasonEvent_OuterBottomOnly}" />
                <Setter Property="Color" Value="#FFFFFF" />
            </DataTrigger>
            <DataTrigger Binding="{Binding SeasonallyActive}" Value="True">
                <Setter Property="Preset" Value="{StaticResource A_FZMaterialPresetRoundtangle_MapPinSeasonEvent_OuterBottomOnly}" />
                <Setter Property="Color" Value="#FFFFFF" />
            </DataTrigger>
            <DataTrigger Binding="{Binding HasCompletedAvailableState}" Value="True">
                <Setter Property="Preset" Value="{StaticResource A_FZMaterialPresetRoundtangle_MapPinChampionsSeriesCompleted_OuterBottomOnly}" />
                <Setter Property="Color" Value="#FFFFFF" />
            </DataTrigger>
            <DataTrigger Binding="{Binding SeasonallyLockedOut}" Value="True">
                <Setter Property="Preset" Value="{StaticResource A_FZMaterialPresetRoundtangle_FlatPanel_OuterBottomOnly}" />
                <Setter Property="Color" Value="#969696" />
            </DataTrigger>
        </Style.Triggers>
    </Style>
    <SkewTransform x:Key="A_SkewTransform_MapPin_Italics" AngleX="-8"/>

    <local:MappingConverter x:Key="A_Converter_ThreadToExhibitionEventName"
                            Default="{local:Loc Map.IDS_MapPin_Race_Exhibition}">
        <local:MappingConverterEntry Key="street_racing_series" Value="{local:Loc Map.IDS_MapPin_Race_StreetRace}" />
    </local:MappingConverter>

    <Style x:Key="A_Style_FZMaterial_SeasonTimeRemainingIcon"
           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="local:MultiStringFormatter.Param1" Value="clock.png" />
        <Setter Property="ImageSource" Value="{Binding (local:MultiStringFormatter.Output), RelativeSource={RelativeSource Self}}" />
        <Setter Property="DockPanel.Dock" Value="Left" />
        <Setter Property="Width" Value="28" />
        <Setter Property="Height" Value="28" />
        <Setter Property="Margin" Value="0,-4" />
    </Style>
    <Style x:Key="A_Style_NetworkCountdownControl_SeasonTimeRemaining"
           TargetType="local:NetworkCountdownControl">
        <Setter Property="CountdownType" Value="SeasonTimeRemaining" />
        <Setter Property="GenerateFormattedString" Value="True" />
        <Setter Property="AbbreviateFormattedDurationString" Value="{local:Loc Map.IDS_MapPin_SeasonTimeRemainingFormat}" />
        <Setter Property="Visibility" Value="Collapsed" />
    </Style>
    <Style x:Key="A_Style_FZTextBlock_SeasonTimeRemaining"
           TargetType="local:FZTextBlock"
           BasedOn="{StaticResource A_Style_FZTextBlock_HorizonA}">
        <Setter Property="Text" Value="{Binding TimeRemaining, ElementName=TimeRemainingControl, Converter={StaticResource A_StringToUpper}}" />
        <Setter Property="DockPanel.Dock" Value="Right" />
        <Setter Property="HorizontalAlignment" Value="Right" />
        <Setter Property="CapHeight" Value="19" />
        <Setter Property="Color" Value="{StaticResource A_Color_MapPinDescription}" />
        <Setter Property="DockPanel.Dock" Value="Left" />
        <Setter Property="VerticalAlignment" Value="Center" />
    </Style>

    <local:MappingConverter x:Key="A_Converter_SeasonToPinPillIcon">
        <local:MappingConverterEntry Key="{x:Static local:Season.Spring}" Value="pill_spring.png" />
        <local:MappingConverterEntry Key="{x:Static local:Season.Summer}" Value="pill_summer.png" />
        <local:MappingConverterEntry Key="{x:Static local:Season.Autumn}" Value="pill_autumn.png" />
        <local:MappingConverterEntry Key="{x:Static local:Season.Winter}" Value="pill_winter.png" />
    </local:MappingConverter>

    <local:MappingConverter x:Key="A_Converter_SeasonToPinPillIconComplete">
        <local:MappingConverterEntry Key="{x:Static local:Season.Spring}" Value="pill_spring_complete.png" />
        <local:MappingConverterEntry Key="{x:Static local:Season.Summer}" Value="pill_summer_complete.png" />
        <local:MappingConverterEntry Key="{x:Static local:Season.Autumn}" Value="pill_autumn_complete.png" />
        <local:MappingConverterEntry Key="{x:Static local:Season.Winter}" Value="pill_winter_complete.png" />
    </local:MappingConverter>

    <Style x:Key="A_Style_AutoScrollPanel_MapPinTitle" BasedOn="{StaticResource A_Style_AutoScrollPanel_Masked}" TargetType="local:AutoScrollPanel">
        <Setter Property="InitialPause" Value="0:0:2.0" />
        <Setter Property="ScrollSeparation" Value="40" />
        <Setter Property="MaxHeight" Value="30" />
        <Setter Property="Orientation" Value="Horizontal" />
        <Setter Property="AnimationContext" Value="{Binding Title}" />
        <Style.Resources>
            <ControlTemplate x:Key="A_ControlTemplate_AutoscrollTemplate_Dynamic">
                <local:FZTextBlock Text="{Binding Title, Converter={StaticResource A_StringToUpper}}"
                                   Style="{StaticResource A_Style_FZTextBlock_MapPin_TitleText}" />
            </ControlTemplate>
        </Style.Resources>
    </Style>

    <local:MappingConverter x:Key="A_Converter_TrackToIconStreakShadow"
                            Default="True">
        <local:MappingConverterEntry Key="{x:Static local:XAMLTrack.ExpansionTwo}" Value="False" />
    </local:MappingConverter>

    <Style x:Key="A_Style_FZMaterial_MapPinMainIconShadow" TargetType="{x:Type local:FZMaterial}" BasedOn="{StaticResource A_Style_FZMaterial_FloatingIconShadow}">
        <Setter Property="CaptureSubgraph" Value="{Binding ActiveTrack, Converter={StaticResource A_Converter_TrackToIconStreakShadow}}"/>
    </Style>

    <ControlTemplate x:Key="A_ControlTemplate_ListBox_MapPinChallengeList" TargetType="{x:Type ListBox}">
        <StackPanel IsItemsHost="True" />
    </ControlTemplate>

    <local:MappingConverter x:Key="A_Converter_MapPinChallengePillTag_FromIsComplete"
                            Default="">
        <local:MappingConverterEntry Key="True" Value="Complete" />
    </local:MappingConverter>

    <ControlTemplate x:Key="A_ControlTemplate_MapPinChallengeItemContainer"
                     TargetType="ListBoxItem">
        <Grid>
            <local:FZMaterial CaptureSubgraph="True"
                              Margin="{Binding ActiveTrack, RelativeSource={RelativeSource AncestorType=Page}, Converter={StaticResource A_Converter_ActiveTrackToMapPinPillOffset}}">
                <local:FZMaterial x:Name="background"
                                  Style="{DynamicResource A_Style_FZMaterial_MapPinInfoPillBackground_Dynamic}">
                    <local:FZMaterial ImageSource="/ForzaUI;component/Textures/Data_Bound/PDLC1/Map/pins/pill_mask.png"
                                      UVMap="{StaticResource A_FZMaterialUVMap_MapPinInfoPill_ExpansionOneMask}"
                                      Preset="{StaticResource A_FZMaterialPreset_Cutout}"
                                      Visibility="{Binding ActiveTrack, RelativeSource={RelativeSource AncestorType=Page}, Converter={StaticResource A_Converter_VisibleIfExpansionOneMap}}" />
                </local:FZMaterial>
            </local:FZMaterial>
            <Grid>
                <Decorator Visibility="{Binding ActiveTrack, RelativeSource={RelativeSource AncestorType=Page}, Converter={StaticResource A_Converter_CollapsedIfExpansionOneMap}}">
                    <local:FZMaterial x:Name="MidasTouch"
                                      Style="{StaticResource A_Style_FZMaterial_MapPinInfoPillBackgroundStroke_Dynamic}" />
                </Decorator>
                <ContentPresenter />
            </Grid>
        </Grid>
    </ControlTemplate>

    <Style x:Key="A_Style_MapPinChallengeItemContainerStyle"
           TargetType="ListBoxItem">
        <Setter Property="Template" Value="{StaticResource A_ControlTemplate_MapPinChallengeItemContainer}" />
        <Setter Property="Margin" Value="0,6,0,0" />
        <Style.Resources>
            <Style x:Key="A_Style_FZMaterial_MapPinInfoPillBackground_Dynamic"
                   BasedOn="{StaticResource A_Style_FZMaterial_MapPinInfoPillBackground_Base}"
                   TargetType="{x:Type local:FZMaterial}">
                <Setter Property="Tag" Value="{Binding IsComplete, Converter={StaticResource A_Converter_MapPinChallengePillTag_FromIsComplete}}" />
            </Style>
        </Style.Resources>
    </Style>

    <local:MappingConverter x:Key="A_Converter_MapPinChallengePillIcon_FromIsComplete"
                            Default="pill_brick_challenge.png">
        <local:MappingConverterEntry Key="True" Value="pill_brick_challenge_complete.png" />
    </local:MappingConverter>

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

    <DataTemplate x:Key="A_DataTemplate_MapPinChallengeItem">
        <Grid>
            <local:FZMaterial CaptureSubgraph="True"
                              Preset="{StaticResource A_FZMaterialPresetStreak_FloatingIconShadow}">
                <local:FZMaterial x:Name="PillIcon"
                                  HorizontalAlignment="Left"
                                  Style="{StaticResource A_Style_FZMaterial_MapPinInfoPillIcon_Base}"
                                  local:MultiStringFormatter.Format="{StaticResource A_String_01FormatString}"
                                  local:MultiStringFormatter.Param0="{Binding ActiveTrack, RelativeSource={RelativeSource AncestorType=Page}, Converter={StaticResource A_Converter_ActiveTrackToMapPinIconLocation}}"
                                  ImageSourceNoPreload="{Binding (local:MultiStringFormatter.Output), RelativeSource={RelativeSource Self}}"
                                  local:MultiStringFormatter.Param1="{Binding IsComplete, Converter={StaticResource A_Converter_MapPinChallengePillIcon_FromIsComplete}}" />
            </local:FZMaterial>
            <DockPanel>
                <Decorator x:Name="PillIconProxy"
                           Width="{Binding ActualWidth, ElementName=PillIcon}"
                           Height="{Binding ActualHeight, ElementName=PillIcon}"
                           Margin="{Binding Margin, ElementName=PillIcon}"
                           DockPanel.Dock="Left" />
                <StackPanel DockPanel.Dock="Left"
                            HorizontalAlignment="Left"
                            VerticalAlignment="Center"
                            Margin="0,15,15,15">
                    <local:FZTextBlock Text="{Binding MapPinTitle, Converter={StaticResource A_StringToUpper}}"
                                       Style="{StaticResource A_Style_FZTextBlock_MapPinInfoPillTitle_Base}" />
                    <Decorator Style="{StaticResource A_Style_MapPinPill_TextSeparator_Base}" />
                    <local:FZTextBlock local:TextBlockInlineMarkup.Markup="{Binding MapPinDescription}"
                                       local:TextBlockInlineMarkup.ResourceBaseName="A_Style_FZRun_MapPinChallengeDescription_"
                                       Style="{StaticResource A_Style_FZTextBlock_MapPinInfoPillDescription_Base}"
                                       TextWrapping="Wrap" />
                </StackPanel>
            </DockPanel>
        </Grid>
    </DataTemplate>

    <Style x:Key="A_Style_FrameworkElement_MapPin_VisibleIfChallengesAvailable"
           TargetType="{x:Type FrameworkElement}">
        <Setter Property="Visibility" Value="Visible" />
        <Style.Triggers>
            <DataTrigger Binding="{Binding AvailableChallenges}" Value="{x:Null}">
                <Setter Property="Visibility" Value="Collapsed" />
            </DataTrigger>
            <DataTrigger Binding="{Binding AvailableChallenges.Count, FallbackValue=0}" Value="0">
                <Setter Property="Visibility" Value="Collapsed" />
            </DataTrigger>
        </Style.Triggers>
    </Style>

    <ControlTemplate x:Key="A_ControlTemplate_AvailableChallenges"
                     TargetType="Control">
        <Grid Style="{StaticResource A_Style_FrameworkElement_MapPin_VisibleIfChallengesAvailable}">
            <local:CommonListBox ItemsSource="{Binding AvailableChallenges}"
                                 ItemTemplate="{StaticResource A_DataTemplate_MapPinChallengeItem}"
                                 ItemContainerStyle="{StaticResource A_Style_MapPinChallengeItemContainerStyle}"
                                 Template="{StaticResource A_ControlTemplate_ListBox_MapPinChallengeList}"
                                 Focusable="False"
                                 Margin="0,-6,0,0" />
        </Grid>
    </ControlTemplate>

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

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

            <DataTemplate DataType="{x:Type local:MapRaceEventDataSource}">
                <DataTemplate.Resources>
                    <Style x:Key="A_Style_FrameworkElement_ShowIfSpecialEvent"
                           TargetType="FrameworkElement">
                        <Setter Property="Visibility" Value="Collapsed" />
                        <Style.Triggers>
                            <DataTrigger Binding="{Binding IsFinale}" Value="True">
                                <Setter Property="Visibility" Value="Visible" />
                            </DataTrigger>
                            <DataTrigger Binding="{Binding IsEliteSeries}" Value="True">
                                <Setter Property="Visibility" Value="Visible" />
                            </DataTrigger>
                            <DataTrigger Binding="{Binding IsShowcaseEvent}" Value="True">
                                <Setter Property="Visibility" Value="Visible" />
                            </DataTrigger>
                            <DataTrigger Binding="{Binding SeasonallyActive}" Value="True">
                                <Setter Property="Visibility" Value="Visible" />
                            </DataTrigger>
                            <DataTrigger Binding="{Binding XamlId}" Value="Goliath">
                                <Setter Property="Visibility" Value="Visible" />
                            </DataTrigger>
                            <DataTrigger Binding="{Binding XamlId}" Value="Kraken">
                                <Setter Property="Visibility" Value="Visible" />
                            </DataTrigger>
                            <DataTrigger Binding="{Binding XamlId}" Value="Leviathan">
                                <Setter Property="Visibility" Value="Visible" />
                            </DataTrigger>
                            <DataTrigger Binding="{Binding XamlId}" Value="SpeedChampions">
                                <Setter Property="Visibility" Value="Visible" />
                            </DataTrigger>
                            <DataTrigger Binding="{Binding XamlId}" Value="SpeedChampionsFinale">
                                <Setter Property="Visibility" Value="Visible" />
                            </DataTrigger>
                            <DataTrigger Binding="{Binding XamlId}" Value="RedGoliath">
                                <Setter Property="Visibility" Value="Visible" />
                            </DataTrigger>
                            <DataTrigger Binding="{Binding ActiveTrack, RelativeSource={RelativeSource AncestorType=Page}}" Value="{x:Static local:XAMLTrack.ExpansionOne}">
                                <Setter Property="Visibility" Value="Visible" />
                            </DataTrigger>
                            <DataTrigger Binding="{Binding IsDiscovered}" Value="False">
                                <Setter Property="Visibility" Value="Visible" />
                            </DataTrigger>
                        </Style.Triggers>
                    </Style>
                    <Style x:Key="A_Style_FrameworkElement_HideIfSpecialEvent"
                           TargetType="FrameworkElement">
                        <Setter Property="Visibility" Value="Visible" />
                        <Style.Triggers>
                            <DataTrigger Binding="{Binding IsFinale}" Value="True">
                                <Setter Property="Visibility" Value="Collapsed" />
                            </DataTrigger>
                            <DataTrigger Binding="{Binding IsEliteSeries}" Value="True">
                                <Setter Property="Visibility" Value="Collapsed" />
                            </DataTrigger>
                            <DataTrigger Binding="{Binding IsShowcaseEvent}" Value="True">
                                <Setter Property="Visibility" Value="Collapsed" />
                            </DataTrigger>
                            <DataTrigger Binding="{Binding SeasonallyActive}" Value="True">
                                <Setter Property="Visibility" Value="Collapsed" />
                            </DataTrigger>
                            <DataTrigger Binding="{Binding XamlId}" Value="Goliath">
                                <Setter Property="Visibility" Value="Collapsed" />
                            </DataTrigger>
                            <DataTrigger Binding="{Binding XamlId}" Value="Kraken">
                                <Setter Property="Visibility" Value="Collapsed" />
                            </DataTrigger>
                            <DataTrigger Binding="{Binding XamlId}" Value="Leviathan">
                                <Setter Property="Visibility" Value="Collapsed" />
                            </DataTrigger>
                            <DataTrigger Binding="{Binding XamlId}" Value="SpeedChampions">
                                <Setter Property="Visibility" Value="Collapsed" />
                            </DataTrigger>
                            <DataTrigger Binding="{Binding XamlId}" Value="SpeedChampionsFinale">
                                <Setter Property="Visibility" Value="Collapsed" />
                            </DataTrigger>
                            <DataTrigger Binding="{Binding XamlId}" Value="RedGoliath">
                                <Setter Property="Visibility" Value="Collapsed" />
                            </DataTrigger>
                            <DataTrigger Binding="{Binding ActiveTrack, RelativeSource={RelativeSource AncestorType=Page}}" Value="{x:Static local:XAMLTrack.ExpansionOne}">
                                <Setter Property="Visibility" Value="Collapsed" />
                            </DataTrigger>
                            <DataTrigger Binding="{Binding IsDiscovered}" Value="False">
                                <Setter Property="Visibility" Value="Collapsed" />
                            </DataTrigger>
                        </Style.Triggers>
                    </Style>
                    <local:MappingConverter x:Key="A_Converter_EliteSeriesStateToIcon"
                                            Default="pill_coop.png">
                        <local:MappingConverterEntry Key="True" Value="pill_coop_complete.png" />
                    </local:MappingConverter>
                    <Style x:Key="A_Style_FrameworkElement_ShownIfValidCarRestriction"
                           TargetType="FrameworkElement">
                        <Setter Property="Visibility" Value="Collapsed" />
                        <Style.Triggers>
                            <DataTrigger Binding="{Binding XAMLCarRestrictions.HasCarClassOrPIRestriction, FallbackValue=False}" Value="True">
                                <Setter Property="Visibility" Value="Visible" />
                            </DataTrigger>
                            <DataTrigger Binding="{Binding ValidRestrictionsTagline}" Value="True">
                                <Setter Property="Visibility" Value="Visible" />
                            </DataTrigger>
                        </Style.Triggers>
                    </Style>
                    <Style x:Key="A_Style_FZTextBlock_RaceEventMapPin_DescriptionText"
                           TargetType="local:FZTextBlock"
                           BasedOn="{StaticResource A_Style_FZTextBlock_MapPin_DescriptionText}">
                        <Setter Property="Text" Value="{Binding InfluenceThreadDisplayName}" />
                        <Style.Triggers>
                            <DataTrigger Binding="{Binding IsShowcaseEvent}" Value="True">
                                <Setter Property="Text" Value="{local:Loc Map.IDS_MapPin_Showcase}" />
                            </DataTrigger>

                            <MultiDataTrigger>
                                <!-- Change substring if showcase is seasonal remix-->
                                <MultiDataTrigger.Conditions>
                                    <Condition Binding="{Binding IsShowcaseEvent}" Value="True"/>
                                    <Condition Binding="{Binding SeasonallyActive}" Value="True"/>
                                </MultiDataTrigger.Conditions>
                                <Setter Property="Text" Value="{local:Loc Map.IDS_MapPin_RemixShowcase}" />
                            </MultiDataTrigger>

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

                    <Style x:Key="A_Style_FrameworkElement_VisibleIfEventAvailable">
                        <Setter Property="Visibility" Value="{Binding ExhibitionState, Converter={StaticResource A_Converter_CampaignRaceEventStateToVisibility}}" />
                        <Style.Triggers>
                            <DataTrigger Binding="{Binding ActiveTrack, RelativeSource={RelativeSource AncestorType=Page}}" Value="{x:Static local:XAMLTrack.ExpansionTwo}">
                                <Setter Property="Visibility" Value="Visible" />
                            </DataTrigger>
                            <MultiDataTrigger>
                                <MultiDataTrigger.Conditions>
                                    <Condition Binding="{Binding AvailableChallenges.Count}" Value="0" />
                                    <Condition Binding="{Binding ActiveTrack, RelativeSource={RelativeSource AncestorType=Page}}" Value="{x:Static local:XAMLTrack.ExpansionTwo}" />
                                </MultiDataTrigger.Conditions>
                                <Setter Property="Visibility" Value="Collapsed" />
                            </MultiDataTrigger>
                        </Style.Triggers>
                    </Style>

                </DataTemplate.Resources>
                <Grid>
                    <local:FZMaterial Opacity="0.6"
                                      Margin="-10"
                                      Color="#000000"
                                      Style="{StaticResource A_Style_FZMaterial_ShadowBase_ForSubgraph}">
                        <local:FZMaterial.Preset>
                            <local:FZMaterialPresetRoundtangle Softness="35" CornerRadius="20" AlphaMode="MultiplyInvColorOnly" Unlit="True" />
                        </local:FZMaterial.Preset>
                    </local:FZMaterial>
                    <StackPanel MinWidth="{StaticResource A_Double_MapPin_MinWidth}"
                                MaxWidth="{StaticResource A_Double_MapPin_MaxWidth}"
                                HorizontalAlignment="Center"
                                VerticalAlignment="Center">
                        <local:FZMaterial Preset="{StaticResource A_FZMaterialPresetRoundtangle_FlatPanel_OuterTopOnly}"
                                          Color="#FFFFFF"
                                          Margin="0,0,0,-0.5">
                            <DockPanel>
                                <DockPanel DockPanel.Dock="Top"
                                           Margin="{StaticResource A_Thickness_MapPinMainContentMargin_TopAndSides}">
                                    <Grid DockPanel.Dock="Left"
                                          Margin="0,0,-76,0">
                                        <Decorator Style="{StaticResource A_Style_FrameworkElement_HideIfSpecialEvent}">
                                            <local:FZMaterial Style="{StaticResource A_Style_FZMaterial_MapPinMainIconShadow}">
                                                <StackPanel>
                                                    <local:FZMaterial Preset="{StaticResource A_FZMaterialPresetRoundtangle_FlatPanel_InnerAll}"
                                                                      Color="{Binding InfluenceThread, Converter={StaticResource A_Converter_InfluenceThreadIdToColor}}"
                                                                      Margin="0,0,76,0">
                                                        <local:FZMaterial Style="{StaticResource A_Style_FZMaterial_MapPinRaceEventIcon}"
                                                                          Width="65"
                                                                          Height="65" />
                                                    </local:FZMaterial>
                                                    <Decorator DockPanel.Dock="Bottom" Height="16" />
                                                </StackPanel>
                                            </local:FZMaterial>
                                        </Decorator>
                                        <Decorator Style="{StaticResource A_Style_FrameworkElement_ShowIfSpecialEvent}"
                                                   Margin="0,0,-9,0">
                                            <local:FZMaterial Style="{StaticResource A_Style_FZMaterial_MapPinRaceEventIcon}"
                                                              Width="150"
                                                              Height="86" />
                                        </Decorator>
                                    </Grid>
                                    <Decorator Width="11" DockPanel.Dock="Left" />
                                    <StackPanel VerticalAlignment="Center"
                                                HorizontalAlignment="Left">
                                        <Grid>
                                            <Decorator Style="{StaticResource A_Style_FrameworkElement_MapPin_CollapsedIfUndiscovered}">
                                                <local:AutoScrollPanel Style="{StaticResource A_Style_AutoScrollPanel_MapPinTitle}" />
                                            </Decorator>
                                            <Decorator Style="{StaticResource A_Style_FrameworkElement_MapPin_VisibleIfUndiscovered}">
                                                <local:FZTextBlock Style="{StaticResource A_Style_FZTextBlock_MapPin_TitleText}"
                                                                   Text="{local:Loc Map.IDS_UndiscoveredRouteTitle}"
                                                                   Margin="10,0,0,0" />
                                            </Decorator>
                                        </Grid>
                                        <Decorator Height="11"
                                                   Visibility="{Binding Visibility, ElementName=PART_RaceEventDesc}" />
                                        <local:FZTextBlock x:Name="PART_RaceEventDesc" Style="{StaticResource A_Style_FZTextBlock_RaceEventMapPin_DescriptionText}" />
                                        <Decorator Height="16" />
                                    </StackPanel>
                                </DockPanel>
                                <Grid Margin="{StaticResource A_Thickness_MapPinMainContentMargin_BottomAndSides}"
                                      Style="{StaticResource A_Style_FrameworkElement_MapPin_CollapsedIfUndiscovered}">
                                    <StackPanel Visibility="{Binding ShowActiveEvents, Converter={StaticResource A_FZBooleanToVisibilityConverter_Inverse}}">
                                        <Decorator Visibility="{Binding ActiveTrack, RelativeSource={RelativeSource AncestorType=Page}, Converter={StaticResource A_Converter_CollapsedIfExpansionTwoMap}}">
                                            <Control Template="{StaticResource A_ControlTemplate_MapPinInfoPill}"
                                                     Visibility="{Binding ExhibitionState, Converter={StaticResource A_Converter_CampaignRaceEventStateToVisibility}}">
                                                <Control.Resources>
                                                    <Style x:Key="A_Style_FZMaterial_MapPinInfoPillIcon_Dynamic" TargetType="local:FZMaterial" BasedOn="{StaticResource A_Style_FZMaterial_MapPinInfoPillIcon_Base}">
                                                        <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="pill_exhibition.png" />
                                                        <Style.Triggers>
                                                            <DataTrigger Binding="{Binding ExhibitionState}" Value="{x:Static local:RaceEventState.Complete}">
                                                                <Setter Property="local:MultiStringFormatter.Param1" Value="pill_exhibition_complete.png" />
                                                            </DataTrigger>
                                                        </Style.Triggers>
                                                    </Style>
                                                    <Style x:Key="A_Style_FZTextBlock_MapPinInfoPillTitle_Dynamic" TargetType="local:FZTextBlock" BasedOn="{StaticResource A_Style_FZTextBlock_MapPinInfoPillTitle_Base}">
                                                        <Setter Property="Text" Value="{Binding InfluenceThread, Converter={StaticResource A_Converter_ThreadToExhibitionEventName}}" />
                                                    </Style>
                                                    <Style x:Key="A_Style_FZTextBlock_MapPinInfoPillDescription_Dynamic" TargetType="local:FZTextBlock" BasedOn="{StaticResource A_Style_FZTextBlock_MapPinInfoPillDescription_Base}">
                                                        <Setter Property="Text" Value="{Binding ExhibitionState, Converter={StaticResource A_Converter_MapPinRaceEventStateToString}}" />
                                                        <Style.Triggers>
                                                            <MultiDataTrigger>
                                                                <MultiDataTrigger.Conditions>
                                                                    <Condition Binding="{Binding IsFinale}" Value="True" />
                                                                    <Condition Binding="{Binding ExhibitionState}" Value="{x:Static local:RaceEventState.Unlocked}" />
                                                                </MultiDataTrigger.Conditions>
                                                                <Setter Property="Text" Value="{local:Loc Map.IDS_MapPin_FinaleIncomplete}" />
                                                            </MultiDataTrigger>
                                                        </Style.Triggers>
                                                    </Style>
                                                    <Style x:Key="A_Style_FZMaterial_MapPinInfoPillBackground_Dynamic" TargetType="local:FZMaterial" BasedOn="{StaticResource A_Style_FZMaterial_MapPinInfoPillBackground_Base}">
                                                        <Setter Property="Tag" Value="{Binding ExhibitionState, Converter={StaticResource A_Converter_MapPinRaceEventStateToBgTag}}" />
                                                    </Style>
                                                </Control.Resources>
                                            </Control>
                                        </Decorator>
                                        <Control Template="{StaticResource A_ControlTemplate_AvailableChallenges}"
                                                 Style="{StaticResource A_Style_FrameworkElement_MapPin_CollapsedIfUndiscovered}" />
                                        <!--StackPanel Visibility="{Binding ChampionsSeriesState, Converter={StaticResource A_Converter_CampaignRaceEventStateToVisibility}}">
                                            <Decorator Height="12" />
                                            <Control Template="{StaticResource A_ControlTemplate_MapPinInfoPill}">
                                                <Control.Resources>
                                                    <Style x:Key="A_Style_FZMaterial_MapPinInfoPillIcon_Dynamic" TargetType="local:FZMaterial" BasedOn="{StaticResource A_Style_FZMaterial_MapPinInfoPillIcon_Base}">
                                                        <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="pill_champions_series.png" />
                                                    </Style>
                                                    <Style x:Key="A_Style_FZTextBlock_MapPinInfoPillTitle_Dynamic" TargetType="local:FZTextBlock" BasedOn="{StaticResource A_Style_FZTextBlock_MapPinInfoPillTitle_Base}">
                                                        <Setter Property="Text" Value="{Binding InfluenceThreadDisplayName, Converter={StaticResource A_Converter_KingOfInfluenceThreadString}}" />
                                                    </Style>
                                                    <Style x:Key="A_Style_FZTextBlock_MapPinInfoPillDescription_Dynamic" TargetType="local:FZTextBlock" BasedOn="{StaticResource A_Style_FZTextBlock_MapPinInfoPillDescription_Base}">
                                                        <Setter Property="Text" Value="{Binding ChampionsSeriesState, Converter={StaticResource A_Converter_MapPinRaceEventStateToString}}" />
                                                    </Style>
                                                    <Style x:Key="A_Style_FZMaterial_MapPinInfoPillBackground_Dynamic" TargetType="local:FZMaterial" BasedOn="{StaticResource A_Style_FZMaterial_MapPinInfoPillBackground_Base}">
                                                        <Setter Property="Tag" Value="{Binding ChampionsSeriesState, Converter={StaticResource A_Converter_MapPinRaceEventStateToBgTag}}" />
                                                    </Style>
                                                </Control.Resources>
                                            </Control>
                                            <Decorator Height="5" />
                                            <UniformGrid Columns="3" Rows="1">
                                                <ContentControl Style="{StaticResource A_Style_ContentControl_MapPin3StarInfoPill}"
                                                                local:BindingProxy.B="{Binding ChampionsSeriesScore}"
                                                                local:BindingProxy.A="1"
                                                                Margin="0,0,5,0">
                                                    <Decorator HorizontalAlignment="Center"
                                                               VerticalAlignment="Center">
                                                        <local:FZMaterial Style="{StaticResource A_Style_FZMaterial_MapPin_ProgressStar}" />
                                                    </Decorator>
                                                </ContentControl>
                                                <ContentControl Style="{StaticResource A_Style_ContentControl_MapPin3StarInfoPill}"
                                                                local:BindingProxy.B="{Binding ChampionsSeriesScore}"
                                                                local:BindingProxy.A="2"
                                                                Margin="0,0,5,0">
                                                    <StackPanel Orientation="Horizontal"
                                                                HorizontalAlignment="Center"
                                                                VerticalAlignment="Center">
                                                        <local:FZMaterial Style="{StaticResource A_Style_FZMaterial_MapPin_ProgressStar}" />
                                                        <Decorator Width="5" />
                                                        <local:FZMaterial Style="{StaticResource A_Style_FZMaterial_MapPin_ProgressStar}" />
                                                    </StackPanel>
                                                </ContentControl>
                                                <ContentControl Style="{StaticResource A_Style_ContentControl_MapPin3StarInfoPill}"
                                                                local:BindingProxy.B="{Binding ChampionsSeriesScore}"
                                                                local:BindingProxy.A="3">
                                                    <StackPanel Orientation="Horizontal"
                                                                HorizontalAlignment="Center"
                                                                VerticalAlignment="Center">
                                                        <local:FZMaterial Style="{StaticResource A_Style_FZMaterial_MapPin_ProgressStar}" />
                                                        <Decorator Width="5" />
                                                        <local:FZMaterial Style="{StaticResource A_Style_FZMaterial_MapPin_ProgressStar}" />
                                                        <Decorator Width="5" />
                                                        <local:FZMaterial Style="{StaticResource A_Style_FZMaterial_MapPin_ProgressStar}" />
                                                    </StackPanel>
                                                </ContentControl>
                                            </UniformGrid>
                                        </StackPanel-->
                                        <Decorator Style="{StaticResource A_Style_FrameworkElement_VisibleIfEventAvailable}">
                                            <Decorator Height="12" Visibility="{Binding SeasonallyActive, Converter={StaticResource A_FZBooleanToVisibilityConverter}}" />
                                        </Decorator>
                                        <Decorator Visibility="{Binding SeasonallyActive, Converter={StaticResource A_FZBooleanToVisibilityConverter}}">
                                            <StackPanel>
                                                <local:FZMaterial Height="2" Margin="1,0,1,12" Color="#DCDCDC" Style="{StaticResource A_Style_FrameworkElement_VisibleIfEventAvailable}" />
                                                <Control Template="{StaticResource A_ControlTemplate_MapPinInfoPill}">
                                                    <Control.Resources>
                                                        <Style x:Key="A_Style_FZMaterial_MapPinInfoPillIcon_Dynamic" TargetType="local:FZMaterial" BasedOn="{StaticResource A_Style_FZMaterial_MapPinInfoPillIcon_Base}">
                                                            <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="local:MultiStringFormatter.Param1" Value="{Binding ScheduledSeason, RelativeSource={RelativeSource AncestorType=Page}, Converter={StaticResource A_Converter_SeasonToPinPillIcon}}" />
                                                            <Setter Property="ImageSource" Value="{Binding (local:MultiStringFormatter.Output), RelativeSource={RelativeSource Self}}" />
                                                            <Style.Triggers>
                                                                <DataTrigger Binding="{Binding IsSeasonEventComplete}" Value="True">
                                                                    <Setter Property="local:MultiStringFormatter.Param1" Value="{Binding ScheduledSeason, RelativeSource={RelativeSource AncestorType=Page}, Converter={StaticResource A_Converter_SeasonToPinPillIconComplete}}" />
                                                                </DataTrigger>
                                                                <DataTrigger Binding="{Binding IsEliteSeries}" Value="True">
                                                                    <Setter Property="local:MultiStringFormatter.Param1" Value="{Binding IsSeasonEventComplete, Converter={StaticResource A_Converter_EliteSeriesStateToIcon}}" />
                                                                </DataTrigger>
                                                            </Style.Triggers>
                                                        </Style>
                                                        <Style x:Key="A_Style_FZTextBlock_MapPinInfoPillTitle_Dynamic" TargetType="local:FZTextBlock" BasedOn="{StaticResource A_Style_FZTextBlock_MapPinInfoPillTitle_Base}">
                                                            <Setter Property="Text" Value="{local:Loc Map.IDS_MapPin_SeasonalChampionship}" />
                                                            <Style.Triggers>
                                                                <DataTrigger Binding="{Binding IsEliteSeries}" Value="True">
                                                                    <Setter Property="Text" Value="{local:Loc Map.IDS_MapPin_Race_CoopChampionship}" />
                                                                </DataTrigger>
                                                                <DataTrigger Binding="{Binding IsShowcaseEvent}" Value="True">
                                                                    <Setter Property="Text" Value="{local:Loc Map.IDS_MapPin_Race_SeasonalShowcase}" />
                                                                </DataTrigger>
                                                                <DataTrigger Binding="{Binding IsSeasonEventComplete}" Value="False">
                                                                    <Setter Property="Color" Value="#FFFFFF" />
                                                                </DataTrigger>
                                                            </Style.Triggers>
                                                        </Style>
                                                        <Style x:Key="A_Style_FZTextBlock_MapPinInfoPillDescription_Dynamic" TargetType="local:FZTextBlock" BasedOn="{StaticResource A_Style_FZTextBlock_MapPinInfoPillDescription_Base}">
                                                            <Setter Property="Text" Value="{Binding CollectionName}" />
                                                            <Setter Property="Color" Value="#FFFFFF" />
                                                            <Style.Triggers>
                                                                <DataTrigger Binding="{Binding IsShowcaseEvent}" Value="True">
                                                                    <Setter Property="Text" Value="{local:Loc Map.IDS_Available}"/>
                                                                </DataTrigger>
                                                                <DataTrigger Binding="{Binding IsSeasonEventComplete}" Value="True">
                                                                    <Setter Property="Text" Value="{local:Loc Map.IDS_Completed}"/>
                                                                    <Setter Property="Color" Value="{StaticResource A_Color_MapPinPillText_Normal}" />
                                                                </DataTrigger>
                                                            </Style.Triggers>
                                                        </Style>
                                                        <Style x:Key="A_Style_FZMaterial_MapPinInfoPillBackground_Dynamic" TargetType="local:FZMaterial" BasedOn="{StaticResource A_Style_FZMaterial_MapPinInfoPillBackground_Base}">
                                                            <Setter Property="Tag" Value="{Binding IsSeasonEventComplete, Converter={StaticResource A_Converter_MapPinPillHasCompletedToBgTag}}" />
                                                            <Style.Triggers>
                                                                <DataTrigger Binding="{Binding IsSeasonEventComplete}" Value="False">
                                                                    <Setter Property="Color" Value="#FFFFFF" />
                                                                    <Setter Property="Preset" Value="{StaticResource A_FZMaterialPresetRoundtangle_MapPin_SeasonallyActive_InnerAll}" />
                                                                </DataTrigger>
                                                            </Style.Triggers>
                                                        </Style>
                                                    </Control.Resources>
                                                </Control>
                                                <StackPanel Style="{StaticResource A_Style_FrameworkElement_ShownIfValidCarRestriction}">
                                                    <Decorator Height="10" />
                                                    <local:FZTextBlock Style="{StaticResource A_Style_FZTextBlock_HorizonA}"
                                                                       CapHeight="15"
                                                                       Color="{StaticResource A_Color_MapPinDescription}"
                                                                       Text="{Binding Source={local:Loc Map.IDS_MapPin_CarRestrictions}, Converter={StaticResource A_StringToUpper}}" />
                                                    <Decorator Height="6" />
                                                    <StackPanel Orientation="Horizontal">
                                                        <Control Style="{StaticResource A_Style_Control_AdvancedCarRestrictions}"
                                                                 Height="35"
                                                                 local:BindingProxy.A="{Binding XAMLCarRestrictions.CarPIMaxRestriction}"
                                                                 local:BindingProxy.B="{Binding XAMLCarRestrictions.CarClassRestriction}"
                                                                 local:BindingProxy.C="{Binding XAMLCarRestrictions.CarPIMinRestriction}"
                                                                 Visibility="{Binding XAMLCarRestrictions.HasCarClassOrPIRestriction, FallbackValue=Collapsed, Converter={StaticResource A_FZBooleanToVisibilityConverter}}" />
                                                        <Decorator Width="10"
                                                                   Visibility="{Binding XAMLCarRestrictions.HasCarClassOrPIRestriction, FallbackValue=Collapsed, Converter={StaticResource A_FZBooleanToVisibilityConverter}}" />
                                                        <local:FZTextBlock Style="{StaticResource A_Style_FZTextBlock_HorizonB}"
                                                                           CapHeight="15"
                                                                           Color="{StaticResource A_Color_MapPinDescription}"
                                                                           Text="{Binding RestrictionsTagline}"
                                                                           Visibility="{Binding ValidRestrictionsTagline, Converter={StaticResource A_FZBooleanToVisibilityConverter}}"
                                                                           VerticalAlignment="Center" />
                                                    </StackPanel>
                                                </StackPanel>
                                            </StackPanel>
                                        </Decorator>
                                        <Decorator Visibility="{Binding SeasonallyActive, Converter={StaticResource A_FZBooleanToVisibilityConverter_Inverse}}">
                                            <Decorator Visibility="{Binding IsShowcaseEvent, Converter={StaticResource A_FZBooleanToVisibilityConverter}}">
                                                <Control Template="{StaticResource A_ControlTemplate_MapPinInfoPill}">
                                                    <Control.Resources>
                                                        <Style x:Key="A_Style_FZMaterial_MapPinInfoPillIcon_Dynamic" TargetType="local:FZMaterial" BasedOn="{StaticResource A_Style_FZMaterial_MapPinInfoPillIcon_Base}">
                                                            <Setter Property="ImageSourceNoPreload" Value="/ForzaUI;component/Textures/Data_Bound/Horizon_Map/pins/pill_showcase.png" />
                                                        </Style>
                                                        <Style x:Key="A_Style_FZTextBlock_MapPinInfoPillTitle_Dynamic" TargetType="local:FZTextBlock" BasedOn="{StaticResource A_Style_FZTextBlock_MapPinInfoPillTitle_Base}">
                                                            <Setter Property="Text" Value="{local:Loc Map.IDS_MapPin_Race_ShowcaseEvent}" />
                                                        </Style>
                                                        <Style x:Key="A_Style_FZTextBlock_MapPinInfoPillDescription_Dynamic" TargetType="local:FZTextBlock" BasedOn="{StaticResource A_Style_FZTextBlock_MapPinInfoPillDescription_Base}">
                                                            <Setter Property="Text" Value="{Binding IsShowcaseEventComplete, Converter={StaticResource A_Converter_MapPinPillHasCompletedToString}}" />
                                                        </Style>
                                                        <Style x:Key="A_Style_FZMaterial_MapPinInfoPillBackground_Dynamic" TargetType="local:FZMaterial" BasedOn="{StaticResource A_Style_FZMaterial_MapPinInfoPillBackground_Base}">
                                                            <Setter Property="Tag" Value="{Binding IsShowcaseEventComplete, Converter={StaticResource A_Converter_MapPinPillHasCompletedToBgTag}}" />
                                                        </Style>
                                                    </Control.Resources>
                                                </Control>
                                            </Decorator>
                                        </Decorator>
                                        <DockPanel Margin="0,16,0,0"
                                                   Visibility="{Binding SeasonallyActive, Converter={StaticResource A_FZBooleanToVisibilityConverter}}">
                                            <local:FZMaterial Style="{StaticResource A_Style_FZMaterial_SeasonTimeRemainingIcon}" />
                                            <Decorator Width="10"
                                                       DockPanel.Dock="Left" />
                                            <local:NetworkCountdownControl x:Name="TimeRemainingControl"
                                                                           Style="{StaticResource A_Style_NetworkCountdownControl_SeasonTimeRemaining}" />
                                            <local:FZTextBlock Style="{StaticResource A_Style_FZTextBlock_SeasonTimeRemaining}" />
                                        </DockPanel>
                                    </StackPanel>
                                    <Decorator Visibility="{Binding ShowActiveEvents, Converter={StaticResource A_FZBooleanToVisibilityConverter}}">
                                        <Control Template="{StaticResource A_ControlTemplate_MapPinInfoPill}">
                                            <Control.Resources>
                                                <Style x:Key="A_Style_FZMaterial_MapPinInfoPillIcon_Dynamic" TargetType="local:FZMaterial" BasedOn="{StaticResource A_Style_FZMaterial_MapPinInfoPillIcon_Base}">
                                                    <Setter Property="Visibility" Value="Collapsed" />
                                                </Style>
                                                <Style x:Key="A_Style_FZTextBlock_MapPinInfoPillTitle_Dynamic" TargetType="local:FZTextBlock" BasedOn="{StaticResource A_Style_FZTextBlock_MapPinInfoPillTitle_Base}">
                                                    <Setter Property="Text" Value="{Binding ActiveEvents, Converter={StaticResource A_Converter_StringFormatConverter}, ConverterParameter={local:Loc Map.IDS_MapPin_NumEvents}}" />
                                                    <Setter Property="HorizontalAlignment" Value="Center" />
                                                </Style>
                                                <Style x:Key="A_Style_FZTextBlock_MapPinInfoPillDescription_Dynamic" TargetType="local:FZTextBlock" BasedOn="{StaticResource A_Style_FZTextBlock_MapPinInfoPillDescription_Base}">
                                                    <Setter Property="Text" Value="{local:Loc Map.IDS_MapPin_EventsStartingHere}" />
                                                    <Setter Property="HorizontalAlignment" Value="Center" />
                                                </Style>
                                                <Style x:Key="A_Style_FZMaterial_MapPinInfoPillBackground_Dynamic" TargetType="local:FZMaterial" BasedOn="{StaticResource A_Style_FZMaterial_MapPinInfoPillBackground_Base}">
                                                    <Setter Property="Color" Value="{StaticResource A_Color_Map_EventsSelectedBackground}" />
                                                    <Setter Property="Tag" Value="ShowStroke" />
                                                    <Style.Triggers>
                                                        <DataTrigger Binding="{Binding ActiveEvents}" Value="0">
                                                            <Setter Property="Color" Value="{StaticResource A_Color_MapPinPillBackground}" />
                                                            <Setter Property="Tag" Value="" />
                                                        </DataTrigger>
                                                    </Style.Triggers>
                                                </Style>
                                                <Style x:Key="A_Style_FZMaterial_MapPinInfoPillTextContainer_Dynamic"
                                                       TargetType="Panel">
                                                    <Setter Property="HorizontalAlignment" Value="Center" />
                                                    <Setter Property="Margin" Value="0,16" />
                                                </Style>
                                            </Control.Resources>
                                        </Control>
                                    </Decorator>
                                </Grid>
                            </DockPanel>
                        </local:FZMaterial>
                        <local:FZMaterial Style="{StaticResource A_Style_FZMaterial_RaceEventMapPinFooter}">
                            <DockPanel HorizontalAlignment="Center"
                                       VerticalAlignment="Center"
                                       Visibility="{Binding SeasonallyLockedOut, Converter={StaticResource A_FZBooleanToVisibilityConverter}}"
                                       Margin="10,0">
                                <local:FZMaterial Margin="0,8,-19,0"
                                                  Width="53"
                                                  Height="40"
                                                  VerticalAlignment="Bottom"
                                                  local:MultiStringFormatter.Format="{StaticResource A_String_01FormatString}"
                                                  local:MultiStringFormatter.Param0="{Binding ActiveTrack, RelativeSource={RelativeSource AncestorType=Page}, Converter={StaticResource A_Converter_ActiveTrackToMapPinIconLocation}}"
                                                  local:MultiStringFormatter.Param1="pill_locked.png"
                                                  ImageSource="{Binding (local:MultiStringFormatter.Output), RelativeSource={RelativeSource Self}}"
                                                  DockPanel.Dock="Left" />
                                <Decorator RenderTransform="{StaticResource A_SkewTransform_MapPin_Italics}"
                                           VerticalAlignment="Center">
                                    <local:FZTextBlock Text="{Binding SeasonallyLockedOutDesc}"
                                                       Style="{StaticResource A_Style_FZTextBlock_HorizonA}"
                                                       CapHeight="15"
                                                       Color="#FFFFFF" />
                                </Decorator>
                            </DockPanel>
                        </local:FZMaterial>
                    </StackPanel>
                </Grid>
            </DataTemplate>

            <DataTemplate DataType="{x:Type local:MapPinPlayerHouseDataSource}">
                <DataTemplate.Resources>
                    <local:MappingConverter x:Key="A_Converter_HousePurchaseStateToPerkStatusColor"
                                            Default="{StaticResource A_Color_MapPinTitle}">
                        <local:MappingConverterEntry Key="{x:Static local:PlayerHouseState.ForSale}" Value="#969696" />
                    </local:MappingConverter>
                    <local:MappingConverter x:Key="A_Converter_HousePurchaseStateToPerkStatusString"
                                            Default="{local:Loc Map.IDS_MapPin_House_ActivePerk}">
                        <local:MappingConverterEntry Key="{x:Static local:PlayerHouseState.ForSale}" Value="{local:Loc Map.IDS_MapPin_House_UnlockablePerk}"/>
                    </local:MappingConverter>
                    <local:MultiConverter x:Key="A_Converter_PerkStatusString">
                        <local:MultiConverterEntry Converter="{StaticResource A_Converter_HousePurchaseStateToPerkStatusString}" />
                        <local:MultiConverterEntry Converter="{StaticResource A_StringToUpper}" />
                    </local:MultiConverter>
                    <local:MappingConverter x:Key="A_Converter_HousePurchaseStateToString"
                                            Default="{local:Loc Map.IDS_MapPin_House_ForSale}">
                        <local:MappingConverterEntry Key="{x:Static local:PlayerHouseState.Owned}" Value="{local:Loc Map.IDS_MapPin_House_Owned}" />
                        <local:MappingConverterEntry Key="{x:Static local:PlayerHouseState.Home}" Value="{local:Loc Map.IDS_MapPin_House_Home}" />
                    </local:MappingConverter>
                    <local:MappingConverter x:Key="A_Converter_HousePurchaseStateToPerkIcon"
                                            Default="/ForzaUI;component/Textures/Data_Bound/Horizon_Map/pins/house_perk_active.png">
                        <local:MappingConverterEntry Key="{x:Static local:PlayerHouseState.ForSale}" Value="/ForzaUI;component/Textures/Data_Bound/Horizon_Map/pins/house_perk_inactive.png"/>
                    </local:MappingConverter>
                    <local:MappingConverter x:Key="A_Converter_HousePurchaseStateToPerkBgColor"
                                            Default="{StaticResource A_Color_Header_Background}">
                        <local:MappingConverterEntry Key="{x:Static local:PlayerHouseState.ForSale}" Value="#DCDCDC" />
                    </local:MappingConverter>
                    <local:MappingConverter x:Key="A_Converter_HousePurchaseStateToPriceVis"
                                            Default="Collapsed">
                        <local:MappingConverterEntry Key="{x:Static local:PlayerHouseState.ForSale}" Value="Visible" />
                    </local:MappingConverter>
                    <Style x:Key="A_Style_FZMaterial_HouseMapPinFooter"
                           BasedOn="{StaticResource A_Style_FZMaterial_MapPinFooter}"
                           TargetType="local:FZMaterial">
                        <Setter Property="Color" Value="{StaticResource A_Color_ItemStatusBackground_Alt}" />
                        <Style.Triggers>
                            <DataTrigger Binding="{Binding PurchaseState}" Value="{x:Static local:PlayerHouseState.Owned}">
                                <Setter Property="Color" Value="{StaticResource A_Color_Header_Background}" />
                            </DataTrigger>
                            <DataTrigger Binding="{Binding PurchaseState}" Value="{x:Static local:PlayerHouseState.Home}">
                                <Setter Property="Color" Value="#FFFFFF" />
                                <Setter Property="Preset" Value="{StaticResource A_FZMaterialPresetRoundtangle_MapPinChampionsSeriesCompleted_OuterBottomOnly}" />
                            </DataTrigger>
                        </Style.Triggers>
                    </Style>
                    <local:MappingConverter x:Key="A_Converter_HouseVisibleIfHome"
                                            Default="Collapsed">
                        <local:MappingConverterEntry Key="{x:Static local:PlayerHouseState.Home}" Value="Visible" />
                    </local:MappingConverter>
                    <local:MappingConverter x:Key="A_Converter_HouseAlignmentCenteredIfNotHome"
                                            Default="Center">
                        <local:MappingConverterEntry Key="{x:Static local:PlayerHouseState.Home}" Value="Stretch" />
                    </local:MappingConverter>
                    <local:MappingConverter x:Key="A_Converter_HousePurchaseInstructionColor"
                                            Default="#FFFFFF">
                        <local:MappingConverterEntry Key="{x:Static local:PlayerHouseState.Home}" Value="{StaticResource A_Color_MapPinPillText_Completed}" />
                    </local:MappingConverter>
                    <local:MappingConverter x:Key="A_Converter_PerkTextColor"
                                            Default="#FFFFFF">
                        <local:MappingConverterEntry Key="{x:Static local:PlayerHouseState.ForSale}" Value="#80000000" />
                    </local:MappingConverter>

                    <Style x:Key="A_Style_FZTextBlock_CostText" TargetType="local:FZTextBlock" BasedOn="{StaticResource A_Style_FZTextBlock_HorizonA}">
                        <Setter Property="Text" Value="{Binding Cost, Converter={StaticResource A_NumUnitConverter_NoUnit_0dp}}"/>
                        <Style.Triggers>
                            <DataTrigger Binding="{Binding Cost}" Value="0">
                                <Setter Property="Text" Value="{local:Loc InGameMarketplace.IDS_Free}"/>
                            </DataTrigger>
                        </Style.Triggers>
                    </Style>
                </DataTemplate.Resources>
                <Grid>
                    <local:FZMaterial Opacity="0.6"
                                      Margin="-10"
                                      Color="#000000"
                                      Style="{StaticResource A_Style_FZMaterial_ShadowBase_ForSubgraph}">
                        <local:FZMaterial.Preset>
                            <local:FZMaterialPresetRoundtangle Softness="35" CornerRadius="20" AlphaMode="MultiplyInvColorOnly" Unlit="True" />
                        </local:FZMaterial.Preset>
                    </local:FZMaterial>
                    <StackPanel MinWidth="{StaticResource A_Double_MapPin_MinWidth}"
                                MaxWidth="{StaticResource A_Double_MapPin_MaxWidth}"
                                HorizontalAlignment="Center"
                                VerticalAlignment="Center">
                        <local:FZMaterial Preset="{StaticResource A_FZMaterialPresetRoundtangle_FlatPanel_OuterTopOnly}"
                                          Color="#FFFFFF"
                                          Margin="0,0,0,-0.5">
                            <Grid>
                                <local:FZMaterial Style="{StaticResource A_Style_FZMaterial_MapPinMainIconShadow}"
                                                  Margin="16,16,0,0"
                                                  VerticalAlignment="Stretch"
                                                  GreedyMeasure="True">
                                    <local:FZMaterial Preset="{StaticResource A_FZMaterialPresetRoundtangle_FlatPanel_OuterAll}"
                                                      Color="#BC60E2"
                                                      HorizontalAlignment="Left"
                                                      VerticalAlignment="Top"
                                                      Width="65"
                                                      Height="65"
                                                      x:Name="PlayerHouseMainIcon">
                                        <local:FZMaterial ImageSource="/ForzaUI;component/Textures/Data_Bound/Horizon_Map/pins/house_main.png"
                                                          Width="65"
                                                          Height="65" />
                                    </local:FZMaterial>
                                </local:FZMaterial>
                                <StackPanel Margin="16">
                                    <DockPanel>
                                        <Decorator Width="{Binding ActualWidth, ElementName=PlayerHouseMainIcon}"
                                                   Height="{Binding ActualHeight, ElementName=PlayerHouseMainIcon}"
                                                   DockPanel.Dock="Left"
                                                   Margin="0,0,11,0" />
                                        <StackPanel VerticalAlignment="Center"
                                                    HorizontalAlignment="Left">
                                            <local:AutoScrollPanel Style="{StaticResource A_Style_AutoScrollPanel_MapPinTitle}" />
                                            <Decorator Height="11" />
                                            <local:FZTextBlock Text="{Binding PurchaseState, Converter={StaticResource A_Converter_HousePurchaseStateToString}}"
                                                               Style="{StaticResource A_Style_FZTextBlock_MapPin_DescriptionText}" />
                                        </StackPanel>
                                    </DockPanel>
                                    <Decorator Height="16"
                                               Visibility="{Binding PerkTitle, Converter={StaticResource A_StringVisConverter}}" />
                                    <local:FZTextBlock Style="{StaticResource A_Style_FZTextBlock_HorizonA}"
                                                       CapHeight="19"
                                                       Text="{Binding PurchaseState, Converter={StaticResource A_Converter_PerkStatusString}}"
                                                       Color="{Binding PurchaseState, Converter={StaticResource A_Converter_HousePurchaseStateToPerkStatusColor}}"
                                                       DockPanel.Dock="Bottom"
                                                       Visibility="{Binding PerkTitle, Converter={StaticResource A_StringVisConverter}}" />
                                    <Decorator Height="12"
                                               Visibility="{Binding PerkTitle, Converter={StaticResource A_StringVisConverter}}" />
                                    <Control Template="{StaticResource A_ControlTemplate_MapPinInfoPill}"
                                             Visibility="{Binding PerkTitle, Converter={StaticResource A_StringVisConverter}}">
                                        <Control.Resources>
                                            <Style x:Key="A_Style_FZMaterial_MapPinInfoPillIcon_Dynamic" TargetType="local:FZMaterial" BasedOn="{StaticResource A_Style_FZMaterial_MapPinInfoPillIcon_Base}">
                                                <Setter Property="ImageSource" Value="{Binding PurchaseState, Converter={StaticResource A_Converter_HousePurchaseStateToPerkIcon}}" />
                                            </Style>
                                            <Style x:Key="A_Style_FZTextBlock_MapPinInfoPillTitle_Dynamic" TargetType="local:FZTextBlock" BasedOn="{StaticResource A_Style_FZTextBlock_MapPinInfoPillTitle_Base}">
                                                <Setter Property="Text" Value="{Binding PerkTitle, Converter={StaticResource A_StringToUpper}}" />
                                                <Setter Property="Color" Value="{Binding PurchaseState, Converter={StaticResource A_Converter_PerkTextColor}}" />
                                            </Style>
                                            <Style x:Key="A_Style_FZTextBlock_MapPinInfoPillDescription_Dynamic" TargetType="local:FZTextBlock" BasedOn="{StaticResource A_Style_FZTextBlock_MapPinInfoPillDescription_Base}">
                                                <Setter Property="Text" Value="{Binding PerkDesc}" />
                                                <Setter Property="Color" Value="{Binding PurchaseState, Converter={StaticResource A_Converter_PerkTextColor}}" />
                                            </Style>
                                            <Style x:Key="A_Style_FZMaterial_MapPinInfoPillBackground_Dynamic" TargetType="local:FZMaterial" BasedOn="{StaticResource A_Style_FZMaterial_MapPinInfoPillBackground_Base}">
                                                <Setter Property="Color" Value="{Binding PurchaseState, Converter={StaticResource A_Converter_HousePurchaseStateToPerkBgColor}}" />
                                            </Style>
                                        </Control.Resources>
                                    </Control>
                                    <Decorator Height="16"
                                               Visibility="{Binding PurchaseState, Converter={StaticResource A_Converter_HousePurchaseStateToPriceVis}}"/>
                                    <Grid Visibility="{Binding PurchaseState, Converter={StaticResource A_Converter_HousePurchaseStateToPriceVis}}">
                                        <local:FZTextBlock Text="{Binding Source={local:Loc Map.IDS_MapPin_House_Price}, Converter={StaticResource A_StringToUpper}}"
                                                           Style="{StaticResource A_Style_FZTextBlock_HorizonA}"
                                                           CapHeight="21"
                                                           Color="{StaticResource A_Color_MapPinDescription}"
                                                           DockPanel.Dock="Left"
                                                           VerticalAlignment="Center" />
                                        <StackPanel Orientation="Horizontal"
                                                    DockPanel.Dock="Right"
                                                    HorizontalAlignment="Right">
                                            <local:FZMaterial ImageSource="/ForzaUI;component/Textures/Data_Bound/Horizon_Map/pins/house_cost_cr.png"
                                                              Width="29"
                                                              Height="29"
                                                              Margin="0,-3" />
                                            <Decorator Width="7" />
                                            <local:FZTextBlock Style="{StaticResource A_Style_FZTextBlock_CostText}"
                                                               CapHeight="21"
                                                               Color="{StaticResource A_Color_MapPinDescription}"
                                                               VerticalAlignment="Center" />
                                        </StackPanel>
                                    </Grid>
                                </StackPanel>
                            </Grid>
                        </local:FZMaterial>
                        <local:FZMaterial Style="{StaticResource A_Style_FZMaterial_HouseMapPinFooter}">
                            <Decorator Margin="16,0,0,0">
                                <DockPanel HorizontalAlignment="{Binding PurchaseState, Converter={StaticResource A_Converter_HouseAlignmentCenteredIfNotHome}}">
                                    <local:FZMaterial DockPanel.Dock="Right"
                                                      ImageSource="/ForzaUI;component/Textures/Data_Bound/Horizon_Map/pins/house_home.png"
                                                      Width="46"
                                                      Height="41"
                                                      VerticalAlignment="Bottom"
                                                      Margin="5,8,0,0"
                                                      Visibility="{Binding PurchaseState, Converter={StaticResource A_Converter_HouseVisibleIfHome}}" />
                                    <local:FZTextBlock Text="{Binding PurchaseInstruction}"
                                                       Style="{StaticResource A_Style_FZTextBlock_HorizonA}"
                                                       DockPanel.Dock="Left"
                                                       VerticalAlignment="Center"
                                                       CapHeight="15"
                                                       Margin="0,15"
                                                       Color="{Binding PurchaseState, Converter={StaticResource A_Converter_HousePurchaseInstructionColor}}" />
                                </DockPanel>
                            </Decorator>
                        </local:FZMaterial>
                    </StackPanel>
                </Grid>
            </DataTemplate>
            <DataTemplate DataType="{x:Type local:MapPinStuntPartyDataSource}">
                <DataTemplate.Resources>
                    <Color x:Key="A_Color_ForzathonLive_GradientA">#F800C0</Color>
                    <Color x:Key="A_Color_ForzathonLive_GradientB">#FF1970</Color>
                    <Color x:Key="A_Color_ForzathonLive">#FF1970</Color>
                    <Style x:Key="A_Style_FZRun_StuntParty_TIME"
                           TargetType="local:FZRun">
                        <Setter Property="Color"
                                Value="{StaticResource A_Color_ForzathonLive}" />
                    </Style>
                    <local:FZMaterialPresetRoundtangle x:Key="A_FZMaterialPresetRoundtangle_MapPinStuntParty_OuterBottomOnly"
                                               BasedOn="{StaticResource A_FZMaterialPreset_FlatPanel_Base}"
                                               GradientColorA="{StaticResource A_Color_ForzathonLive_GradientA}"
                                               GradientColorB="{StaticResource A_Color_ForzathonLive_GradientB}"
                                               GradientAngle="90"
                                               CornerRadius="{StaticResource A_CornerRadius_Outer_Bottom}"/>
                    <Style x:Key="A_Style_FZMaterial_StuntPartyMapPinFooter"
                           BasedOn="{StaticResource A_Style_FZMaterial_MapPinFooter}"
                           TargetType="local:FZMaterial">
                        <Setter Property="Color" Value="#FFFFFFFF" />
                        <Setter Property="Preset" Value="{StaticResource A_FZMaterialPresetRoundtangle_MapPinStuntParty_OuterBottomOnly}"/>
                    </Style>
                </DataTemplate.Resources>
                <Grid>
                    <local:FZMaterial Opacity="0.6"
                                      Margin="-10"
                                      Color="#000000"
                                      Style="{StaticResource A_Style_FZMaterial_ShadowBase_ForSubgraph}">
                        <local:FZMaterial.Preset>
                            <local:FZMaterialPresetRoundtangle Softness="35" CornerRadius="20" AlphaMode="MultiplyInvColorOnly" Unlit="True" />
                        </local:FZMaterial.Preset>
                    </local:FZMaterial>
                    <StackPanel MinWidth="{StaticResource A_Double_MapPin_MinWidth}"
                                MaxWidth="{StaticResource A_Double_MapPin_MaxWidth}"
                                HorizontalAlignment="Center"
                                VerticalAlignment="Center">
                        <local:FZMaterial Preset="{StaticResource A_FZMaterialPresetRoundtangle_FlatPanel_OuterTopOnly}"
                                          Color="#FFFFFF"
                                          Margin="0,0,0,-0.5">
                            <Grid>
                                <local:FZMaterial Style="{StaticResource A_Style_FZMaterial_MapPinMainIconShadow}"
                                                  Margin="7.5,16,0,0"
                                                  VerticalAlignment="Stretch"
                                                  GreedyMeasure="True">
                                    <local:FZMaterial ImageSource="/ForzaUI;component/Textures/Data_Bound/Horizon_Map/pins/stunt_party_backing.png"
                                                      HorizontalAlignment="Left"
                                                      VerticalAlignment="Top"
                                                      Width="64"
                                                      Height="64"
                                                      x:Name="MainIcon">
                                        <local:FZMaterial ImageSource="/ForzaUI;component/Textures/Data_Bound/Horizon_Map/pins/stunt_party_main.png"
                                                          VerticalAlignment="Center"
                                                          HorizontalAlignment="Center"
                                                          Width="82"
                                                          Height="64"
                                                          Margin="-20" />
                                    </local:FZMaterial>
                                </local:FZMaterial>
                                <StackPanel Margin="16">
                                    <DockPanel>
                                        <Decorator Width="{Binding ActualWidth, ElementName=MainIcon}"
                                                   Height="{Binding ActualHeight, ElementName=MainIcon}"
                                                   DockPanel.Dock="Left"
                                                   Margin="0,0,11,0" />
                                        <StackPanel VerticalAlignment="Center"
                                                    HorizontalAlignment="Left">
                                            <StackPanel Orientation="Horizontal">
                                                <local:FZTextBlock Text="{local:Loc Map.IDS_MapPin_Forzathon}"
                                                   Style="{StaticResource A_Style_FZTextBlock_MapPin_TitleText}"
                                                   Color="{StaticResource A_Color_MapPinDescription}" />
                                                <Decorator Width="6"/>
                                                <Decorator RenderTransform="{StaticResource A_SkewTransform_MapPin_Italics}">
                                                    <local:FZTextBlock Text="{local:Loc Map.IDS_MapPin_Live}"
                                                           Style="{StaticResource A_Style_FZTextBlock_MapPin_TitleText}"
                                                           Color="{StaticResource A_Color_ForzathonLive}" />
                                                </Decorator>
                                            </StackPanel>
                                            <Decorator Height="11" />
                                            <local:FZTextBlock Text="{local:Loc Map.IDS_MapPin_StuntParty_TakePart}"
                                                               Style="{StaticResource A_Style_FZTextBlock_MapPin_DescriptionText}" />
                                        </StackPanel>
                                    </DockPanel>
                                    <Decorator Height="17" />
                                    <StackPanel Visibility="{Binding IsInProgress, Converter={StaticResource A_FZBooleanToVisibilityConverter}}">
                                        <Control Template="{StaticResource A_ControlTemplate_MapPinInfoPill}"
                                                 Visibility="{Binding PerkTitle, Converter={StaticResource A_StringVisConverter}}">
                                            <Control.Resources>
                                                <Style x:Key="A_Style_FZMaterial_MapPinInfoPillIcon_Dynamic" TargetType="local:FZMaterial" BasedOn="{StaticResource A_Style_FZMaterial_MapPinInfoPillIcon_Base}">
                                                    <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="local:MultiStringFormatter.Param1" Value="{Binding StuntType, Converter={StaticResource A_Converter_FZMaterial_ImageSource_UIStuntPartyTypeToIcon}}" />
                                                    <Setter Property="ImageSource" Value="{Binding (local:MultiStringFormatter.Output), RelativeSource={RelativeSource Self}}" />
                                                </Style>
                                                <Style x:Key="A_Style_FZTextBlock_MapPinInfoPillTitle_Dynamic" TargetType="local:FZTextBlock" BasedOn="{StaticResource A_Style_FZTextBlock_MapPinInfoPillTitle_Base}">
                                                    <Setter Property="Text" Value="{Binding Stage, Converter={StaticResource A_StringToUpper}}" />
                                                </Style>
                                                <Style x:Key="A_Style_FZTextBlock_MapPinInfoPillDescription_Dynamic" TargetType="local:FZTextBlock" BasedOn="{StaticResource A_Style_FZTextBlock_MapPinInfoPillDescription_Base}">
                                                    <Setter Property="Text" Value="{Binding StageTarget}" />
                                                </Style>
                                            </Control.Resources>
                                        </Control>
                                        <Decorator Height="19" />
                                    </StackPanel>
                                    <DockPanel Margin="0,-3,0,0">
                                        <local:FZMaterial Style="{StaticResource A_Style_FZMaterial_SeasonTimeRemainingIcon}" />
                                        <local:FZTextBlock local:TextBlockInlineMarkup.ResourceBaseName="A_Style_FZRun_StuntParty_"
                                                           local:TextBlockInlineMarkup.Markup="{Binding Time, Converter={StaticResource A_StringToUpper}}"
                                                           Style="{StaticResource A_Style_FZTextBlock_SeasonTimeRemaining}"
                                                           VerticalAlignment="Center"
                                                           DockPanel.Dock="Right"
                                                           HorizontalAlignment="Right" />
                                    </DockPanel>
                                </StackPanel>
                            </Grid>
                        </local:FZMaterial>
                        <local:FZMaterial Style="{StaticResource A_Style_FZMaterial_StuntPartyMapPinFooter}" />
                    </StackPanel>
                </Grid>
            </DataTemplate>
            <DataTemplate DataType="{x:Type local:MapVehicleDataSource}">
                <DataTemplate.Resources>
                    <Style BasedOn="{StaticResource A_Style_FZTextBlock_MapPin_TitleText}"
                           x:Key="A_Style_FZTextBlock_PlayerName"
                           TargetType="local:FZTextBlock">
                        <Setter Property="TextAlignment" Value="Center" />
                        <Setter Property="HorizontalAlignment" Value="Center" />
                        <Style.Triggers>
                            <DataTrigger Binding="{Binding IsFriend}" Value="True">
                                <Setter Property="Color" Value="#09CCCC" />
                            </DataTrigger>
                            <DataTrigger Binding="{Binding IsInConvoy}" Value="True">
                                <Setter Property="Color" Value="#0BD85E" />
                            </DataTrigger>
                        </Style.Triggers>
                    </Style>
                    <Style x:Key="A_Style_FZMaterial_ConvoyFriendState"
                           TargetType="local:FZMaterial">
                        <Setter Property="Width" Value="65" />
                        <Setter Property="Height" Value="65" />
                        <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}}" />
                        <Style.Triggers>
                            <DataTrigger Binding="{Binding IsInConvoy}" Value="True">
                                <Setter Property="local:MultiStringFormatter.Param1" Value="convoy.png" />
                            </DataTrigger>
                            <DataTrigger Binding="{Binding IsFriend}" Value="True">
                                <Setter Property="local:MultiStringFormatter.Param1" Value="friend.png" />
                            </DataTrigger>
                        </Style.Triggers>
                    </Style>
                    <Style x:Key="A_Style_FZMaterial_ConvoyFriendStateBackground"
                           TargetType="local:FZMaterial">
                        <Setter Property="Visibility" Value="Collapsed" />
                        <Setter Property="Preset" Value="{StaticResource A_FZMaterialPresetRoundtangle_FlatPanel_InnerAll}" />
                        <Style.Triggers>
                            <DataTrigger Binding="{Binding IsFriend}" Value="True">
                                <Setter Property="Visibility" Value="Visible" />
                                <Setter Property="Color" Value="#09CCCC" />
                            </DataTrigger>
                            <DataTrigger Binding="{Binding IsInConvoy}" Value="True">
                                <Setter Property="Visibility" Value="Visible" />
                                <Setter Property="Color" Value="#0BD85E" />
                            </DataTrigger>
                        </Style.Triggers>
                    </Style>
                    <Style x:Key="A_Style_FrameworkElement_NameBlockContainer"
                           TargetType="FrameworkElement">
                        <Setter Property="HorizontalAlignment" Value="Right" />
                        <Style.Triggers>
                            <DataTrigger Binding="{Binding IsFriend}" Value="True">
                                <Setter Property="HorizontalAlignment" Value="Center" />
                            </DataTrigger>
                            <DataTrigger Binding="{Binding IsInConvoy}" Value="True">
                                <Setter Property="HorizontalAlignment" Value="Center" />
                            </DataTrigger>
                        </Style.Triggers>
                    </Style>
                    <local:FZMaterialPresetRoundtangle x:Key="A_FZMaterialPresetRoundtangle_FlatPanel_PlayerLevelBase_Dynamic"
                                                       BasedOn="{DynamicResource A_FZMaterialPresetRoundtangle_FlatPanel_InnerAll}" />
                </DataTemplate.Resources>
                <Grid>
                    <local:FZMaterial Opacity="0.6"
                                      Margin="-10"
                                      Color="#000000"
                                      Style="{StaticResource A_Style_FZMaterial_ShadowBase_ForSubgraph}">
                        <local:FZMaterial.Preset>
                            <local:FZMaterialPresetRoundtangle Softness="35" CornerRadius="20" AlphaMode="MultiplyInvColorOnly" Unlit="True" />
                        </local:FZMaterial.Preset>
                    </local:FZMaterial>
                    <local:FZMaterial Preset="{StaticResource A_FZMaterialPresetRoundtangle_FlatPanel_OuterAll}"
                                      Color="#FFFFFF">
                        <Grid>
                            <StackPanel VerticalAlignment="Center"
                                        Style="{StaticResource A_Style_FrameworkElement_NameBlockContainer}"
                                        Margin="44,0"
                                        x:Name="NameBlock">
                                <local:FZTextBlock Text="{Binding UserProfile.FormattedGamertag}"
                                                   Style="{StaticResource A_Style_FZTextBlock_PlayerName}" />
                                <Decorator Height="11"
                                           Visibility="{Binding Description, Converter={StaticResource A_StringVisConverter}}" />
                                <local:FZTextBlock Text="{Binding Description}"
                                                   Style="{StaticResource A_Style_FZTextBlock_MapPin_DescriptionText}"
                                                   TextAlignment="Center"
                                                   HorizontalAlignment="Center"
                                                   Visibility="{Binding Description, Converter={StaticResource A_StringVisConverter}}" />
                            </StackPanel>
                            <local:FZMaterial Style="{StaticResource A_Style_FZMaterial_MapPinMainIconShadow}"
                                              VerticalAlignment="Stretch"
                                              Margin="16,16,0,0"
                                              MinHeight="76">
                                <DockPanel Margin="0,0,16,16">
                                    <local:FZMaterial Style="{Binding XP, Converter={StaticResource A_XPConverter_PlayerBarStyle}}"
                                                      HorizontalAlignment="Left"
                                                      VerticalAlignment="Top"
                                                      Width="65"
                                                      Height="65">
                                        <Viewbox StretchDirection="DownOnly"
                                                 Margin="5">
                                            <StackPanel Orientation="Horizontal">
                                                <local:FZTextBlock Text="{Binding XP, Converter={StaticResource A_XPConverter}}"
                                                                   Style="{StaticResource A_Style_FZTextBlock_PlayerLevelText_Base}"
                                                                   CapHeight="25"
                                                                   HorizontalAlignment="Center"
                                                                   VerticalAlignment="Center" />
                                                <StackPanel VerticalAlignment="Center"
                                                            Visibility="{Binding XP, Converter={StaticResource A_Converter_PrestigeLevelToVisibilityFromXP}, FallbackValue=Collapsed}" Margin="0,-3,0,0">
                                                    <local:FZMaterial Style="{StaticResource A_Style_FZMaterial_PrestigeIcon}"
                                                                      Color="{Binding XP, Converter={StaticResource A_XPConverter_Text}}" />
                                                    <local:FZTextBlock Style="{StaticResource A_Style_FZTextBlock_PrestigeLevel}"
                                                                       Text="{Binding XP, Converter={StaticResource A_XPConverter_Prestige}}"
                                                                       Color="{Binding XP, Converter={StaticResource A_XPConverter_Text}}" />
                                                </StackPanel>
                                            </StackPanel>
                                        </Viewbox>
                                    </local:FZMaterial>
                                    <local:FZMaterial Style="{StaticResource A_Style_FZMaterial_ConvoyFriendStateBackground}"
                                                      DockPanel.Dock="Right">
                                        <local:FZMaterial Style="{StaticResource A_Style_FZMaterial_ConvoyFriendState}" />
                                    </local:FZMaterial>
                                    <Decorator Width="{Binding ActualWidth, ElementName=NameBlock}"
                                               Margin="28,0" />
                                </DockPanel>
                            </local:FZMaterial>
                        </Grid>
                    </local:FZMaterial>
                </Grid>
            </DataTemplate>

            <ControlTemplate x:Key="A_ControlTemplate_FastTravelButton" TargetType="{x:Type Control}">
                <local:ControllerButtonControl Style="{StaticResource A_Style_ControllerButtonControl_Default_ShowAlways}"
                                               Height="25"
                                               UseLargeIcon="False"
                                               Margin="0,0,0,0"
                                               Button="X" />
            </ControlTemplate>

            <DataTemplate DataType="{x:Type local:MapLocationDataSource}">
                <DataTemplate.Resources>
                    <local:MappingConverter x:Key="A_Converter_IconWidth"
                                            Default="149">
                        <local:MappingConverterEntry Key="True" Value="306"/>
                    </local:MappingConverter>
                    <local:MappingConverter x:Key="A_Converter_IconHeight"
                                            Default="87">
                        <local:MappingConverterEntry Key="True" Value="175"/>
                    </local:MappingConverter>
                    <local:MappingConverter x:Key="A_Converter_PinVerticalOffsetToIcon"
                                            Default="50">
                        <local:MappingConverterEntry Key="True" Value="0"/>
                    </local:MappingConverter>
                    <Style x:Key="A_Style_FastTravel_BUTTON" TargetType="{x:Type Control}">
                        <Setter Property="Template" Value="{StaticResource A_ControlTemplate_FastTravelButton}" />
                    </Style>
                    <Style x:Key="A_Style_FZMaterial_LocationTop" TargetType="{x:Type local:FZMaterial}">
                        <Setter Property="Preset" Value="{StaticResource A_FZMaterialPresetRoundtangle_FlatPanel_OuterAll}" />
                        <Style.Triggers>
                            <MultiDataTrigger>
                                <MultiDataTrigger.Conditions>
                                    <Condition Binding="{Binding FastTravel}" Value="True" />
                                    <Condition Binding="{Binding XDescription, RelativeSource={RelativeSource AncestorType=Page}, Converter={StaticResource A_StringVisConverter}}" Value="{x:Static Visibility.Visible}" />
                                </MultiDataTrigger.Conditions>
                                <Setter Property="Preset" Value="{StaticResource A_FZMaterialPresetRoundtangle_FlatPanel_OuterTopOnly}"/>
                            </MultiDataTrigger>
                            <DataTrigger Binding="{Binding SeasonallyActive}" Value="True">
                                <Setter Property="Preset" Value="{StaticResource A_FZMaterialPresetRoundtangle_FlatPanel_OuterTopOnly}"/>
                            </DataTrigger>
                        </Style.Triggers>
                    </Style>
                    <Style x:Key="A_Style_FZMaterial_LocationIcon" TargetType="{x:Type local:FZMaterial}">
                        <Setter Property="ImageSource" Value="{Binding (local:MultiStringFormatter.Output), RelativeSource={RelativeSource Self}}" />
                        <Setter Property="Margin" Value="0,0,-72,0"/>
                        <Style.Triggers>
                            <DataTrigger Binding="{Binding IsIconPathAbsolute}" Value="True">
                                <Setter Property="ImageSource" Value="{Binding Icon}"/>
                            </DataTrigger>
                            <DataTrigger Binding="{Binding SeasonallyActive}" Value="True">
                                <Setter Property="Margin" Value="14,14,-72,0"/>
                            </DataTrigger>
                        </Style.Triggers>
                    </Style>
                    <Style x:Key="A_Style_FZMaterial_MapPin_Seasonal_Games_Footer"
                           TargetType="local:FZMaterial"
                           BasedOn="{StaticResource A_Style_FZMaterial_MapPinFooter}">
                        <Setter Property="Preset" Value="{StaticResource A_FZMaterialPresetRoundtangle_FlatPanel_OuterBottomOnly}" />
                        <Style.Triggers>
                            <DataTrigger Binding="{Binding SeasonallyActive}" Value="True">
                                <Setter Property="Preset" Value="{StaticResource A_FZMaterialPresetRoundtangle_MapPinSeasonEvent_OuterBottomOnly}" />
                                <Setter Property="Color" Value="#FFFFFF" />
                            </DataTrigger>
                            <DataTrigger Binding="{Binding IsChampionshipComplete}" Value="True">
                                <Setter Property="Preset" Value="{StaticResource A_FZMaterialPresetRoundtangle_MapPinChampionsSeriesCompleted_OuterBottomOnly}" />
                                <Setter Property="Color" Value="#FFFFFF" />
                            </DataTrigger>
                        </Style.Triggers>
                    </Style>
                    <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.Triggers>
                            <DataTrigger Binding="{Binding SeasonallyActive}" Value="True">
                                <Setter Property="Margin" Value="0,16,16,16"/>
                            </DataTrigger>
                        </Style.Triggers>
                    </Style>
                    <local:MappingConverter x:Key="A_Converter_TrackToFastTravelTextMargin"
                                            Default="16,10,16,16">
                        <local:MappingConverterEntry Key="{x:Static local:XAMLTrack.ExpansionTwo}" Value="16,10,16,13" />
                    </local:MappingConverter>
                </DataTemplate.Resources>
                <StackPanel MinWidth="{StaticResource A_Double_MapPin_MinWidth}"
                            MaxWidth="{StaticResource A_Double_MapPin_MaxWidth}">
                    <local:FZMaterial Style="{StaticResource A_Style_FZMaterial_LocationTop}"
                                      Color="#FFFFFF">
                        <DockPanel>
                            <DockPanel DockPanel.Dock="Top">
                                <local:FZMaterial Style="{StaticResource A_Style_FZMaterial_LocationIcon}"
                                                  Visibility="{Binding Icon, Converter={StaticResource A_StringVisConverter}, FallbackValue=Collapsed}"
                                                  local:MultiStringFormatter.Format="{StaticResource A_String_01FormatString}"
                                                  local:MultiStringFormatter.Param0="{Binding ActiveTrack, RelativeSource={RelativeSource AncestorType=Page}, Converter={StaticResource A_Converter_ActiveTrackToMapPinIconLocation}}"
                                                  local:MultiStringFormatter.Param1="{Binding Icon}"
                                                  DockPanel.Dock="Left"
                                                  Width="146"
                                                  Height="87" />
                                <StackPanel Style="{StaticResource A_Style_FrameworkElement_Pin_Title}">
                                    <local:AutoScrollPanel Style="{StaticResource A_Style_AutoScrollPanel_MapPinTitle}" />
                                    <Decorator Height="12"
                                               Visibility="{Binding Description, Converter={StaticResource A_StringVisConverter}}" />
                                    <local:FZTextBlock Style="{StaticResource A_Style_FZTextBlock_MapPin_DescriptionText}"
                                                       Text="{Binding Description}"/>
                                </StackPanel>
                            </DockPanel>

                            <StackPanel Orientation="Vertical" Visibility="{Binding SeasonallyActive, Converter={StaticResource A_FZBooleanToVisibilityConverter}, FallbackValue=Collapsed}" >
                                <StackPanel Margin="{StaticResource A_Thickness_MapPinMainContentMargin_BottomAndSides}" DockPanel.Dock="Bottom">
                                    <Control Template="{StaticResource A_ControlTemplate_MapPinInfoPill}" x:Name="PillControl" Tag="InProgress">
                                        <Control.Resources>
                                            <Style x:Key="A_Style_FZMaterial_MapPinInfoPillIcon_Dynamic" TargetType="local:FZMaterial" BasedOn="{StaticResource A_Style_FZMaterial_MapPinInfoPillIcon_Base}">
                                                <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="local:MultiStringFormatter.Param1" Value="{Binding ScheduledSeason, RelativeSource={RelativeSource AncestorType=Page}, Converter={StaticResource A_Converter_SeasonToPinPillIcon}}" />
                                                <Setter Property="ImageSource" Value="{Binding (local:MultiStringFormatter.Output), RelativeSource={RelativeSource Self}}" />
                                                <Style.Triggers>
                                                    <DataTrigger Binding="{Binding IsChampionshipComplete}" Value="True">
                                                        <Setter Property="local:MultiStringFormatter.Param1" Value="{Binding ScheduledSeason, RelativeSource={RelativeSource AncestorType=Page}, Converter={StaticResource A_Converter_SeasonToPinPillIconComplete}}" />
                                                    </DataTrigger>
                                                </Style.Triggers>
                                            </Style>
                                            <Style x:Key="A_Style_FZTextBlock_MapPinInfoPillTitle_Dynamic" TargetType="local:FZTextBlock" BasedOn="{StaticResource A_Style_FZTextBlock_MapPinInfoPillTitle_Base}">
                                                <Setter Property="Text" Value="{local:Loc Map.IDS_MapPin_Race_Playground_Games_Championship}" />
                                                <Style.Triggers>
                                                    <DataTrigger Binding="{Binding IsChampionshipComplete}" Value="False">
                                                        <Setter Property="Color" Value="#FFFFFF" />
                                                    </DataTrigger>
                                                </Style.Triggers>
                                            </Style>
                                            <Style x:Key="A_Style_FZTextBlock_MapPinInfoPillDescription_Dynamic" TargetType="local:FZTextBlock" BasedOn="{StaticResource A_Style_FZTextBlock_MapPinInfoPillDescription_Base}">
                                                <Setter Property="Text" Value="{Binding CollectionName}" />
                                                <Style.Triggers>
                                                    <DataTrigger Binding="{Binding IsChampionshipComplete}" Value="False">
                                                        <Setter Property="Color" Value="#FFFFFF" />
                                                    </DataTrigger>
                                                </Style.Triggers>
                                            </Style>
                                            <Style x:Key="A_Style_FZMaterial_MapPinInfoPillBackground_Dynamic" TargetType="local:FZMaterial" BasedOn="{StaticResource A_Style_FZMaterial_MapPinInfoPillBackground_Base}">
                                                <Setter Property="Tag" Value="{Binding IsChampionshipComplete, Converter={StaticResource A_Converter_MapPinPillHasCompletedToBgTag}}" />
                                                <Style.Triggers>
                                                    <DataTrigger Binding="{Binding IsChampionshipComplete}" Value="False">
                                                        <Setter Property="Color" Value="#FFFFFF" />
                                                        <Setter Property="Preset" Value="{StaticResource A_FZMaterialPresetRoundtangle_MapPin_SeasonallyActive_InnerAll}" />
                                                    </DataTrigger>
                                                </Style.Triggers>
                                            </Style>
                                        </Control.Resources>
                                    </Control>
                                </StackPanel>
                                <StackPanel Orientation="Vertical" Margin="{StaticResource A_Thickness_MapPinMainContentMargin_BottomAndSides}" 
                                            Visibility="{Binding XAMLCarRestrictions.HasCarClassOrPIRestriction, Converter={StaticResource A_FZBooleanToVisibilityConverter}, FallbackValue=Collapsed}">
                                    <local:FZTextBlock Style="{StaticResource A_Style_FZTextBlock_HorizonA}"
                                                                       CapHeight="15"
                                                                       Color="{StaticResource A_Color_MapPinDescription}"
                                                                       Text="{Binding Source={local:Loc Map.IDS_MapPin_CarRestrictions}, Converter={StaticResource A_StringToUpper}}" />
                                    <Decorator Height="6" />
                                    <StackPanel Orientation="Horizontal">
                                        <Control Style="{StaticResource A_Style_Control_AdvancedCarRestrictions}" HorizontalAlignment="Left"
                                                                 Height="35"
                                                                 local:BindingProxy.A="{Binding XAMLCarRestrictions.CarPIMaxRestriction}"
                                                                 local:BindingProxy.B="{Binding XAMLCarRestrictions.CarClassRestriction}"
                                                                 local:BindingProxy.C="{Binding XAMLCarRestrictions.CarPIMinRestriction}"
                                                                 Visibility="{Binding XAMLCarRestrictions.HasCarClassOrPIRestriction, FallbackValue=Collapsed, Converter={StaticResource A_FZBooleanToVisibilityConverter}}" />
                                        <Decorator Width="10"
                                                   Visibility="{Binding XAMLCarRestrictions.HasCarClassOrPIRestriction, FallbackValue=Collapsed, Converter={StaticResource A_FZBooleanToVisibilityConverter}}" />
                                        <local:FZTextBlock Style="{StaticResource A_Style_FZTextBlock_HorizonB}"
                                                                           CapHeight="15"
                                                                           Color="{StaticResource A_Color_MapPinDescription}"
                                                                           Text="{Binding RestrictionsTagline}"
                                                                           Visibility="{Binding RestrictionsTagline, Converter={StaticResource A_StringVisConverter}, FallbackValue=Collapsed}"
                                                                           VerticalAlignment="Center" />
                                    </StackPanel>
                                    <Decorator Width="10"
                                               Visibility="{Binding XAMLCarRestrictions.HasCarClassOrPIRestriction, FallbackValue=Collapsed, Converter={StaticResource A_FZBooleanToVisibilityConverter}}" />
                                </StackPanel>
                                <DockPanel DockPanel.Dock="Bottom"
                                            Margin="16,0,16,16"
                                            Visibility="{Binding SeasonallyActive, Converter={StaticResource A_FZBooleanToVisibilityConverter}}">
                                    <local:FZMaterial Style="{StaticResource A_Style_FZMaterial_SeasonTimeRemainingIcon}" />
                                    <Decorator Width="10" DockPanel.Dock="Left" />
                                    <local:NetworkCountdownControl x:Name="TimeRemainingControl"
                                                                           Style="{StaticResource A_Style_NetworkCountdownControl_SeasonTimeRemaining}" />
                                    <local:FZTextBlock Style="{StaticResource A_Style_FZTextBlock_SeasonTimeRemaining}" />
                                </DockPanel>
                            </StackPanel>
                        </DockPanel>
                    </local:FZMaterial>
                    <local:FZMaterial Style="{StaticResource A_Style_FZMaterial_MapPin_Seasonal_Games_Footer}" Visibility="{Binding SeasonallyActive, Converter={StaticResource A_FZBooleanToVisibilityConverter}, FallbackValue=Collapsed}" />
                    <Decorator Visibility="{Binding XDescription, RelativeSource={RelativeSource AncestorType=Page}, Converter={StaticResource A_StringVisConverter}}">
                        <local:FZMaterial Preset="{StaticResource A_FZMaterialPresetRoundtangle_FlatPanel_OuterBottomOnly}"
                                          Visibility="{Binding FastTravel, Converter={StaticResource A_FZBooleanToVisibilityConverter}}"
                                          Margin="0,-0.5,0,0"
                                          Color="#1C1B1C">
                            <local:FZTextBlock Style="{StaticResource A_Style_FZTextBlock_HorizonA}"
                                               local:TextBlockInlineMarkup.Markup="{Binding Source={local:Loc Map.IDS_PressToFastTravel}, Converter={StaticResource A_StringToUpper}}"
                                               local:TextBlockInlineMarkup.ResourceBaseName="A_Style_FastTravel_"
                                               CapHeight="14"
                                               HorizontalAlignment="Center"
                                               VerticalAlignment="Center"
                                               Margin="{Binding ActiveTrack, RelativeSource={RelativeSource AncestorType=Page}, Converter={StaticResource A_Converter_TrackToFastTravelTextMargin}}"
                                               Color="#FFFFFF" />
                        </local:FZMaterial>
                    </Decorator>
                </StackPanel>
            </DataTemplate>

            <DataTemplate DataType="{x:Type local:MapAmbientGameplayDataSource}">
                <DataTemplate.Resources>
                    <Style x:Key="A_Style_FZMaterial_MapPinAmbientGameplayFooter"
                           BasedOn="{StaticResource A_Style_FZMaterial_MapPinFooter}"
                           TargetType="local:FZMaterial">
                        <Setter Property="Color" Value="{StaticResource A_Color_InfluenceThread_speed_trap}" />
                        <Style.Triggers>
                            <DataTrigger Binding="{Binding IsDiscovered}" Value="False">
                                <Setter Property="Color" Value="#969696" />
                            </DataTrigger>
                            <DataTrigger Binding="{Binding SeasonallyActive}" Value="True">
                                <Setter Property="Preset" Value="{StaticResource A_FZMaterialPresetRoundtangle_MapPinSeasonEvent_OuterBottomOnly}" />
                                <Setter Property="Color" Value="#FFFFFF" />
                            </DataTrigger>
                            <DataTrigger Binding="{Binding HasCompletedAvailableState}" Value="True">
                                <Setter Property="Preset" Value="{StaticResource A_FZMaterialPresetRoundtangle_MapPinChampionsSeriesCompleted_OuterBottomOnly}" />
                                <Setter Property="Color" Value="#FFFFFF" />
                            </DataTrigger>
                        </Style.Triggers>
                    </Style>
                    <Style x:Key="A_Style_UniformGrid_StarsLayout"
                           TargetType="UniformGrid">
                        <Setter Property="Tag" Value="0" />
                        <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>
                            <DataTrigger Binding="{Binding SeasonallyActive}" Value="True">
                                <Setter Property="Visibility" Value="Visible" />
                            </DataTrigger>
                        </Style.Triggers>
                    </Style>
                    <Style x:Key="A_Style_FZTextBlock_MedalScoreText"
                           BasedOn="{StaticResource A_Style_FZTextBlock_HorizonA}"
                           TargetType="local:FZTextBlock">
                        <Setter Property="Color" Value="{StaticResource A_Color_MapPinPillText_Normal}" />
                        <Setter Property="CapHeight" Value="15" />
                        <Setter Property="HorizontalAlignment" Value="Center" />
                        <Setter Property="Margin" Value="8,-2,8,8" />
                        <Style.Triggers>
                            <DataTrigger Binding="{Binding Tag, RelativeSource={RelativeSource AncestorType=ContentControl}}" Value="Achieved">
                                <Setter Property="Color" Value="#FFFFFF" />
                            </DataTrigger>
                        </Style.Triggers>
                    </Style>
                    <Style x:Key="A_Style_FZTextBlock_PB"
                           BasedOn="{StaticResource A_Style_FZTextBlock_HorizonA}"
                           TargetType="local:FZTextBlock">
                        <Setter Property="CapHeight" Value="19" />
                        <Setter Property="Color" Value="{StaticResource A_Color_MapPinDescription}" />
                    </Style>
                    <Style x:Key="A_Style_FZMaterial_MapPin_AmbientGameplayProgressStar"
                           BasedOn="{StaticResource A_Style_FZMaterial_MapPin_ProgressStar}"
                           TargetType="local:FZMaterial">
                        <Setter Property="Margin" Value="0,7,0,11" />
                    </Style>
                    <local:MappingConverter x:Key="A_Converter_AmbientGameplayTypeToIcon">
                        <local:MappingConverterEntry Key="speed_zone" Value="speed_zone.png" />
                        <local:MappingConverterEntry Key="speed_trap" Value="speed_trap.png" />
                        <local:MappingConverterEntry Key="danger_sign" Value="danger_sign.png" />
                        <local:MappingConverterEntry Key="drift_zone" Value="drift_zone.png" />
                        <local:MappingConverterEntry Key="trailblazer" Value="trailblazer.png" />
                    </local:MappingConverter>
                    <local:MappingConverter x:Key="A_Converter_AmbientGameplayTypeToSeasonalIcon">
                        <local:MappingConverterEntry Key="speed_zone" Value="seasonal_speed_zone.png" />
                        <local:MappingConverterEntry Key="speed_trap" Value="seasonal_speed_trap.png" />
                        <local:MappingConverterEntry Key="danger_sign" Value="seasonal_danger_sign.png" />
                        <local:MappingConverterEntry Key="drift_zone" Value="seasonal_drift_zone.png" />
                        <local:MappingConverterEntry Key="trailblazer" Value="seasonal_trailblazer.png" />
                    </local:MappingConverter>
                    <Style x:Key="A_Style_FZMaterial_MapPin_AmbientGameplayTitleIcon"
                           TargetType="local:FZMaterial">
                        <Setter Property="HorizontalAlignment" Value="Left" />
                        <Setter Property="VerticalAlignment" Value="Top" />
                        <Setter Property="Width" Value="65" />
                        <Setter Property="Height" Value="65" />
                        <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="local:MultiStringFormatter.Param1" Value="{Binding IconPath, Converter={StaticResource A_Converter_AmbientGameplayTypeToIcon}}" />
                        <Setter Property="ImageSourceNoPreload" Value="{Binding (local:MultiStringFormatter.Output), RelativeSource={RelativeSource Self}}" />
                        <Style.Triggers>
                            <DataTrigger Binding="{Binding SeasonallyActive}" Value="True">
                                <Setter Property="local:MultiStringFormatter.Param1" Value="{Binding IconPath, Converter={StaticResource A_Converter_AmbientGameplayTypeToSeasonalIcon}}" />
                            </DataTrigger>
                            <MultiDataTrigger>
                                <MultiDataTrigger.Conditions>
                                    <Condition Binding="{Binding IsDiscovered}" Value="False" />
                                    <Condition Binding="{Binding SeasonallyActive}" Value="False" />
                                </MultiDataTrigger.Conditions>
                                <Setter Property="ImageSourceNoPreload"
                                        Value="/ForzaUI;component/Textures/Data_Bound/PDLC2/Map/Pins/Undiscovered_PRStunt.png" />
                            </MultiDataTrigger>
                        </Style.Triggers>
                    </Style>
                    <Style x:Key="A_Style_FZTextBlock_AmbientGameplayMapPin_DescriptionText"
                           TargetType="local:FZTextBlock"
                           BasedOn="{StaticResource A_Style_FZTextBlock_MapPin_DescriptionText}">
                        <Setter Property="Text" Value="{Binding Description}" />
                        <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>
                    <Style x:Key="A_Style_FrameworkElement_AmbientGameplay_PBSeparator"
                           TargetType="FrameworkElement">
                        <Setter Property="Visibility" Value="Collapsed" />
                        <Style.Triggers>
                            <MultiDataTrigger>
                                <MultiDataTrigger.Conditions>
                                    <Condition Binding="{Binding CurrentScore, Converter={StaticResource A_StringVisConverter}}" Value="{x:Static Visibility.Collapsed}" />
                                    <Condition Binding="{Binding AvailableChallenges.Count, Converter={StaticResource A_CompareConverter}, ConverterParameter=0}" Value="{x:Static local:CompareResult.GreaterThan}" />
                                </MultiDataTrigger.Conditions>
                                <Setter Property="Visibility" Value="Visible" />
                            </MultiDataTrigger>
                        </Style.Triggers>
                    </Style>
                    <Style x:Key="A_Style_FrameworkElement_AmbientGameplay_SeasonalSeparator"
                           TargetType="FrameworkElement">
                        <Setter Property="Visibility" Value="Collapsed" />
                        <Style.Triggers>
                            <MultiDataTrigger>
                                <MultiDataTrigger.Conditions>
                                    <Condition Binding="{Binding SeasonallyActive}" Value="True" />
                                </MultiDataTrigger.Conditions>
                                <Setter Property="Visibility" Value="Visible" />
                            </MultiDataTrigger>
                        </Style.Triggers>
                    </Style>
                    <Style x:Key="A_Style_FrameworkElement_AmbientGameplay_BottomSeparator"
                           TargetType="FrameworkElement">
                        <Setter Property="Visibility" Value="Collapsed" />
                        <Style.Triggers>
                            <MultiDataTrigger>
                                <MultiDataTrigger.Conditions>
                                    <Condition Binding="{Binding SeasonallyActive}" Value="False" />
                                    <Condition Binding="{Binding CurrentScore, Converter={StaticResource A_StringVisConverter}}" Value="{x:Static Visibility.Collapsed}" />
                                </MultiDataTrigger.Conditions>
                                <Setter Property="Visibility" Value="Visible" />
                            </MultiDataTrigger>
                            <MultiDataTrigger>
                                <MultiDataTrigger.Conditions>
                                    <Condition Binding="{Binding AvailableChallenges.Count, Converter={StaticResource A_CompareConverter}, ConverterParameter=0}" Value="{x:Static local:CompareResult.GreaterThan}" />
                                    <Condition Binding="{Binding SeasonallyActive}" Value="False" />
                                </MultiDataTrigger.Conditions>
                                <Setter Property="Visibility" Value="Visible" />
                            </MultiDataTrigger>
                        </Style.Triggers>
                    </Style>
                </DataTemplate.Resources>
                <Grid>
                    <ContentControl Content="{Binding StuntPartyData}" Visibility="{Binding StuntPartyData, Converter={StaticResource A_FZBooleanToVisibilityConverter}}"/>
                    <Grid Visibility="{Binding StuntPartyData, Converter={StaticResource A_FZBooleanToVisibilityConverter_Inverse}}">
                        <local:FZMaterial Opacity="0.6"
                                      Margin="-10"
                                      Color="#000000"
                                      Style="{StaticResource A_Style_FZMaterial_ShadowBase_ForSubgraph}">
                            <local:FZMaterial.Preset>
                                <local:FZMaterialPresetRoundtangle Softness="35" CornerRadius="20" AlphaMode="MultiplyInvColorOnly" Unlit="True" />
                            </local:FZMaterial.Preset>
                        </local:FZMaterial>
                        <StackPanel MinWidth="{StaticResource A_Double_MapPin_MinWidth}"
                                    MaxWidth="{StaticResource A_Double_MapPin_MaxWidth}"
                                    HorizontalAlignment="Center"
                                    VerticalAlignment="Center">
                            <local:FZMaterial Preset="{StaticResource A_FZMaterialPresetRoundtangle_FlatPanel_OuterTopOnly}"
                                          Color="#FFFFFF"
                                          Margin="0,0,0,-0.5">
                                <Grid>
                                    <local:FZMaterial Style="{StaticResource A_Style_FZMaterial_MapPinMainIconShadow}"
                                                  Margin="16,16,0,0"
                                                  VerticalAlignment="Stretch"
                                                  GreedyMeasure="True">
                                        <local:FZMaterial Style="{StaticResource A_Style_FZMaterial_MapPin_AmbientGameplayTitleIcon}"
                                                          x:Name="ChallengeIcon" />
                                    </local:FZMaterial>
                                    <DockPanel Margin="16,0,16,0">
                                        <DockPanel DockPanel.Dock="Top"
                                               Margin="10,16,16,0"
                                               MinHeight="{Binding ActualHeight, ElementName=ChallengeIcon}">
                                            <Decorator Width="{Binding ActualWidth, ElementName=ChallengeIcon}"
                                                   DockPanel.Dock="Left" />
                                            <StackPanel VerticalAlignment="Center"
                                                    HorizontalAlignment="Left">
                                                <Grid>
                                                    <Decorator Style="{StaticResource A_Style_FrameworkElement_MapPin_CollapsedIfUndiscovered}">
                                                        <local:AutoScrollPanel Style="{StaticResource A_Style_AutoScrollPanel_MapPinTitle}" />
                                                    </Decorator>
                                                    <Decorator Style="{StaticResource A_Style_FrameworkElement_MapPin_VisibleIfUndiscovered}">
                                                        <local:FZTextBlock Style="{StaticResource A_Style_FZTextBlock_MapPin_TitleText}"
                                                                           Text="{local:Loc Map.IDS_UndiscoveredChallengeTitle}" />
                                                    </Decorator>
                                                </Grid>
                                                <Decorator Height="11" Visibility="{Binding Visibility, ElementName=PART_AmbientGameplayDescription}" />
                                                <local:FZTextBlock x:Name="PART_AmbientGameplayDescription" Style="{StaticResource A_Style_FZTextBlock_AmbientGameplayMapPin_DescriptionText}" />
                                            </StackPanel>
                                        </DockPanel>
                                        <Decorator Height="16"
                                                   DockPanel.Dock="Top"
                                                   Style="{StaticResource A_Style_FrameworkElement_MapPin_CollapsedIfUndiscovered}" />
                                        <Decorator x:Name="Spacer_BottomWhenEmpty"
                                                   Style="{StaticResource A_Style_FrameworkElement_AmbientGameplay_BottomSeparator}"
                                                   DockPanel.Dock="Bottom">
                                            <Decorator Height="16" />
                                        </Decorator>
                                        <DockPanel DockPanel.Dock="Bottom"
                                                   Margin="0,16,0,16"
                                                   Visibility="{Binding SeasonallyActive, Converter={StaticResource A_FZBooleanToVisibilityConverter}}">
                                            <local:FZMaterial Style="{StaticResource A_Style_FZMaterial_SeasonTimeRemainingIcon}" />
                                            <Decorator Width="10"
                                                       DockPanel.Dock="Left" />
                                            <local:NetworkCountdownControl x:Name="TimeRemainingControl"
                                                                           Style="{StaticResource A_Style_NetworkCountdownControl_SeasonTimeRemaining}" />
                                            <local:FZTextBlock Style="{StaticResource A_Style_FZTextBlock_SeasonTimeRemaining}" />
                                        </DockPanel>
                                        <Decorator DockPanel.Dock="Bottom"
                                                   Visibility="{Binding SeasonallyActive, Converter={StaticResource A_FZBooleanToVisibilityConverter}}">
                                            <Control Template="{StaticResource A_ControlTemplate_MapPinInfoPill}">
                                                <Control.Resources>
                                                    <Style x:Key="A_Style_FZMaterial_MapPinInfoPillIcon_Dynamic" TargetType="local:FZMaterial" BasedOn="{StaticResource A_Style_FZMaterial_MapPinInfoPillIcon_Base}">
                                                        <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="local:MultiStringFormatter.Param1" Value="{Binding ScheduledSeason, RelativeSource={RelativeSource AncestorType=Page}, Converter={StaticResource A_Converter_SeasonToPinPillIcon}}" />
                                                        <Setter Property="ImageSource" Value="{Binding (local:MultiStringFormatter.Output), RelativeSource={RelativeSource Self}}" />
                                                        <Style.Triggers>
                                                            <DataTrigger Binding="{Binding HasSeasonal}" Value="True">
                                                                <Setter Property="local:MultiStringFormatter.Param1" Value="{Binding ScheduledSeason, RelativeSource={RelativeSource AncestorType=Page}, Converter={StaticResource A_Converter_SeasonToPinPillIconComplete}}" />
                                                            </DataTrigger>
                                                        </Style.Triggers>
                                                    </Style>
                                                    <Style x:Key="A_Style_FZTextBlock_MapPinInfoPillTitle_Dynamic" TargetType="local:FZTextBlock" BasedOn="{StaticResource A_Style_FZTextBlock_MapPinInfoPillTitle_Base}">
                                                        <Setter Property="Text" Value="{local:Loc Map.IDS_MapPin_SeasonalObjective}" />
                                                        <Style.Triggers>
                                                            <DataTrigger Binding="{Binding HasSeasonal}" Value="False">
                                                                <Setter Property="Color" Value="#FFFFFF" />
                                                            </DataTrigger>
                                                        </Style.Triggers>
                                                    </Style>
                                                    <Style x:Key="A_Style_FZTextBlock_MapPinInfoPillDescription_Dynamic" TargetType="local:FZTextBlock" BasedOn="{StaticResource A_Style_FZTextBlock_MapPinInfoPillDescription_Base}">
                                                        <Setter Property="Text" Value="{Binding SeasonScore}" />
                                                        <Style.Triggers>
                                                            <DataTrigger Binding="{Binding HasSeasonal}" Value="False">
                                                                <Setter Property="Color" Value="#FFFFFF" />
                                                            </DataTrigger>
                                                            <DataTrigger Binding="{Binding HasSeasonal}" Value="True">
                                                                <Setter Property="Text" Value="{local:Loc Map.IDS_Completed}" />
                                                            </DataTrigger>
                                                        </Style.Triggers>
                                                    </Style>
                                                    <Style x:Key="A_Style_FZMaterial_MapPinInfoPillBackground_Dynamic" TargetType="local:FZMaterial" BasedOn="{StaticResource A_Style_FZMaterial_MapPinInfoPillBackground_Base}">
                                                        <Setter Property="Tag" Value="{Binding HasSeasonal, Converter={StaticResource A_Converter_MapPinPillHasCompletedToBgTag}}" />
                                                        <Style.Triggers>
                                                            <DataTrigger Binding="{Binding HasSeasonal}" Value="False">
                                                                <Setter Property="Color" Value="#FFFFFF" />
                                                                <Setter Property="Preset" Value="{StaticResource A_FZMaterialPresetRoundtangle_MapPin_SeasonallyActive_InnerAll}" />
                                                            </DataTrigger>
                                                        </Style.Triggers>
                                                    </Style>
                                                </Control.Resources>
                                            </Control>
                                        </Decorator>
                                        <Decorator DockPanel.Dock="Bottom"
                                                   Style="{StaticResource A_Style_FrameworkElement_MapPin_CollapsedIfUndiscovered}"
                                                   x:Name="Spacer_SeasonalPill">
                                            <StackPanel Style="{StaticResource A_Style_FrameworkElement_AmbientGameplay_SeasonalSeparator}">
                                                <Decorator Height="12" />
                                                <local:FZMaterial Height="2" Margin="1,0,1,0" Color="#DCDCDC" />
                                                <Decorator Height="12" />
                                            </StackPanel>
                                        </Decorator>
                                        <Control Template="{StaticResource A_ControlTemplate_AvailableChallenges}"
                                                 Style="{StaticResource A_Style_FrameworkElement_MapPin_CollapsedIfUndiscovered}"
                                                 DockPanel.Dock="Bottom" />
                                        <Decorator DockPanel.Dock="Bottom"
                                                   Visibility="{Binding CurrentScore, Converter={StaticResource A_StringVisConverter}}">
                                            <StackPanel Style="{StaticResource A_Style_FrameworkElement_MapPin_CollapsedIfUndiscovered}">
                                                <Decorator Height="12" />
                                                <DockPanel>
                                                    <local:FZTextBlock Text="{Binding Source={local:Loc Map.IDS_MyPB}, Converter={StaticResource A_StringToUpper}}"
                                                                   Style="{StaticResource A_Style_FZTextBlock_PB}"
                                                                   DockPanel.Dock="Left"
                                                                   VerticalAlignment="Center" />
                                                    <local:FZTextBlock Style="{StaticResource A_Style_FZTextBlock_PB}"
                                                                   DockPanel.Dock="Right"
                                                                   HorizontalAlignment="Right"
                                                                   VerticalAlignment="Center"
                                                                   Text="{Binding CurrentScore, Converter={StaticResource A_StringToUpper}}" />
                                                </DockPanel>
                                                <Decorator Height="12" />
                                            </StackPanel>
                                        </Decorator>
                                        <Decorator DockPanel.Dock="Bottom"
                                                   Style="{StaticResource A_Style_FrameworkElement_MapPin_CollapsedIfUndiscovered}"
                                                   x:Name="Spacer_PersonalBest">
                                            <StackPanel Style="{StaticResource A_Style_FrameworkElement_AmbientGameplay_PBSeparator}">
                                                <Decorator Height="12" />
                                                <local:FZMaterial Height="2" Margin="1,0,1,0" Color="#DCDCDC" />
                                                <Decorator Height="12" />
                                            </StackPanel>
                                        </Decorator>
                                        <UniformGrid Columns="3"
                                                     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}}"
                                                          Margin="0,0,5,0">
                                                <StackPanel VerticalAlignment="Center">
                                                    <local:FZMaterial Style="{StaticResource A_Style_FZMaterial_MapPin_AmbientGameplayProgressStar}"
                                                                  HorizontalAlignment="Center" />
                                                    <local:FZTextBlock Style="{StaticResource A_Style_FZTextBlock_MedalScoreText}"
                                                                   Text="{Binding BronzeScore, Converter={StaticResource A_StringToUpper}}" />
                                                </StackPanel>
                                            </ContentControl>
                                            <ContentControl Style="{StaticResource A_Style_ContentControl_MapPin3StarInfoPill}"
                                                          local:BindingProxy.A="2"
                                                          local:BindingProxy.B="{Binding Tag, RelativeSource={RelativeSource AncestorType=UniformGrid}}"
                                                          Margin="0,0,5,0">
                                                <StackPanel>
                                                    <StackPanel Orientation="Horizontal"
                                                            HorizontalAlignment="Center"
                                                            VerticalAlignment="Center">
                                                        <local:FZMaterial Style="{StaticResource A_Style_FZMaterial_MapPin_AmbientGameplayProgressStar}" />
                                                        <Decorator Width="5" />
                                                        <local:FZMaterial Style="{StaticResource A_Style_FZMaterial_MapPin_AmbientGameplayProgressStar}" />
                                                    </StackPanel>
                                                    <local:FZTextBlock Style="{StaticResource A_Style_FZTextBlock_MedalScoreText}"
                                                                   Text="{Binding SilverScore, Converter={StaticResource A_StringToUpper}}" />
                                                </StackPanel>
                                            </ContentControl>
                                            <ContentControl Style="{StaticResource A_Style_ContentControl_MapPin3StarInfoPill}"
                                                          local:BindingProxy.A="3"
                                                          local:BindingProxy.B="{Binding Tag, RelativeSource={RelativeSource AncestorType=UniformGrid}}">
                                                <StackPanel>
                                                    <StackPanel Orientation="Horizontal"
                                                            HorizontalAlignment="Center"
                                                            VerticalAlignment="Center">
                                                        <local:FZMaterial Style="{StaticResource A_Style_FZMaterial_MapPin_AmbientGameplayProgressStar}" />
                                                        <Decorator Width="5" />
                                                        <local:FZMaterial Style="{StaticResource A_Style_FZMaterial_MapPin_AmbientGameplayProgressStar}" />
                                                        <Decorator Width="5" />
                                                        <local:FZMaterial Style="{StaticResource A_Style_FZMaterial_MapPin_AmbientGameplayProgressStar}" />
                                                    </StackPanel>
                                                    <local:FZTextBlock Style="{StaticResource A_Style_FZTextBlock_MedalScoreText}"
                                                                   Text="{Binding GoldScore, Converter={StaticResource A_StringToUpper}}" />
                                                </StackPanel>
                                            </ContentControl>
                                        </UniformGrid>
                                    </DockPanel>
                                </Grid>
                            </local:FZMaterial>
                            <local:FZMaterial Style="{StaticResource A_Style_FZMaterial_MapPinAmbientGameplayFooter}" />
                        </StackPanel>
                    </Grid>
                </Grid>
                
            </DataTemplate>

            <Style x:Key="A_Style_FZTextBlock_MapPinStoryStarProgress"
                   TargetType="local:FZTextBlock"
                   BasedOn="{StaticResource A_Style_FZTextBlock_HorizonA}">
                <Setter Property="CapHeight" Value="20" />
                <Setter Property="Color" Value="{StaticResource A_Color_MapPinDescription}" />
            </Style>

            <ControlTemplate x:Key="A_ControlTemplate_StarsAchieved">
                <local:FZTextBlock Style="{StaticResource A_Style_FZTextBlock_MapPinStoryStarProgress}"
                                   Text="{Binding StarsAchieved}"
                                   CapHeight="20"
                                   Margin="0,0,0,6" />
            </ControlTemplate>
            <ControlTemplate x:Key="A_ControlTemplate_StarCount">
                <local:FZTextBlock Style="{StaticResource A_Style_FZTextBlock_MapPinStoryStarProgress}"
                                   Text="{Binding StarCount}"
                                   CapHeight="20"
                                   Margin="0,0,0,6" />
            </ControlTemplate>

            <local:MappingConverter x:Key="A_Converter_TagToStoryPillForegroundColor"
                                    Default="{StaticResource A_Color_MapPinPillText_Normal}">
                <local:MappingConverterEntry Key="Achieved" Value="#FFFFFF" />
            </local:MappingConverter>

            <ControlTemplate x:Key="A_ControlTemplate_ChaptersCompleted">
                <local:FZTextBlock Style="{StaticResource A_Style_FZTextBlock_HorizonB}"
                                   Text="{Binding ChaptersCompleted, Converter={StaticResource A_NumUnitConverter_NoUnit_0dp}}"
                                   CapHeight="15"
                                   Color="{Binding Tag, ElementName=PillControl, Converter={StaticResource A_Converter_TagToStoryPillForegroundColor}}"
                                   Margin="0,0,0,4" />
            </ControlTemplate>
            <ControlTemplate x:Key="A_ControlTemplate_ChapterCount">
                <local:FZTextBlock Style="{StaticResource A_Style_FZTextBlock_HorizonB}"
                                   Text="{Binding ChapterCount, Converter={StaticResource A_NumUnitConverter_NoUnit_0dp}}"
                                   CapHeight="15"
                                   Color="{Binding Tag, ElementName=PillControl, Converter={StaticResource A_Converter_TagToStoryPillForegroundColor}}"
                                   Margin="0,0,0,4" />
            </ControlTemplate>
            
            <DataTemplate DataType="{x:Type local:MapStoryEventDataSource}">
                <DataTemplate.Resources>
                    <local:MappingConverter x:Key="A_Converter_MapPinRaceEventStateToBgTag"
                                    Default="{x:Null}">
                        <local:MappingConverterEntry Key="{x:Static local:RaceEventState.Complete}" Value="Complete" />
                    </local:MappingConverter>
                    <Style x:Key="A_Style_MapPinStory_StarsAchieved_ACHIEVED" TargetType="{x:Type Control}">
                        <Setter Property="Template" Value="{StaticResource A_ControlTemplate_StarsAchieved}" />
                    </Style>
                    <Style x:Key="A_Style_MapPinStory_StarsAchieved_COUNT" TargetType="{x:Type Control}">
                        <Setter Property="Template" Value="{StaticResource A_ControlTemplate_StarCount}" />
                    </Style>
                    <Style x:Key="A_Style_FZTextBlock_MapPinStoryStarsProgress"
                           TargetType="local:FZTextBlock"
                           BasedOn="{StaticResource A_Style_FZTextBlock_HorizonA}">
                        <Setter Property="CapHeight" Value="19" />
                        <Setter Property="Color" Value="{StaticResource A_Color_MapPinDescription}" />
                        <Setter Property="local:TextBlockInlineMarkup.Markup" Value="{local:Loc Map.IDS_MapPin_Story_Progress_Stars}" />
                        <Setter Property="local:TextBlockInlineMarkup.ResourceBaseName" Value="A_Style_MapPinStory_StarsAchieved_" />
                    </Style>

                    <Style x:Key="A_Style_MapPinStory_ChaptersCompleted_ACHIEVED" TargetType="{x:Type Control}">
                        <Setter Property="Template" Value="{StaticResource A_ControlTemplate_ChaptersCompleted}" />
                    </Style>
                    <Style x:Key="A_Style_MapPinStory_ChaptersCompleted_COUNT" TargetType="{x:Type Control}">
                        <Setter Property="Template" Value="{StaticResource A_ControlTemplate_ChapterCount}" />
                    </Style>

                    <Style x:Key="A_Style_FZMaterial_StoryMapPinFooter"
                           TargetType="local:FZMaterial"
                           BasedOn="{StaticResource A_Style_FZMaterial_MapPinFooter}">
                        <Setter Property="Color" Value="{StaticResource A_Color_InfluenceThread_horizon_stories}" />
                        <Style.Triggers>
                            <DataTrigger Binding="{Binding EveryStarAchieved}" Value="True">
                                <Setter Property="Preset" Value="{StaticResource A_FZMaterialPresetRoundtangle_MapPinChampionsSeriesCompleted_OuterBottomOnly}" />
                                <Setter Property="Color" Value="#FFFFFF" />
                            </DataTrigger>
                        </Style.Triggers>
                    </Style>

                    <local:MappingConverter x:Key="A_Converter_IsBusinessToString"
                                            Default="{local:Loc Map.IDS_MapPin_Story_Story}">
                        <local:MappingConverterEntry Key="True" Value="{local:Loc Map.IDS_MapPin_Story_Business}" />
                    </local:MappingConverter>

                    <Style x:Key="A_Style_Control_StoryPill"
                           TargetType="Control">
                        <Setter Property="Template" Value="{StaticResource A_ControlTemplate_MapPinInfoPill}" />
                        <Style.Triggers>
                            <DataTrigger Binding="{Binding EveryChapterCompleted}" Value="True">
                                <Setter Property="Tag" Value="Achieved" />
                            </DataTrigger>
                            <DataTrigger Binding="{Binding EveryStarAchieved}" Value="True">
                                <Setter Property="Tag" Value="Complete" />
                            </DataTrigger>
                        </Style.Triggers>
                    </Style>

                    <local:MappingConverter x:Key="A_Converter_TagToStoryPillIcon"
                                            Default="story_chapter_dark.png">
                        <local:MappingConverterEntry Key="Achieved" Value="story_chapter_light.png" />
                    </local:MappingConverter>

                    <local:MultiConverter x:Key="A_Converter_ShownIfStoryHasSpecialIcon">
                        <local:MultiConverterEntry Converter="{StaticResource A_Converter_IsStorySpecial}" />
                        <local:MultiConverterEntry Converter="{StaticResource A_FZBooleanToVisibilityConverter}" />
                    </local:MultiConverter>
                    <local:MultiConverter x:Key="A_Converter_CollapsedIfStoryHasSpecialIcon">
                        <local:MultiConverterEntry Converter="{StaticResource A_Converter_IsStorySpecial}" />
                        <local:MultiConverterEntry Converter="{StaticResource A_FZBooleanToVisibilityConverter_Inverse}" />
                    </local:MultiConverter>
                    <local:MappingConverter x:Key="A_Converter_StoryIdToSpecialIcon">
                        <local:MappingConverterEntry Key="drift_club_2" Value="/ForzaUI;component/Textures/Data_Bound/PDLC1/Map/pins/story_special_drift_club_2.png" />
                        <local:MappingConverterEntry Key="story_11" Value="/ForzaUI;component/Textures/Data_Bound/Series11/Story11/Story11_MapPinLogo.png" />
                    </local:MappingConverter>

                    <local:MappingConverter x:Key="A_Converter_StoryIdToSpecialIconWidth" Default="0">
                        <local:MappingConverterEntry Key="drift_club_2" Value="150" />
                        <local:MappingConverterEntry Key="story_11" Value="195" />
                    </local:MappingConverter>
                    <local:MappingConverter x:Key="A_Converter_StoryIdToSpecialIconHeight" Default="0">
                        <local:MappingConverterEntry Key="drift_club_2" Value="86" />
                        <local:MappingConverterEntry Key="story_11" Value="79" />
                    </local:MappingConverter>

                    <local:MappingConverter x:Key="A_Converter_StoryIdToTitleVisibility" Default="Visible">
                        <local:MappingConverterEntry Key="story_11" Value="Collapsed" />
                    </local:MappingConverter>
                    <local:MappingConverter x:Key="A_Converter_StoryIdToCaptureSubgraph" Default="{StaticResource A_Boolean_True}">
                        <local:MappingConverterEntry Key="story_11" Value="{StaticResource A_Boolean_False}" />
                    </local:MappingConverter>

                </DataTemplate.Resources>
                <Grid>
                    <local:FZMaterial Opacity="0.6"
                                      Margin="-10"
                                      Color="#000000"
                                      Style="{StaticResource A_Style_FZMaterial_ShadowBase_ForSubgraph}">
                        <local:FZMaterial.Preset>
                            <local:FZMaterialPresetRoundtangle Softness="35" CornerRadius="20" AlphaMode="MultiplyInvColorOnly" Unlit="True" />
                        </local:FZMaterial.Preset>
                    </local:FZMaterial>
                    <StackPanel MinWidth="{StaticResource A_Double_MapPin_MinWidth}"
                                MaxWidth="{StaticResource A_Double_MapPin_MaxWidth}"
                                HorizontalAlignment="Center"
                                VerticalAlignment="Center">
                        <local:FZMaterial Preset="{StaticResource A_FZMaterialPresetRoundtangle_FlatPanel_OuterTopOnly}"
                                          Color="#FFFFFF"
                                          Margin="0,0,0,-0.5">
                            <DockPanel>
                                <DockPanel DockPanel.Dock="Top"
                                           Margin="{StaticResource A_Thickness_MapPinMainContentMargin_TopAndSides}">
                                    <local:FZMaterial DockPanel.Dock="Left"
                                                      Style="{StaticResource A_Style_FZMaterial_MapPinMainIconShadow}"
                                                      CaptureSubgraph="{Binding StoryId, Converter={StaticResource A_Converter_StoryIdToCaptureSubgraph}, FallbackValue=True}"
                                                      Margin="0,0,-76,0">
                                        <Grid>
                                            <StackPanel Visibility="{Binding StoryId, Converter={StaticResource A_Converter_CollapsedIfStoryHasSpecialIcon}}">
                                                <local:FZMaterial Preset="{StaticResource A_FZMaterialPresetRoundtangle_FlatPanel_OuterAll}"
                                                                  Color="{StaticResource A_Color_InfluenceThread_horizon_stories}"
                                                                  Margin="0,0,76,0">
                                                    <local:FZMaterial ImageSource="{Binding StoryId, Converter={StaticResource A_Converter_StoryIdToIcon}}"
                                                                      Width="65"
                                                                      Height="65" />
                                                </local:FZMaterial>
                                                <Decorator DockPanel.Dock="Bottom" Height="16" />
                                            </StackPanel>
                                            <local:FZMaterial Visibility="{Binding StoryId, Converter={StaticResource A_Converter_ShownIfStoryHasSpecialIcon}}"
                                                              ImageSource="{Binding StoryId, Converter={StaticResource A_Converter_StoryIdToSpecialIcon}}"
                                                              Width="{Binding StoryId, Converter={StaticResource A_Converter_StoryIdToSpecialIconWidth}}"
                                                              Height="{Binding StoryId, Converter={StaticResource A_Converter_StoryIdToSpecialIconHeight}}"
                                                              Margin="-9,0,0,0" />

                                        </Grid>
                                    </local:FZMaterial>
                                    <Decorator Width="11" DockPanel.Dock="Left" />
                                    <StackPanel VerticalAlignment="Center"
                                                HorizontalAlignment="Left"
                                                Visibility="{Binding StoryId, Converter={StaticResource A_Converter_StoryIdToTitleVisibility}}">
                                        <local:AutoScrollPanel Style="{StaticResource A_Style_AutoScrollPanel_MapPinTitle}" />
                                        <Decorator Height="11" />
                                        <local:FZTextBlock Text="{Binding IsBusiness, Converter={StaticResource A_Converter_IsBusinessToString}}"
                                                           Style="{StaticResource A_Style_FZTextBlock_MapPin_DescriptionText}" />
                                        <Decorator Height="16" />
                                    </StackPanel>
                                </DockPanel>
                                <Decorator Height="12"
                                           DockPanel.Dock="Bottom" />
                                <Decorator Margin="16,-3,16,0"
                                           DockPanel.Dock="Bottom">
                                    <DockPanel>
                                        <local:FZTextBlock Text="{Binding Source={local:Loc Map.IDS_MapPin_Story_TotalStars}, Converter={StaticResource A_StringToUpper}}"
                                                           Style="{StaticResource A_Style_FZTextBlock_HorizonA}"
                                                           CapHeight="19"
                                                           DockPanel.Dock="Left"
                                                           Color="{StaticResource A_Color_MapPinDescription}"
                                                           VerticalAlignment="Center" />
                                        <StackPanel Orientation="Horizontal"
                                                    DockPanel.Dock="Right"
                                                    HorizontalAlignment="Right"
                                                    VerticalAlignment="Center">
                                            <local:FZMaterial local:MultiStringFormatter.Format="{StaticResource A_String_01FormatString}"
                                                              local:MultiStringFormatter.Param0="{Binding ActiveTrack, RelativeSource={RelativeSource AncestorType=Page}, Converter={StaticResource A_Converter_ActiveTrackToMapPinIconLocation}}"
                                                              local:MultiStringFormatter.Param1="story_chapter_star.png"
                                                              ImageSource="{Binding (local:MultiStringFormatter.Output), RelativeSource={RelativeSource Self}}"
                                                              Width="28"
                                                              Height="28"
                                                              VerticalAlignment="Center" />
                                            <Decorator Width="7" />
                                            <local:FZTextBlock Style="{StaticResource A_Style_FZTextBlock_MapPinStoryStarsProgress}"
                                                               VerticalAlignment="Center" />
                                        </StackPanel>
                                    </DockPanel>
                                </Decorator>
                                <Decorator Style="{StaticResource A_Style_FrameworkElement_MapPin_VisibleIfChallengesAvailable}"
                                           Height="12"
                                           DockPanel.Dock="Bottom" />
                                <Control Template="{StaticResource A_ControlTemplate_AvailableChallenges}"
                                         DockPanel.Dock="Bottom"
                                         Margin="16,0,16,6" />
                                <StackPanel Style="{StaticResource A_Style_FrameworkElement_MapPin_VisibleIfChallengesAvailable}"
                                            DockPanel.Dock="Bottom"
                                            Margin="16,-4,16,0">
                                    <local:FZMaterial Height="2" Margin="1,0,1,0" Color="#DCDCDC" />
                                    <Decorator Height="12" />
                                </StackPanel>
                                <StackPanel Margin="{StaticResource A_Thickness_MapPinMainContentMargin_BottomAndSides}">
                                    <Control Style="{StaticResource A_Style_Control_StoryPill}"
                                             x:Name="PillControl">
                                        <Control.Resources>
                                            <Style x:Key="A_Style_FZMaterial_MapPinInfoPillIcon_Dynamic" TargetType="local:FZMaterial" BasedOn="{StaticResource A_Style_FZMaterial_MapPinInfoPillIcon_Base}">
                                                <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="{Binding Tag, ElementName=PillControl, Converter={StaticResource A_Converter_TagToStoryPillIcon}}" />
                                            </Style>
                                            <Style x:Key="A_Style_FZTextBlock_MapPinInfoPillTitle_Dynamic" TargetType="local:FZTextBlock" BasedOn="{StaticResource A_Style_FZTextBlock_MapPinInfoPillTitle_Base}">
                                                <Setter Property="Text" Value="{Binding Source={local:Loc Map.IDS_MapPin_Story_ChaptersCompleted}, Converter={StaticResource A_StringToUpper}}" />
                                                <Setter Property="Color" Value="{Binding Tag, ElementName=PillControl, Converter={StaticResource A_Converter_TagToStoryPillForegroundColor}}" />
                                            </Style>
                                            <Style x:Key="A_Style_FZTextBlock_MapPinInfoPillDescription_Dynamic" TargetType="local:FZTextBlock" BasedOn="{StaticResource A_Style_FZTextBlock_MapPinInfoPillDescription_Base}">
                                                <Setter Property="CapHeight" Value="15" />
                                                <Setter Property="local:TextBlockInlineMarkup.Markup" Value="{local:Loc Map.IDS_MapPin_Story_Progress_Chapters}" />
                                                <Setter Property="local:TextBlockInlineMarkup.ResourceBaseName" Value="A_Style_MapPinStory_ChaptersCompleted_" />
                                                <Setter Property="Color" Value="{Binding Tag, ElementName=PillControl, Converter={StaticResource A_Converter_TagToStoryPillForegroundColor}}" />
                                            </Style>
                                            <Style x:Key="A_Style_FZMaterial_MapPinInfoPillBackground_Dynamic" TargetType="local:FZMaterial" BasedOn="{StaticResource A_Style_FZMaterial_MapPinInfoPillBackground_Base}">
                                                <Setter Property="Tag" Value="{Binding Tag, ElementName=PillControl}" />
                                            </Style>
                                        </Control.Resources>
                                    </Control>
                                </StackPanel>
                            </DockPanel>
                        </local:FZMaterial>
                        <local:FZMaterial Style="{StaticResource A_Style_FZMaterial_StoryMapPinFooter}" />
                    </StackPanel>
                </Grid>
            </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.Triggers>
            <DataTrigger Binding="{Binding ActivityPanel.IsActive}"
                         Value="True">
                <Setter Property="Description"
                        Value="{local:Loc HelpButtons.IDS_JoinEvent}" />
                <Setter Property="AllowMouseClick"
                        Value="True" />
            </DataTrigger>
        </Style.Triggers>
    </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>
            <DataTrigger Binding="{Binding ActivityPanel.IsActive}"
                         Value="True">
                <Setter Property="Description"
                        Value="{local:Loc HelpButtons.IDS_ViewPlayer}" />
                <Setter Property="Visibility"
                        Value="{x:Static Visibility.Visible}" />
            </DataTrigger>
        </Style.Triggers>
    </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"/>
    </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="InfluenceThreadTagValue" Value="{Binding RouteInfluenceThread}" />
        <Setter Property="DesiredMargin" Value="15,15,15,15" />
        <Setter Property="MinimumMargin" Value="15,15,15,15" />
        <Setter Property="MaxHeightForDesiredMargin" Value="14000" />
        <Setter Property="MinMapHeight" Value="800" />
        <Setter Property="MaxMapHeight" Value="14000" />
    </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>

    <Style x:Key="A_Style_FZMaterial_ActivityPanel_ActiveButton"
           TargetType="{x:Type local:FZMaterial}">
        <Setter Property="Preset" Value="{StaticResource A_FZMaterialPresetRoundtangle_FlatPanel_InnerTopOnly}" />
        <Setter Property="Opacity" Value="0.3" />
        <Style.Triggers>
            <DataTrigger Binding="{Binding IsActive}"
                         Value="True">
                <Setter Property="Preset" Value="{StaticResource A_FZMaterialPresetRoundtangle_GradientHightlight_InnerTopOnly}" />
                <Setter Property="Opacity" Value="1" />
            </DataTrigger>
        </Style.Triggers>
    </Style>

    <local:MappingConverter x:Key="A_Converter_ActvityPanelStatusToOpacity"
                            Default="1">
        <local:MappingConverterEntry Key="False" Value="0.5" />
    </local:MappingConverter>

    <local:MappingConverter x:Key="A_Converter_GreaterThanToOpacity"
                            Default="0.5">
        <local:MappingConverterEntry Key="1" Value="1" />
    </local:MappingConverter>

    <local:MappingConverter x:Key="A_Converter_GreaterThanToVisible"
                            Default="Collapsed">
        <local:MappingConverterEntry Key="1" Value="Visible" />
    </local:MappingConverter>

    <local:MappingConverter x:Key="A_Converter_ThreadToActivityIconBackgroundColor">
        <local:MappingConverterEntry Key="asphalt_series" Value="#0090D5" />
        <local:MappingConverterEntry Key="cross_country_series" Value="#1CA352" />
        <local:MappingConverterEntry Key="mixed_surface_series" Value="#FF7110" />
        <local:MappingConverterEntry Key="drag_racing" Value="#E0346D" />
        <local:MappingConverterEntry Key="street_racing_series" Value="#304999" />
        <local:MappingConverterEntry Key="online_life_playground_games" Value="#FF4C00" />
    </local:MappingConverter>
    
    <local:MappingConverter x:Key="A_Converter_StoryIdToIcon">
        <local:MappingConverterEntry Key="aaa_taxi" Value="/ForzaUI;component/Textures/Data_Bound/ActivityPanel/Stories/AAA_Taxis.png" />
        <local:MappingConverterEntry Key="stunt_driver" Value="/ForzaUI;component/Textures/Data_Bound/ActivityPanel/Stories/Crazy_Steve.png" />
        <local:MappingConverterEntry Key="worlds_fastest" Value="/ForzaUI;component/Textures/Data_Bound/ActivityPanel/Stories/Worlds_Fastest.png" />
        <local:MappingConverterEntry Key="drift_club" Value="/ForzaUI;component/Textures/Data_Bound/ActivityPanel/Stories/Drift_Club.png" />
        <local:MappingConverterEntry Key="express_delivery" Value="/ForzaUI;component/Textures/Data_Bound/ActivityPanel/Stories/Express_Delivery.png" />
        <local:MappingConverterEntry Key="extreme_upgrades" Value="/ForzaUI;component/Textures/Data_Bound/ActivityPanel/Stories/Extreme_Upgrades.png" />
        <local:MappingConverterEntry Key="lets_play" Value="/ForzaUI;component/Textures/Data_Bound/ActivityPanel/Stories/Lets_Play.png" />
        <local:MappingConverterEntry Key="the_car_files" Value="/ForzaUI;component/Textures/Data_Bound/ActivityPanel/Stories/Mythbusters.png" />
        <local:MappingConverterEntry Key="british_racing_green" Value="/ForzaUI;component/Textures/Data_Bound/ActivityPanel/Stories/Racing_History.png" />
        <local:MappingConverterEntry Key="skill_school" Value="/ForzaUI;component/Textures/Data_Bound/ActivityPanel/Stories/Skill_School.png" />
        <local:MappingConverterEntry Key="hype_tour" Value="/ForzaUI;component/Textures/Data_Bound/PDLC2/Map/Pins/Hype_Tour.png" />
        <local:MappingConverterEntry Key="drift_club_2" Value="/ForzaUI;component/Textures/Data_Bound/Series11/DriftClub2/Drift_Club_2.png" />
        <local:MappingConverterEntry Key="story_11" Value="/ForzaUI;component/Textures/Data_Bound/Series11/Story11/ActivityPanel/Story_11.png" />

    </local:MappingConverter>


    <Style x:Key="A_Style_FZMaterial_ActivityIcon"
           TargetType="local:FZMaterial">
        <Setter Property="Color" Value="#FFFFFF" />
        <Style.Triggers>
            <MultiDataTrigger>
                <MultiDataTrigger.Conditions>
                    <Condition Binding="{Binding ActivityType}" Value="{x:Type local:EventNotificationActivity}" />
                    <Condition Binding="{Binding RibbonConfig}" Value="{x:Static local:XAMLRibbonConfig.Circuit}" />
                    <Condition Binding="{Binding InfluenceThread}" Value="asphalt_series" />
                </MultiDataTrigger.Conditions>
                <Setter Property="ImageSourceNoPreload"
                        Value="/ForzaUI;component/Textures/Data_Bound/ActivityPanel/Asphalt_Circuit.png" />
            </MultiDataTrigger>
            <MultiDataTrigger>
                <MultiDataTrigger.Conditions>
                    <Condition Binding="{Binding ActivityType}" Value="{x:Type local:EventNotificationActivity}" />
                    <Condition Binding="{Binding RibbonConfig}" Value="{x:Static local:XAMLRibbonConfig.P2P}" />
                    <Condition Binding="{Binding InfluenceThread}" Value="asphalt_series" />
                </MultiDataTrigger.Conditions>
                <Setter Property="ImageSourceNoPreload"
                        Value="/ForzaUI;component/Textures/Data_Bound/ActivityPanel/Asphalt_Sprint.png" />
            </MultiDataTrigger>
            <MultiDataTrigger>
                <MultiDataTrigger.Conditions>
                    <Condition Binding="{Binding ActivityType}" Value="{x:Type local:EventNotificationActivity}" />
                    <Condition Binding="{Binding RibbonConfig}" Value="{x:Static local:XAMLRibbonConfig.Circuit}" />
                    <Condition Binding="{Binding InfluenceThread}" Value="cross_country_series" />
                </MultiDataTrigger.Conditions>
                <Setter Property="ImageSourceNoPreload"
                        Value="/ForzaUI;component/Textures/Data_Bound/ActivityPanel/Cross_Country_Circuit.png" />
            </MultiDataTrigger>
            <MultiDataTrigger>
                <MultiDataTrigger.Conditions>
                    <Condition Binding="{Binding ActivityType}" Value="{x:Type local:EventNotificationActivity}" />
                    <Condition Binding="{Binding RibbonConfig}" Value="{x:Static local:XAMLRibbonConfig.P2P}" />
                    <Condition Binding="{Binding InfluenceThread}" Value="cross_country_series" />
                </MultiDataTrigger.Conditions>
                <Setter Property="ImageSourceNoPreload"
                        Value="/ForzaUI;component/Textures/Data_Bound/ActivityPanel/Cross_Country_Sprint.png" />
            </MultiDataTrigger>
            <MultiDataTrigger>
                <MultiDataTrigger.Conditions>
                    <Condition Binding="{Binding ActivityType}" Value="{x:Type local:EventNotificationActivity}" />
                    <Condition Binding="{Binding RibbonConfig}" Value="{x:Static local:XAMLRibbonConfig.Circuit}" />
                    <Condition Binding="{Binding InfluenceThread}" Value="mixed_surface_series" />
                </MultiDataTrigger.Conditions>
                <Setter Property="ImageSourceNoPreload"
                        Value="/ForzaUI;component/Textures/Data_Bound/ActivityPanel/Mixed_Surface_Circuit.png" />
            </MultiDataTrigger>
            <MultiDataTrigger>
                <MultiDataTrigger.Conditions>
                    <Condition Binding="{Binding ActivityType}" Value="{x:Type local:EventNotificationActivity}" />
                    <Condition Binding="{Binding RibbonConfig}" Value="{x:Static local:XAMLRibbonConfig.P2P}" />
                    <Condition Binding="{Binding InfluenceThread}" Value="mixed_surface_series" />
                </MultiDataTrigger.Conditions>
                <Setter Property="ImageSourceNoPreload"
                        Value="/ForzaUI;component/Textures/Data_Bound/ActivityPanel/Mixed_Surface_Sprint.png" />
            </MultiDataTrigger>
            <DataTrigger Binding="{Binding UIRacificationMode}" Value="{x:Static local:UIRacificationMode.Infected}">
                <Setter Property="ImageSourceNoPreload"
                        Value="/ForzaUI;component/Textures/Data_Bound/ActivityPanel/Infected.png" />
            </DataTrigger>
            <DataTrigger Binding="{Binding UIRacificationMode}" Value="{x:Static local:UIRacificationMode.King}">
                <Setter Property="ImageSourceNoPreload"
                        Value="/ForzaUI;component/Textures/Data_Bound/ActivityPanel/King.png" />
            </DataTrigger>
            <DataTrigger Binding="{Binding UIRacificationMode}" Value="{x:Static local:UIRacificationMode.FlagRush}">
                <Setter Property="ImageSourceNoPreload"
                        Value="/ForzaUI;component/Textures/Data_Bound/ActivityPanel/Flag_Rush.png" />
            </DataTrigger>
            <DataTrigger Binding="{Binding UIRacificationMode}" Value="{x:Static local:UIRacificationMode.TeamInfected}">
                <Setter Property="ImageSourceNoPreload"
                        Value="/ForzaUI;component/Textures/Data_Bound/ActivityPanel/Survival.png" />
            </DataTrigger>
            <DataTrigger Binding="{Binding UIRacificationMode}" Value="{x:Static local:UIRacificationMode.TeamKing}">
                <Setter Property="ImageSourceNoPreload"
                        Value="/ForzaUI;component/Textures/Data_Bound/ActivityPanel/Team_King.png" />
            </DataTrigger>
            <DataTrigger Binding="{Binding UIRacificationMode}" Value="{x:Static local:UIRacificationMode.TeamFlagRush}">
                <Setter Property="ImageSourceNoPreload"
                        Value="/ForzaUI;component/Textures/Data_Bound/ActivityPanel/Team_Flag_Rush.png" />
            </DataTrigger>
            <DataTrigger Binding="{Binding UIRacificationMode}" Value="{x:Static local:UIRacificationMode.CoopShowcase}">
                <Setter Property="ImageSourceNoPreload"
                        Value="/ForzaUI;component/Textures/Data_Bound/ActivityPanel/Showcase.png" />
            </DataTrigger>
            <DataTrigger Binding="{Binding InfluenceThread}" Value="drag_racing">
                <Setter Property="ImageSourceNoPreload"
                        Value="/ForzaUI;component/Textures/Data_Bound/ActivityPanel/Drag_Race.png" />
            </DataTrigger>
            <DataTrigger Binding="{Binding InfluenceThread}" Value="street_racing_series">
                <Setter Property="ImageSourceNoPreload"
                        Value="/ForzaUI;component/Textures/Data_Bound/ActivityPanel/Street_Race.png" />
            </DataTrigger>
            <DataTrigger Binding="{Binding ActivityType}"
                         Value="{x:Type local:JoinSessionActivity}">
                <Setter Property="ImageSourceNoPreload"
                        Value="/ForzaUI;component/Textures/Data_Bound/ActivityPanel/Session.png" />
            </DataTrigger>
            <DataTrigger Binding="{Binding ActivityType}"
                         Value="{x:Type local:HorizonStoriesInvitationActivity}">
                <Setter Property="ImageSourceNoPreload"
                        Value="{Binding StoryId, Converter={StaticResource A_Converter_StoryIdToIcon}}" />
            </DataTrigger>
        </Style.Triggers>
    </Style>

    <local:FZMaterialPresetRoundtangle x:Key="A_Preset_FZMaterial_Preset_Showcase_Gradient" BasedOn="{StaticResource A_FZMaterialPresetRoundtangle_FlatPanel_InnerAll}"
        GradientAngle="90"
        GradientColorA="{StaticResource A_Color_ShowcaseGradientA}"
        GradientColorB="{StaticResource A_Color_ShowcaseGradientB}"/>

    <Style x:Key="A_Style_FZMaterial_ActivityIconBackground"
           TargetType="local:FZMaterial">
        <Setter Property="Preset" Value="{StaticResource A_FZMaterialPresetRoundtangle_FlatPanel_InnerAll}"/>
        <Style.Triggers>
            <DataTrigger Binding="{Binding ActivityType}"
                         Value="{x:Type local:EventNotificationActivity}">
                <Setter Property="Color"
                        Value="{Binding InfluenceThread, Converter={StaticResource A_Converter_ThreadToActivityIconBackgroundColor}}" />
            </DataTrigger>
            <DataTrigger Binding="{Binding ActivityType}"
                         Value="{x:Type local:JoinSessionActivity}">
                <Setter Property="Color"
                        Value="#00A888" />
            </DataTrigger>
            <DataTrigger Binding="{Binding ActivityType}"
                         Value="{x:Type local:HorizonStoriesInvitationActivity}">
                <Setter Property="Color"
                        Value="#FFB000" />
            </DataTrigger>
            <DataTrigger Binding="{Binding UIRacificationMode}" Value="{x:Static local:UIRacificationMode.CoopShowcase}">
                <Setter Property="Preset" Value="{StaticResource A_Preset_FZMaterial_Preset_Showcase_Gradient}" />
            </DataTrigger>
        </Style.Triggers>
    </Style>

    <DataTemplate x:Key="A_DataTemplate_Activity_Indicator">
        <local:FZMaterial Style="{StaticResource A_Style_FZMaterial_ActivityIconBackground}"
                          Width="50"
                          Height="50"
                          Margin="0,3">
            <local:FZMaterial Style="{StaticResource A_Style_FZMaterial_ActivityIcon}"
                              Width="50"
                              Height="50" />
        </local:FZMaterial>
    </DataTemplate>

    <System:Double x:Key="A_Double_ActivityPanelItemHeight">104</System:Double>

    <Style x:Key="A_Style_ActivityNotificationBreadCrumb" TargetType="local:FZMaterial">
        <Setter Property="Width" Value="27"/>
        <Setter Property="Height" Value="27"/>
        <Setter Property="ImageSourceNoPreload" Value="/ForzaUI;component/Textures/Anthem/Icons/TiledMenus/NotificationBadges/Badge_IconTile_Breadcrumb.png"/>
        <Setter Property="Stretch" Value="None"/>
        <Setter Property="Visibility" Value="{Binding TimeRemaining, Converter={StaticResource A_StringVisConverter}}"/>
        <Style.Triggers>
            <DataTrigger Binding="{Binding IsActivityTimingOut}" Value="False">
                <Setter Property="Visibility" Value="Collapsed"/>
            </DataTrigger>
        </Style.Triggers>
    </Style>
    
    <ControlTemplate x:Key="A_Template_ActivityPanel_Item"
                     TargetType="ContentControl">
        <local:FZMaterial Color="#00FFFFFF">
            <Grid>
                <DockPanel>
                    <Grid DockPanel.Dock="Left">
                        <local:FZMaterial ImageSource="{Binding Creator, Converter={StaticResource A_GamerPicConverter}}"
                                          Preset="{StaticResource A_FZMaterialPresetRoundtangle_FlatPanel_OuterLeftOnly}"
                                          Height="98"
                                          Width="98" />
                        <local:FZMaterial Style="{StaticResource A_Style_ActivityNotificationBreadCrumb}"
                                          HorizontalAlignment="Right"
                                          VerticalAlignment="Bottom"
                                          Margin="12">
                            <local:FZTextBlock Text="{Binding TimeRemaining}"
                                               Style="{StaticResource A_Style_FZTextBlock_HorizonA}"
                                               Color="{StaticResource A_Color_NotificationBadge_Text}"
                                               HorizontalAlignment="Center"
                                               VerticalAlignment="Center"
                                               CapHeight="15"
                                               Margin="5" />
                        </local:FZMaterial>
                        <local:FZMaterial HorizontalAlignment="Left"
                                          VerticalAlignment="Bottom"
                                          Color="#00B08E"
                                          Preset="{StaticResource A_FZMaterialPresetRoundtangle_FlatPanel_InnerAll}"
                                          Visibility="{Binding IsAuthorInConvoy, Converter={StaticResource A_FZBooleanToVisibilityConverter}, FallbackValue=Collapsed}"
                                          Width="25"
                                          Height="25"
                                          Margin="7">
                            <local:FZMaterial ImageSource="/ForzaUI;component/Textures/Data_Bound/ActivityPanel/ConvoyIcon.png"
                                              HorizontalAlignment="Center"
                                              VerticalAlignment="Center"
                                              Width="28"
                                              Height="25"
                                              Margin="2,0,0,0" />
                        </local:FZMaterial>
                    </Grid>
                    <local:FZMaterial Style="{StaticResource A_Style_FZMaterial_ActivityIconBackground}"
                                      Width="80"
                                      Height="80"
                                      DockPanel.Dock="Right"
                                      Margin="8">
                        <local:FZMaterial Style="{StaticResource A_Style_FZMaterial_ActivityIcon}"
                                          Width="80"
                                          Height="80" />
                    </local:FZMaterial>
                    <DockPanel VerticalAlignment="Center"
                               Margin="14,8">
                        <StackPanel Orientation="Horizontal"
                                    DockPanel.Dock="Top">
                            <local:FZTextBlock Text="{Binding Creator.FormattedClubTag}"
                                               Style="{StaticResource A_Style_FZTextBlock_HorizonA}"
                                               Color="{StaticResource A_Color_ActivityPanel_Heading}"
                                               CapHeight="16"
                                               Margin="0,0,5,0" />
                            <local:FZTextBlock Text="{Binding Creator.FormattedGamertag}"
                                               Style="{StaticResource A_Style_FZTextBlock_HorizonA}"
                                               Color="{StaticResource A_Color_ActivityPanel_Heading}"
                                               CapHeight="16" />
                        </StackPanel>
                        <Decorator DockPanel.Dock="Top" Height="8" />
                        <ContentPresenter DockPanel.Dock="Bottom" />
                        <local:FZTextBlock Text="{Binding Description}"
                                           Style="{DynamicResource A_Style_ActivityDescription_Dynamic}"
                                           FontFamily="Horizon_A"
                                           FontSize="{StaticResource A_Double_FontSize_Minimum}"
                                           LineAdjust="{StaticResource A_Double_LineAdjust_HorizonA}"
                                           Preset="{StaticResource A_FZMaterialPreset_Glossy}"
                                           Color="{StaticResource A_Color_MapPinDescription}"
                                           CapHeight="14" />
                    </DockPanel>
                </DockPanel>
                <Decorator VerticalAlignment="Bottom"
                           Height="38"
                           Margin="0,0,0,-38"
                           Visibility="{Binding (Selector.IsSelected), RelativeSource={RelativeSource AncestorType=ListBoxItem}, Converter={StaticResource A_FZBooleanToVisibilityConverter}}">
                    <StackPanel Orientation="Horizontal" local:ZPanel.DisableClipping="True"
                                HorizontalAlignment="Center"
                                VerticalAlignment="Center">
                        <local:ControllerButtonControl Button="A" Visibility="Visible" MaxHeight="23" VerticalAlignment="Center" Margin="0" />
                        <Decorator Width="5" />
                        <local:FZTextBlock Text="{local:Loc Map.IDS_ActivityPanel_JoinEvent}" Color="#FFFFFF" CapHeight="14" VerticalAlignment="Center" />
                        <Decorator Width="30" />
                        <local:ControllerButtonControl Button="X" Visibility="Visible" MaxHeight="23" VerticalAlignment="Center" Margin="0" />
                        <Decorator Width="5" />
                        <local:FZTextBlock Text="{local:Loc Map.IDS_ActivityPanel_ViewPlayer}" Color="#FFFFFF" CapHeight="14" VerticalAlignment="Center" />
                    </StackPanel>
                </Decorator>
            </Grid>
        </local:FZMaterial>
    </ControlTemplate>

    <Style x:Key="A_Style_Control_CarClassEventActivity"
           TargetType="Control"
           BasedOn="{StaticResource A_Style_Control_AdvancedCarRestrictions_Leaderboard}">
           <Setter Property="Visibility" Value="{Binding XAMLCarRestrictions.HasCarClassOrPIRestriction, FallbackValue=Collapsed, Converter={StaticResource A_FZBooleanToVisibilityConverter}}"/>
    </Style>

    <DataTemplate DataType="{x:Type local:EventNotificationActivity}">
        <ContentControl Template="{StaticResource A_Template_ActivityPanel_Item}">
            <Control Style="{StaticResource A_Style_Control_CarClassEventActivity}"
                     local:BindingProxy.A="{Binding XAMLCarRestrictions.CarPIMaxRestriction}"
                     local:BindingProxy.B="{Binding XAMLCarRestrictions.CarClassRestriction}"
                     local:BindingProxy.C="{Binding XAMLCarRestrictions.CarPIMinRestriction}"
                     HorizontalAlignment="Left"
                     Margin="0,8,0,0"
                     Height="29" />
        </ContentControl>
    </DataTemplate>

    <DataTemplate DataType="{x:Type local:JoinSessionActivity}">
        <ContentControl Template="{StaticResource A_Template_ActivityPanel_Item}" />
    </DataTemplate>

    <DataTemplate DataType="{x:Type local:HorizonStoriesInvitationActivity}">
        <DataTemplate.Resources>
            <Style x:Key="A_Style_ActivityDescription_Dynamic"
                   TargetType="local:FZTextBlock">
                <Setter Property="TextWrapping"
                        Value="Wrap" />
            </Style>
        </DataTemplate.Resources>
        <ContentControl Template="{StaticResource A_Template_ActivityPanel_Item}" />
    </DataTemplate>

    <local:LinearTransformConverter x:Key="A_Converter_ActivityCountToLeftOver"
                                    Add="-12" />

    <Style x:Key="A_Style_ContentControl_ActivityPanelItem_ContainerStyle"
           BasedOn="{StaticResource A_Style_ContentControl_Carousel_ContainerStyle_SelectOnMouseHover}"
           TargetType="ContentControl">
        <Style.Resources>
            <Style x:Key="A_Style_FrameworkElement_CarouselSelectionScale_Dynamic"
                   TargetType="FrameworkElement">
                <Setter Property="RenderTransform">
                    <Setter.Value>
                        <ScaleTransform />
                    </Setter.Value>
                </Setter>
                <Style.Triggers>
                    <DataTrigger Binding="{Binding (Selector.IsSelected), RelativeSource={RelativeSource AncestorType=ListBoxItem}}"
                                 Value="True">
                        <DataTrigger.EnterActions>
                            <BeginStoryboard>
                                <Storyboard>
                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.RenderTransform).(ScaleTransform.ScaleX)">
                                        <DiscreteDoubleKeyFrame KeyTime="0:0:0.0"
                                                                Value="1.05" />
                                    </DoubleAnimationUsingKeyFrames>
                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.RenderTransform).(ScaleTransform.ScaleY)">
                                        <DiscreteDoubleKeyFrame KeyTime="0:0:0.0"
                                                                Value="1.05" />
                                    </DoubleAnimationUsingKeyFrames>
                                </Storyboard>
                            </BeginStoryboard>
                        </DataTrigger.EnterActions>
                        <DataTrigger.ExitActions>
                            <BeginStoryboard>
                                <Storyboard>
                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.RenderTransform).(ScaleTransform.ScaleX)">
                                        <EasingDoubleKeyFrame KeyTime="0:0:0.1"
                                                              Value="1.0"
                                                              EasingFunction="{local:CircleEasing}" />
                                    </DoubleAnimationUsingKeyFrames>
                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.RenderTransform).(ScaleTransform.ScaleY)">
                                        <EasingDoubleKeyFrame KeyTime="0:0:0.1"
                                                              Value="1.0"
                                                              EasingFunction="{local:CircleEasing}" />
                                    </DoubleAnimationUsingKeyFrames>
                                </Storyboard>
                            </BeginStoryboard>
                        </DataTrigger.ExitActions>
                    </DataTrigger>
                </Style.Triggers>
            </Style>
            <local:FZMaterialPresetRoundtangleStroke x:Key="A_FZMaterialPresetRoundtangleStroke_CarouselContainerHighlight"
                                                     BasedOn="{StaticResource A_FZMaterialPresetRoundtangleStroke_Rollover}"
                                                     CornerRadius="14"
                                                     Thickness="8,8,8,48" />
            <Style x:Key="A_FZMaterial_CarouselContainerHighlight_Dynamic"
                   TargetType="{x:Type local:FZMaterial}">
                <Setter Property="GreedyMeasure" Value="True" />
                <Setter Property="Margin" Value="-6,-6,-6,-38" />
                <Setter Property="local:ZPanel.DisableClipping" Value="True" />
                <Setter Property="IsHitTestVisible" Value="False" />
                <Setter Property="Preset" Value="{StaticResource A_FZMaterialPresetRoundtangleStroke_CarouselContainerHighlight}" />
            </Style>
        </Style.Resources>
    </Style>

    <Style x:Key="A_Style_WrapListBox_ActivityPanelItems"
           TargetType="local:WrapListBox">
        <Style.Resources>
            <Style x:Key="A_Style_Control_Carousel_EmptyItemStyle_Dynamic"
                   BasedOn="{StaticResource A_Style_Control_Carousel_EmptyItemStyle_Empty}"
                   TargetType="Control" />
        </Style.Resources>
        <Setter Property="Template" Value="{StaticResource A_ControlTemplate_Carousel_Default}" />
        <Setter Property="ScrollOrientation" Value="Vertical" />
        <Setter Property="WrapSelection" Value="False" />
        <Setter Property="ItemWidth" Value="489" />
        <Setter Property="ItemHeight" Value="{StaticResource A_Double_ActivityPanelItemHeight}" />
        <Setter Property="Width" Value="489" />
        <Setter Property="MaxHeight" Value="832" />
        <Setter Property="PageSize" Value="1" />
        <Setter Property="SelectionLimitTop" Value="0" />
        <Setter Property="SelectionLimitBottom" Value="0" />
        <Setter Property="ItemContainerStyle" Value="{StaticResource A_Style_ContentControl_ActivityPanelItem_ContainerStyle}" />
        <Setter Property="ItemsSource" Value="{Binding CollectionView}" />
        <Setter Property="SelectedItem" Value="{Binding SelectedItem}" />
        <Setter Property="local:FocusSelf.WhenTrue" Value="{Binding IsActive}" />
        <Setter Property="DockPanel.Dock" Value="Left" />
        <Setter Property="Margin" Value="0,3,0,0" />
    </Style>

    <local:MappingConverter x:Key="A_Converter_ItemTypeToFlyerVisibility"
                            Default="Collapsed">
        <local:MappingConverterEntry Key="{x:Type local:EventNotificationActivity}" Value="Visible" />
    </local:MappingConverter>

    <local:MappingConverter x:Key="A_Converter_PlusItemsColor"
                            Default="#969696">
        <local:MappingConverterEntry Key="False" Value="#000000" />
    </local:MappingConverter>

    <local:MultiConverter x:Key="A_Converter_CountToLeftOverValue">
        <local:MultiConverterEntry Converter="{StaticResource A_Converter_ActivityCountToLeftOver}" />
        <local:MultiConverterEntry Converter="{StaticResource A_NumUnitConverter_ShowUnit_0dp_Positive}" />
    </local:MultiConverter>

    <local:MultiConverter x:Key="A_Converter_CountToOpacity">
        <local:MultiConverterEntry Converter="{StaticResource A_CompareConverter}" Parameter="0" />
        <local:MultiConverterEntry Converter="{StaticResource A_Converter_GreaterThanToOpacity}" />
    </local:MultiConverter>

    <local:MultiConverter x:Key="A_Converter_ActivityCountToVisibility">
        <local:MultiConverterEntry Converter="{StaticResource A_CompareConverter}" Parameter="0" />
        <local:MultiConverterEntry Converter="{StaticResource A_Converter_GreaterThanToVisible}" />
    </local:MultiConverter>
    
    <local:MultiConverter x:Key="A_Converter_ActivityCountToLeftOverVisibility">
        <local:MultiConverterEntry Converter="{StaticResource A_CompareConverter}" Parameter="12" />
        <local:MultiConverterEntry Converter="{StaticResource A_Converter_GreaterThanToVisible}" />
    </local:MultiConverter>

    <local:MultiConverter x:Key="A_Converter_ActivityScrollBarCountToVisibility">
        <local:MultiConverterEntry Converter="{StaticResource A_CompareConverter}" Parameter="8" />
        <local:MultiConverterEntry Converter="{StaticResource A_Converter_GreaterThanToVisible}" />
    </local:MultiConverter>

    <local:MappingConverter x:Key="A_Converter_ActivityPanelHeaderBackgroundPreset">
        <local:MappingConverterEntry Key="True" Value="{StaticResource A_FZMaterialPresetRoundtangle_GradientHightlight_InnerTopOnly}" />
        <local:MappingConverterEntry Key="False" Value="{StaticResource A_FZMaterialPresetRoundtangle_FlatPanel_InnerTopOnly}" />
    </local:MappingConverter>
    <local:MappingConverter x:Key="A_Converter_ActivityPanelHeaderBackgroundColor">
        <local:MappingConverterEntry Key="True" Value="#FFFFFFFF" />
        <local:MappingConverterEntry Key="False" Value="#4DFFFFFF" />
    </local:MappingConverter>

    <Color x:Key="A_Color_Event_Active">#FF00B592</Color>
    <local:FZMaterialPresetRoundtangle x:Key="A_FZMaterialPreset_BreadCrumb"
                                           BasedOn="{StaticResource A_FZMaterialPreset_FlatPanel_Base}"
                                           CornerRadius="15" />
    <Style x:Key="A_Style_FZMaterial_ActivityBreadCrumb" TargetType="local:FZMaterial">
        <Setter Property="Width" Value="30"/>
        <Setter Property="Height" Value="30"/>
        <Setter Property="Color" Value="{StaticResource A_Color_Event_Active}"/>
        <Setter Property="Preset" Value="{StaticResource A_FZMaterialPreset_BreadCrumb}"/>
    </Style>

    <CornerRadius x:Key="A_CornerRadius_ActivityPanel">8,8,24,24</CornerRadius>
    <local:FZMaterialPresetGlassRoundtangle x:Key="A_FZMaterialPresetGlassRoundtangle_GlassPanel_Activity_Material"
                                                    BasedOn="{StaticResource A_FZMaterialPreset_FlatPanel_Base}"
                                                    CornerRadius="{StaticResource A_CornerRadius_ActivityPanel}"
                                                    BlurAmount="Medium"/>

    <local:FZMaterialPresetRoundtangleStroke x:Key="A_FZMaterialPresetRoundtangleStroke_ActivityStroke"
                                                    BasedOn="{StaticResource A_FZMaterialPresetRoundtangle_FlatPanel_OuterAll}"
                                                    CornerRadius="{StaticResource A_CornerRadius_ActivityPanel}"
                                                    Thickness="3"/>

    
    <local:FZMaterialPresetGlassRoundtangle x:Key="A_FZMaterialPresetGlassRoundtangle_GlassPanel_Activity_OuterAll"
        BasedOn="{StaticResource A_FZMaterialPresetGlassRoundtangle_GlassPanel_Base}"
        CornerRadius="12,12,28,28"/>

    <Style x:Key="A_Style_FZMaterial_RoundtangleStroke_ActivityPanel_Outline"
                   TargetType="{x:Type local:FZMaterial}"
                   BasedOn="{StaticResource A_Style_FZMaterial_FlatPanel_Base}">
        <Setter Property="Preset" Value="{StaticResource A_FZMaterialPresetRoundtangleStroke_ActivityStroke}"/>
        <Setter Property="Color" Value="{StaticResource A_Color_GlassPanel_Interactive}"/>
    </Style>

    <Style x:Key="A_Style_FZMaterial_GlassPanel_ActivityPanel"
                   TargetType="{x:Type local:FZMaterial}"
                   BasedOn="{StaticResource A_Style_FZMaterial_FlatPanel_Base}">
        <Setter Property="Preset" Value="{StaticResource A_FZMaterialPresetGlassRoundtangle_GlassPanel_Activity_Material}"/>
        <Setter Property="Color" Value="{StaticResource A_Color_GlassPanel_NonInteractive}"/>
    </Style>
    <Style x:Key="A_Style_FZMaterial_GlassPanel_ActivityPanel_Container"
                   TargetType="{x:Type local:FZMaterial}"
                   BasedOn="{StaticResource A_Style_FZMaterial_FlatPanel_Base}">
        <Setter Property="Preset" Value="{StaticResource A_FZMaterialPresetGlassRoundtangle_GlassPanel_Activity_OuterAll}"/>
        <Setter Property="Color" Value="{StaticResource A_Color_GlassPanel_NonInteractive}"/>
    </Style>

    <ControlTemplate x:Key="A_Template_ActivityPanel"
                     TargetType="Control">
        <DockPanel VerticalAlignment="Top">
            <StackPanel DockPanel.Dock="Left">
                <local:FZMaterial Style="{StaticResource A_Style_FZMaterial_GlassPanel_ActivityPanel_Container}"
                              HorizontalAlignment="Left"
                              Height="Auto"
                              VerticalAlignment="Top">
                    <Decorator Opacity="{Binding CollectionView.Count, Converter={StaticResource A_Converter_CountToOpacity}}"
                           Margin="6,6,6,6"
                           Width="48">
                        <DockPanel DockPanel.Dock="Top">
                            <Grid>
                                <local:FZMaterial Width="48" Height="80" 
                                          Style="{StaticResource A_Style_FZMaterial_GlassPanel_ActivityPanel}">
                                    <DockPanel MaxWidth="48" MaxHeight="80" VerticalAlignment="Center" Margin="0,-2,0,0">
                                        <Grid DockPanel.Dock="Bottom"
                                          Height="32"
                                          Width="32"
                                          HorizontalAlignment="Center"
                                          VerticalAlignment="Bottom"
                                          Margin="0,0,0,6">
                                            <local:FZMaterial x:Name="EventCountBreadCrumb" Style="{StaticResource A_Style_FZMaterial_ActivityBreadCrumb}"
                                                          RenderTransformOrigin="0.5,0.5"/>
                                            <local:FZTextBlock Text="{Binding CollectionView.Count, Converter={StaticResource A_NumUnitConverter_NoUnit_0dp}}"
                                                           Style="{StaticResource A_Style_FZTextBlock_HorizonA}"
                                                           Color="{StaticResource A_Color_NotificationBadge_Text}"
                                                           FontSize="19"
                                                           HorizontalAlignment="Center"
                                                           VerticalAlignment="Center"/>
                                        </Grid>
                                        <local:ControllerButtonControl Button="LBumper"
                                                           Description="{x:Null}"
                                                           Visibility="Visible"
                                                           UseLargeIcon="True"
                                                           Margin="6,6,6,2" Height="32"
                                                           HorizontalAlignment="Center"
                                                           VerticalAlignment="Center" />
                                    </DockPanel>
                                </local:FZMaterial>
                                <local:FZMaterial Style="{StaticResource A_Style_FZMaterial_RoundtangleStroke_ActivityPanel_Outline}" IsHitTestVisible="False"/>
                            </Grid>
                        </DockPanel>
                    </Decorator>
                </local:FZMaterial>
                <Decorator Height="10"/>
                <local:FZMaterial Style="{StaticResource A_Style_FZMaterial_GlassPanel_Pill}"
                              DockPanel.Dock="Left"
                              Height="Auto"
                              Visibility="{Binding CollectionView.Count, Converter={StaticResource A_Converter_ActivityCountToVisibility}}"
                              VerticalAlignment="Top">
                    <DockPanel DockPanel.Dock="Top" Opacity="{Binding IsActive, Converter={StaticResource A_Converter_ActvityPanelStatusToOpacity}}"
                               LastChildFill="False">
                        <Decorator ClipToBounds="True"
                                   MaxHeight="678"
                                   DockPanel.Dock="Top">
                            <ItemsControl ItemsSource="{Binding CollectionView}"
                                          ItemTemplate="{StaticResource A_DataTemplate_Activity_Indicator}"
                                          Margin="0,3"
                                          Focusable="False" />
                        </Decorator>
                        <local:FZMaterial Color="#FFFFFF"
                                          Preset="{StaticResource A_FZMaterialPresetRoundtangle_FlatPanel_InnerAll}"
                                          Width="50"
                                          Height="49"
                                          DockPanel.Dock="Top"
                                          Margin="0,0,0,6"
                                          Visibility="{Binding CollectionView.Count, Converter={StaticResource A_Converter_ActivityCountToLeftOverVisibility}}">
                            <local:FZMaterial Style="{StaticResource A_Style_FZMaterial_TitleShadow}">
                                <local:FZTextBlock Color="{Binding IsActive, Converter={StaticResource A_Converter_PlusItemsColor}}"
                                                   CapHeight="22"
                                                   HorizontalAlignment="Center"
                                                   VerticalAlignment="Center"
                                                   Text="{Binding CollectionView.Count, Converter={StaticResource A_Converter_CountToLeftOverValue}}" />
                            </local:FZMaterial>
                        </local:FZMaterial>
                    </DockPanel>
                </local:FZMaterial>
            </StackPanel>

            <Decorator Width="25" DockPanel.Dock="Left" />
            <DockPanel DockPanel.Dock="Left"
                       HorizontalAlignment="Left"
                       Visibility="{Binding IsActive, Converter={StaticResource A_FZBooleanToVisibilityConverter}}">
                <ScrollBar Style="{StaticResource A_Style_ScrollBar_Default}"
                           Minimum="{Binding ScrollWindowMin, ElementName=PART_MainItemsList}"
                           Maximum="{Binding ScrollWindowMax, ElementName=PART_MainItemsList}"
                           Value="{Binding ScrollWindowValue, ElementName=PART_MainItemsList, Mode=TwoWay}"
                           ViewportSize="{Binding ScrollWindowSize, ElementName=PART_MainItemsList}"
                           Margin="10,0,0,0"
                           Visibility="{Binding CollectionView.Count, Converter={StaticResource A_Converter_ActivityScrollBarCountToVisibility}}"
                           DockPanel.Dock="Right" />
                <local:WrapListBox x:Name="PART_MainItemsList"
                                   Style="{StaticResource A_Style_WrapListBox_ActivityPanelItems}" />
            </DockPanel>
            <Decorator Width="30" DockPanel.Dock="Left" />
            <Decorator DockPanel.Dock="Left"
                       IsHitTestVisible="False"
                       HorizontalAlignment="Left"
                       VerticalAlignment="Top"
                       Visibility="{Binding IsActive, Converter={StaticResource A_FZBooleanToVisibilityConverter}}">
                <Decorator Visibility="{Binding SelectedItem.HideFlyer, Converter={StaticResource A_FZBooleanToVisibilityConverter_Inverse}, FallbackValue=Visible}">
                    <Decorator Visibility="{Binding SelectedItem.ActivityType, Converter={StaticResource A_Converter_ItemTypeToFlyerVisibility}, FallbackValue=Collapsed}">
                        <ContentControl DataContext="{Binding SelectedItem.CampaignSetupItem}"
                                        Style="{StaticResource A_Style_Control_CampaignFlyer}" />
                    </Decorator>
                </Decorator>
            </Decorator>
        </DockPanel>
        <ControlTemplate.Triggers>
            <DataTrigger Binding="{Binding IsActive}" Value="True">
                <Setter Property="FocusManager.FocusedElement"
                        Value="{Binding ElementName=PART_MainItemsList}" />
            </DataTrigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>

    <Style x:Key="A_Style_Control_ActivityPanel"
           TargetType="Control">
        <Setter Property="Template" Value="{StaticResource A_Template_ActivityPanel}" />
        <Setter Property="Focusable" Value="False" />
        <Style.Triggers>
            <DataTrigger Binding="{Binding IsUIFlowMapContext, RelativeSource={RelativeSource FindAncestor, AncestorType=Page}}"
                        Value="True">
                <Setter Property="Visibility"
                    Value="{x:Static Visibility.Collapsed}" />
            </DataTrigger>
        </Style.Triggers>
    </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>

    <Style x:Key="A_Style_FZTextBlock_MapFloatingPanelTitle"
           BasedOn="{StaticResource A_Style_FZTextBlock_HorizonA}"
           TargetType="{x:Type local:FZTextBlock}">
        <Setter Property="Color" Value="#FFFFFF" />
        <Setter Property="CapHeight" Value="18" />
        <Setter Property="HorizontalAlignment" Value="Center" />
        <Setter Property="VerticalAlignment" Value="Center" />
    </Style>

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

    <Double x:Key="A_Double_BrickChallengePanelWidth">342</Double>

    <local:MappingConverter x:Key="A_Converter_ExpansionTwo_ObjectiveTypeIdToMapPanelImageSource"
        Default="">
        <local:MappingConverterEntry Key="HouseUpgrade1" Value="/ForzaUI;component/Textures/Data_Bound/PDLC2/Objectives/Reward_Panel/HouseUpgrade1.png"/>
        <local:MappingConverterEntry Key="HouseUpgrade2" Value="/ForzaUI;component/Textures/Data_Bound/PDLC2/Objectives/Reward_Panel/HouseUpgrade2.png"/>
        <local:MappingConverterEntry Key="HouseUpgrade3" Value="/ForzaUI;component/Textures/Data_Bound/PDLC2/Objectives/Reward_Panel/HouseUpgrade3.png"/>
        <local:MappingConverterEntry Key="HouseUpgrade4" Value="/ForzaUI;component/Textures/Data_Bound/PDLC2/Objectives/Reward_Panel/HouseUpgrade4.png"/>
        <local:MappingConverterEntry Key="HouseUpgrade5" Value="/ForzaUI;component/Textures/Data_Bound/PDLC2/Objectives/Reward_Panel/HouseUpgrade5.png"/>
        <local:MappingConverterEntry Key="HouseUpgrade6" Value="/ForzaUI;component/Textures/Data_Bound/PDLC2/Objectives/Reward_Panel/HouseUpgrade6.png"/>
        <local:MappingConverterEntry Key="HouseUpgrade7" Value="/ForzaUI;component/Textures/Data_Bound/PDLC2/Objectives/Reward_Panel/HouseUpgrade7.png"/>
        <local:MappingConverterEntry Key="HouseUpgrade8" Value="/ForzaUI;component/Textures/Data_Bound/PDLC2/Objectives/Reward_Panel/HouseUpgrade8.png"/>
        <local:MappingConverterEntry Key="HouseUpgrade9" Value="/ForzaUI;component/Textures/Data_Bound/PDLC2/Objectives/Reward_Panel/HouseUpgrade9.png"/>
        <local:MappingConverterEntry Key="HouseUpgrade10" Value="/ForzaUI;component/Textures/Data_Bound/PDLC2/Objectives/Reward_Panel/HouseUpgrade10.png"/>
        <local:MappingConverterEntry Key="HouseUpgrade11" Value="/ForzaUI;component/Textures/Data_Bound/PDLC2/Objectives/Reward_Panel/HouseUpgrade11.png"/>
        <local:MappingConverterEntry Key="HouseUpgrade12" Value="/ForzaUI;component/Textures/Data_Bound/PDLC2/Objectives/Reward_Panel/HouseUpgrade12.png"/>
        <local:MappingConverterEntry Key="HouseUpgrade13" Value="/ForzaUI;component/Textures/Data_Bound/PDLC2/Objectives/Reward_Panel/HouseUpgrade13.png"/>
        <local:MappingConverterEntry Key="SpeedChampions1" Value="/ForzaUI;component/Textures/Data_Bound/PDLC2/Objectives/Reward_Panel/SpeedChampions1.png"/>
        <local:MappingConverterEntry Key="SpeedChampions2" Value="/ForzaUI;component/Textures/Data_Bound/PDLC2/Objectives/Reward_Panel/SpeedChampions2.png"/>
        <local:MappingConverterEntry Key="SpeedChampions3" Value="/ForzaUI;component/Textures/Data_Bound/PDLC2/Objectives/Reward_Panel/SpeedChampions3.png"/>
        <local:MappingConverterEntry Key="SpeedChampions4" Value="/ForzaUI;component/Textures/Data_Bound/PDLC2/Objectives/Reward_Panel/SpeedChampions4.png"/>
    </local:MappingConverter>

    <local:MappingConverter x:Key="A_Converter_ExpansionTwo_ObjectiveTypeIdToImageHeight"
                            Default="167">
        <local:MappingConverterEntry Key="HouseUpgrade1" Value="275"/>
        <local:MappingConverterEntry Key="HouseUpgrade2" Value="275"/>
        <local:MappingConverterEntry Key="HouseUpgrade3" Value="275"/>
        <local:MappingConverterEntry Key="HouseUpgrade4" Value="275"/>
        <local:MappingConverterEntry Key="HouseUpgrade5" Value="275"/>
        <local:MappingConverterEntry Key="HouseUpgrade6" Value="240"/>
        <local:MappingConverterEntry Key="HouseUpgrade7" Value="240"/>
        <local:MappingConverterEntry Key="HouseUpgrade8" Value="240"/>
        <local:MappingConverterEntry Key="HouseUpgrade9" Value="309"/>
        <local:MappingConverterEntry Key="HouseUpgrade10" Value="275"/>
        <local:MappingConverterEntry Key="HouseUpgrade11" Value="275"/>
        <local:MappingConverterEntry Key="HouseUpgrade12" Value="275"/>
        <local:MappingConverterEntry Key="HouseUpgrade13" Value="275"/>
        <local:MappingConverterEntry Key="SpeedChampions1" Value="206"/>
        <local:MappingConverterEntry Key="SpeedChampions2" Value="206"/>
        <local:MappingConverterEntry Key="SpeedChampions3" Value="206"/>
        <local:MappingConverterEntry Key="SpeedChampions4" Value="206"/>
    </local:MappingConverter>

    <local:MappingConverter x:Key="A_Converter_ExpansionTwo_ObjectiveTypeIdToImageWidth"
                            Default="342">
        <local:MappingConverterEntry Key="HouseUpgrade1" Value="342"/>
        <local:MappingConverterEntry Key="HouseUpgrade2" Value="342"/>
        <local:MappingConverterEntry Key="HouseUpgrade3" Value="342"/>
        <local:MappingConverterEntry Key="HouseUpgrade4" Value="342"/>
        <local:MappingConverterEntry Key="HouseUpgrade5" Value="342"/>
        <local:MappingConverterEntry Key="HouseUpgrade6" Value="342"/>
        <local:MappingConverterEntry Key="HouseUpgrade7" Value="342"/>
        <local:MappingConverterEntry Key="HouseUpgrade8" Value="342"/>
        <local:MappingConverterEntry Key="HouseUpgrade9" Value="342"/>
        <local:MappingConverterEntry Key="HouseUpgrade10" Value="342"/>
        <local:MappingConverterEntry Key="HouseUpgrade11" Value="342"/>
        <local:MappingConverterEntry Key="HouseUpgrade12" Value="342"/>
        <local:MappingConverterEntry Key="HouseUpgrade13" Value="342"/>
        <local:MappingConverterEntry Key="SpeedChampions1" Value="342"/>
        <local:MappingConverterEntry Key="SpeedChampions2" Value="342"/>
        <local:MappingConverterEntry Key="SpeedChampions3" Value="342"/>
        <local:MappingConverterEntry Key="SpeedChampions4" Value="342"/>
    </local:MappingConverter>

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

    <Style x:Key="A_Style_BrickChallengeActivation_CONTROL"
           TargetType="Control">
        <Setter Property="Height"
                Value="27" />
        <Setter Property="VerticalAlignment"
                Value="Center" />
        <Setter Property="HorizontalAlignment"
                Value="Center" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="Control">
                    <Viewbox Stretch="Uniform"
                             StretchDirection="Both">
                        <local:ControllerButtonControl Button="Start"
                                                       Style="{StaticResource A_Style_ControllerButtonControl_Default_ShowAlways}"
                                                       Margin="0" />
                    </Viewbox>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Style.Triggers>
            <DataTrigger Binding="{Binding IsControllerActiveInput}" Value="False">
                <Setter Property="Height" Value="30" />
                <Setter Property="Margin" Value="0,0,0,-3" />
            </DataTrigger>
        </Style.Triggers>
    </Style>

    <Style x:Key="A_Style_Control_BrickChallengeObjective"
           TargetType="Control">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="Control">
                    <Grid Visibility="{Binding ObjectiveText, Converter={StaticResource A_StringVisConverter}}">
                        <local:FZMaterial Style="{StaticResource A_Style_FZMaterial_MapFloatingPanelShadow}" />
                        <StackPanel MinWidth="{StaticResource A_Double_BrickChallengePanelWidth}">
                            <local:FZMaterial Preset="{StaticResource A_FZMaterialPresetRoundtangle_FlatPanel_OuterTopOnly}"
                                              Color="{StaticResource A_Color_BrickChallenges_Panel_Top}">
                                <local:FZTextBlock Text="{Binding Source={local:Loc Expansions.IDS_BrickChallenges_CurrentProgress}, Converter={StaticResource A_StringToUpper}}"
                                                   CapHeight="23"
                                                   Style="{StaticResource A_Style_FZTextBlock_MapFloatingPanelTitle}"
                                                   Margin="30,24,30,24" />
                            </local:FZMaterial>
                            <local:FZMaterial Preset="{StaticResource A_FZMaterialPresetRoundtangle_FlatPanel_OuterBottomOnly}"
                                              Color="#D4EDFC">
                                <StackPanel>
                                    <local:FZMaterial ImageSource="{Binding ObjectiveTierId, Converter={StaticResource A_Converter_ExpansionTwo_ObjectiveTypeIdToMapPanelImageSource}}"
                                                      Width="{Binding ObjectiveTierId, Converter={StaticResource A_Converter_ExpansionTwo_ObjectiveTypeIdToImageWidth}}"
                                                      Height="{Binding ObjectiveTierId, Converter={StaticResource A_Converter_ExpansionTwo_ObjectiveTypeIdToImageHeight}}" />
                                    <local:FZTextBlock local:TextBlockInlineMarkup.Markup="{Binding ObjectiveText, Converter={StaticResource A_StringToUpper}}"
                                                       Style="{StaticResource A_Style_FZTextBlock_HorizonB}"
                                                       CapHeight="18"
                                                       HorizontalAlignment="Center"
                                                       VerticalAlignment="Center"
                                                       TextWrapping="WrapWithOverflow"
                                                       TextAlignment="Center"
                                                       Color="{StaticResource A_Color_Tile_Text}"
                                                       Stretch="None"
                                                       Margin="15"
                                                       MaxWidth="270"
                                                       local:TextBlockInlineMarkup.ResourceBaseName="A_Style_FZRun_PinBrickChallengeDescription_" />
                                    <Decorator Height="10" />
                                    <Decorator Visibility="{Binding IsCampaignScreenLocked, Converter={StaticResource A_FZBooleanToVisibilityConverter_Inverse}}">
                                        <local:FZMaterial Visibility="{Binding SceneEnum, Converter={StaticResource A_Converter_BrickChallengeActivationVisibilityFromSceneEnum}}"
                                                          Preset="{StaticResource A_FZMaterialPresetRoundtangle_FlatPanel_OuterBottomOnly}"
                                                          Color="#7F000000"
                                                          Height="45">
                                            <Decorator MaxWidth="{Binding ObjectiveTierId, Converter={StaticResource A_Converter_ExpansionTwo_ObjectiveTypeIdToImageWidth}}">
                                                <Decorator HorizontalAlignment="Center"
                                                           VerticalAlignment="Center"
                                                           Margin="25,8,25,15">
                                                    <local:FZTextBlock local:TextBlockInlineMarkup.Markup="{Binding Source={local:Loc Expansions.IDS_Map_ViewBrickChallenges}, Converter={StaticResource A_StringToUpper}}"
                                                                       local:TextBlockInlineMarkup.ResourceBaseName="A_Style_BrickChallengeActivation_"
                                                                       Style="{StaticResource A_Style_FZTextBlock_HorizonA}"
                                                                       Color="#FFFFFF"
                                                                       CapHeight="15" />
                                                </Decorator>
                                            </Decorator>
                                        </local:FZMaterial>
                                    </Decorator>
                                </StackPanel>
                            </local:FZMaterial>
                        </StackPanel>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

</ResourceDictionary>
