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

    <MappingConverter x:Key="H_Converter_CampaignToGiftIcon">
        <MappingConverterEntry Key="{StaticResource H_Id_DiscoverCampaign}"
                               Value="game:\Media\UI\Textures\Data_Bound\CollectionCampaign\Gift_Discover.png" />
        <MappingConverterEntry Key="{StaticResource H_Id_FestivalCampaign}"
                               Value="game:\Media\UI\Textures\Data_Bound\CollectionCampaign\Gift_Festival.png" />
    </MappingConverter>

    <MappingConverter x:Key="H_Converter_CampaignToGiftBG">
        <MappingConverterEntry Key="{StaticResource H_Id_DiscoverCampaign}"
                               Value="game:\Media\UI\Textures\Data_Bound\CollectionCampaign\Reward_Widget_Discover.png" />
        <MappingConverterEntry Key="{StaticResource H_Id_FestivalCampaign}"
                               Value="game:\Media\UI\Textures\Data_Bound\CollectionCampaign\Reward_Widget_Festival.png" />
    </MappingConverter>

    <TimeSpan x:Key="H_Wibble_OutTime">0:0:0.1</TimeSpan>
    <TimeSpan x:Key="H_Wibble_InTime">0:0:0.1</TimeSpan>
    <TimeSpan x:Key="H_Wibble_Pause">0:0:4.0</TimeSpan>

    <KeyTime x:Key="H_Wibble_Start">0:0:0.6</KeyTime>
    <OffsetKeyTime x:Key="H_Wibble_Out1" 
        KeyTime="{StaticResource H_Wibble_Start}"
        Offset="{StaticResource H_Wibble_OutTime}" />
    <OffsetKeyTime x:Key="H_Wibble_In1" 
        KeyTime="{StaticResource H_Wibble_Out1}"
        Offset="{StaticResource H_Wibble_InTime}" />
    <OffsetKeyTime x:Key="H_Wibble_Out2" 
        KeyTime="{StaticResource H_Wibble_In1}"
        Offset="{StaticResource H_Wibble_OutTime}" />
    <OffsetKeyTime x:Key="H_Wibble_In2" 
        KeyTime="{StaticResource H_Wibble_Out2}"
        Offset="{StaticResource H_Wibble_InTime}" />
    <OffsetKeyTime x:Key="H_Wibble_Out3" 
        KeyTime="{StaticResource H_Wibble_In2}"
        Offset="{StaticResource H_Wibble_OutTime}" />
    <OffsetKeyTime x:Key="H_Wibble_In3" 
        KeyTime="{StaticResource H_Wibble_Out3}"
        Offset="{StaticResource H_Wibble_InTime}" />
    <OffsetKeyTime x:Key="H_Wibble_Loop" 
        KeyTime="{StaticResource H_Wibble_In3}"
        Offset="{StaticResource H_Wibble_Pause}" />

    <Double x:Key="H_Wibble_Angle">10</Double>
    <Double x:Key="H_Wibble_Scale">1.1</Double>

    <Style x:Key="H_Style_PeriodicWibble">
        <Setter Property="RenderTransformOrigin" Value="0.5,0.5"/>
        <Setter Property="RenderTransform">
            <Setter.Value>
                <TransformGroup>
                    <RotateTransform />
                    <ScaleTransform />
                </TransformGroup>
            </Setter.Value>
        </Setter>
        <Style.Triggers>
            <EventTrigger RoutedEvent="FrameworkElement.Loaded">
                <BeginUIStoryboard>
                    <BeginUIStoryboard.Storyboard>
                        <UIStoryboard RepeatBehavior="Forever">
                            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="RenderTransform.(TransformGroup.Children)[0].(RotateTransform.Angle)">
                                <EasingDoubleKeyFrame KeyTime="{StaticResource H_Wibble_Start}"
                                                      Value="0"
                                                      EasingFunction="{QuadraticEasing EasingMode=EaseInOut}" />
                                <EasingDoubleKeyFrame KeyTime="{StaticResource H_Wibble_Out1}"
                                                      Value="{StaticResource H_Wibble_Angle}"
                                                      EasingFunction="{QuadraticEasing EasingMode=EaseInOut}" />
                                <EasingDoubleKeyFrame KeyTime="{StaticResource H_Wibble_In1}"
                                                      Value="0"
                                                      EasingFunction="{QuadraticEasing EasingMode=EaseInOut}" />
                                <EasingDoubleKeyFrame KeyTime="{StaticResource H_Wibble_Out2}"
                                                      Value="{Convert {StaticResource H_Wibble_Angle}, Converter={LinearTransformConverter Scale=-1}}"
                                                      EasingFunction="{QuadraticEasing EasingMode=EaseInOut}" />
                                <EasingDoubleKeyFrame KeyTime="{StaticResource H_Wibble_In2}"
                                                      Value="0"
                                                      EasingFunction="{QuadraticEasing EasingMode=EaseInOut}" />
                                <EasingDoubleKeyFrame KeyTime="{StaticResource H_Wibble_Out3}"
                                                      Value="{StaticResource H_Wibble_Angle}"
                                                      EasingFunction="{QuadraticEasing EasingMode=EaseInOut}" />
                                <EasingDoubleKeyFrame KeyTime="{StaticResource H_Wibble_In3}"
                                                      Value="0"
                                                      EasingFunction="{QuadraticEasing EasingMode=EaseInOut}" />
                                <EasingDoubleKeyFrame KeyTime="{StaticResource H_Wibble_Loop}"
                                                      Value="0"
                                                      EasingFunction="{QuadraticEasing EasingMode=EaseInOut}" />
                            </DoubleAnimationUsingKeyFrames>
                            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="RenderTransform.(TransformGroup.Children)[1].(ScaleTransform.ScaleX)">
                                <EasingDoubleKeyFrame KeyTime="{StaticResource H_Wibble_Start}"
                                                      Value="1"
                                                      EasingFunction="{QuadraticEasing EasingMode=EaseInOut}" />
                                <EasingDoubleKeyFrame KeyTime="{StaticResource H_Wibble_Out1}"
                                                      Value="{StaticResource H_Wibble_Scale}"
                                                      EasingFunction="{QuadraticEasing EasingMode=EaseInOut}" />
                                <EasingDoubleKeyFrame KeyTime="{StaticResource H_Wibble_In1}"
                                                      Value="1"
                                                      EasingFunction="{QuadraticEasing EasingMode=EaseInOut}" />
                                <EasingDoubleKeyFrame KeyTime="{StaticResource H_Wibble_Out2}"
                                                      Value="{StaticResource H_Wibble_Scale}"
                                                      EasingFunction="{QuadraticEasing EasingMode=EaseInOut}" />
                                <EasingDoubleKeyFrame KeyTime="{StaticResource H_Wibble_In2}"
                                                      Value="1"
                                                      EasingFunction="{QuadraticEasing EasingMode=EaseInOut}" />
                                <EasingDoubleKeyFrame KeyTime="{StaticResource H_Wibble_Out3}"
                                                      Value="{StaticResource H_Wibble_Scale}"
                                                      EasingFunction="{QuadraticEasing EasingMode=EaseInOut}" />
                                <EasingDoubleKeyFrame KeyTime="{StaticResource H_Wibble_In3}"
                                                      Value="1"
                                                      EasingFunction="{QuadraticEasing EasingMode=EaseInOut}" />
                                <EasingDoubleKeyFrame KeyTime="{StaticResource H_Wibble_Loop}"
                                                      Value="1"
                                                      EasingFunction="{QuadraticEasing EasingMode=EaseInOut}" />
                            </DoubleAnimationUsingKeyFrames>
                            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="RenderTransform.(TransformGroup.Children)[1].(ScaleTransform.ScaleY)">
                                <EasingDoubleKeyFrame KeyTime="{StaticResource H_Wibble_Start}"
                                                      Value="1"
                                                      EasingFunction="{QuadraticEasing EasingMode=EaseInOut}" />
                                <EasingDoubleKeyFrame KeyTime="{StaticResource H_Wibble_Out1}"
                                                      Value="{StaticResource H_Wibble_Scale}"
                                                      EasingFunction="{QuadraticEasing EasingMode=EaseInOut}" />
                                <EasingDoubleKeyFrame KeyTime="{StaticResource H_Wibble_In1}"
                                                      Value="1"
                                                      EasingFunction="{QuadraticEasing EasingMode=EaseInOut}" />
                                <EasingDoubleKeyFrame KeyTime="{StaticResource H_Wibble_Out2}"
                                                      Value="{StaticResource H_Wibble_Scale}"
                                                      EasingFunction="{QuadraticEasing EasingMode=EaseInOut}" />
                                <EasingDoubleKeyFrame KeyTime="{StaticResource H_Wibble_In2}"
                                                      Value="1"
                                                      EasingFunction="{QuadraticEasing EasingMode=EaseInOut}" />
                                <EasingDoubleKeyFrame KeyTime="{StaticResource H_Wibble_Out3}"
                                                      Value="{StaticResource H_Wibble_Scale}"
                                                      EasingFunction="{QuadraticEasing EasingMode=EaseInOut}" />
                                <EasingDoubleKeyFrame KeyTime="{StaticResource H_Wibble_In3}"
                                                      Value="1"
                                                      EasingFunction="{QuadraticEasing EasingMode=EaseInOut}" />
                                <EasingDoubleKeyFrame KeyTime="{StaticResource H_Wibble_Loop}"
                                                      Value="1"
                                                      EasingFunction="{QuadraticEasing EasingMode=EaseInOut}" />
                            </DoubleAnimationUsingKeyFrames>
                        </UIStoryboard>
                    </BeginUIStoryboard.Storyboard>
                </BeginUIStoryboard>
            </EventTrigger>
        </Style.Triggers>
    </Style>

    <TimeSpan x:Key="H_Widget_SlideDelayTime">0:0:0.3</TimeSpan>
    <TimeSpan x:Key="H_Widget_SlideInTime">0:0:0.2</TimeSpan>
    <TimeSpan x:Key="H_Widget_SlideStayTime">0:0:2.0</TimeSpan>
    <TimeSpan x:Key="H_Widget_SlideOutTime">0:0:0.2</TimeSpan>

    <KeyTime x:Key="H_Widget_SlideBegin">0:0:0.0</KeyTime>
    <OffsetKeyTime x:Key="H_Widget_SlideWait" 
        KeyTime="{StaticResource H_Widget_SlideBegin}"
        Offset="{StaticResource H_Widget_SlideDelayTime}" />
    <OffsetKeyTime x:Key="H_Widget_SlideIn" 
        KeyTime="{StaticResource H_Widget_SlideWait}"
        Offset="{StaticResource H_Widget_SlideInTime}" />
    <OffsetKeyTime x:Key="H_Widget_SlideStay" 
        KeyTime="{StaticResource H_Widget_SlideIn}"
        Offset="{StaticResource H_Widget_SlideStayTime}" />
    <OffsetKeyTime x:Key="H_Widget_SlideOut" 
        KeyTime="{StaticResource H_Widget_SlideStay}"
        Offset="{StaticResource H_Widget_SlideOutTime}" />

    <Style x:Key="H_Style_WidgetSlide">
        <Setter Property="LayoutTransform" Value="{ScaleTransform ScaleX=0}"/>
        <Style.Triggers>
            <EventTrigger RoutedEvent="FrameworkElement.Loaded">
                <BeginUIStoryboard>
                    <BeginUIStoryboard.Storyboard>
                        <UIStoryboard FillBehavior="Stop">
                            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="LayoutTransform.(ScaleTransform.ScaleX)">
                                <EasingDoubleKeyFrame KeyTime="{StaticResource H_Widget_SlideBegin}"
                                                      Value="0"
                                                      EasingFunction="{QuadraticEasing EasingMode=EaseInOut}" />
                                <EasingDoubleKeyFrame KeyTime="{StaticResource H_Widget_SlideWait}"
                                                      Value="0"
                                                      EasingFunction="{QuadraticEasing EasingMode=EaseInOut}" />
                                <EasingDoubleKeyFrame KeyTime="{StaticResource H_Widget_SlideIn}"
                                                      Value="1"
                                                      EasingFunction="{QuadraticEasing EasingMode=EaseInOut}" />
                                <EasingDoubleKeyFrame KeyTime="{StaticResource H_Widget_SlideStay}"
                                                      Value="1"
                                                      EasingFunction="{QuadraticEasing EasingMode=EaseInOut}" />
                                <EasingDoubleKeyFrame KeyTime="{StaticResource H_Widget_SlideOut}"
                                                      Value="0"
                                                      EasingFunction="{QuadraticEasing EasingMode=EaseInOut}" />
                            </DoubleAnimationUsingKeyFrames>
                        </UIStoryboard>
                    </BeginUIStoryboard.Storyboard>
                </BeginUIStoryboard>
            </EventTrigger>
        </Style.Triggers>
    </Style>

    <ControlTemplate x:Key="H_Template_RewardWidget" TargetType="Control">
        <Grid Style="{StaticResource A_Style_FrameworkElement_LayoutRoot}">
            <Canvas HorizontalAlignment="Right"
                    VerticalAlignment="Bottom"
                    Style="{StaticResource A_Style_FrameworkElement_DefaultTransition}"
                    UIPageTransitionManager.TransitionIndex="100"
                    UIPageTransitionManager.TransitionTags="reward_widget(todo)">
                <Grid Height="83"
                      Canvas.Right="0"
                      Canvas.Top="-264">
                    <Grid Margin="-150,-50,0,-50" ClipToBounds="True">
                    <Grid Margin="150,50,0,50">
                        <FZMaterial ImageSource="{Binding CampaignId, Converter={StaticResource H_Converter_CampaignToGiftBG}}">
                            <FZMaterial.UVMap>
                                <FZMaterialUVMap StretchRegion="150,0,0,0"
                                                 UnstretchedSize="500,83" />
                            </FZMaterial.UVMap>
                        </FZMaterial>
                        <DockPanel>
                            <Decorator DockPanel.Dock="Bottom"
                                       Height="14" />
                            <StackPanel Orientation="Horizontal">
                                <Grid Width="0">
                                    <FZMaterial HorizontalAlignment="Center"
                                                VerticalAlignment="Center"
                                                IsHitTestVisible="False"
                                                Margin="-60,-30,0,0"
                                                ImageSource="{Binding CampaignId, Converter={StaticResource H_Converter_CampaignToGiftIcon}}"
                                                GetSizeFromTexture="True"
                                                Style="{StaticResource H_Style_PeriodicWibble}"/>

                                    <Canvas Margin="0,0,0,0">
                                        <ContentControl Style="{StaticResource H_Style_NotificationBadge}"
                                                        Visibility="Visible"
                                                        Canvas.Bottom="-12"
                                                        Canvas.Right="-30"
                                                        Height="34"
                                                        Margin="0,0,0,0"
                                                        ContentTemplate="{x:Null}">
                                            <StackPanel Margin="10,0,10,0" Orientation="Horizontal">
                                                <FZTextBlock Margin="0,0,3,-2" VerticalAlignment="Center" CapHeight="18" FontFamily="Horizon_C" Color="{StaticResource H_Color_Primary_Black}" Text="&#x00d7;"/>
                                                <FZTextBlock VerticalAlignment="Center" CapHeight="18" FontFamily="Horizon_C" Color="{StaticResource H_Color_Primary_Black}" Text="{Binding TotalPendingRewards}"/>
                                            </StackPanel>
                                        </ContentControl>
                                    </Canvas>
                                </Grid>
                                <ControllerButtonControl Margin="40,0,20,0"
                                                         HideBackground="True"
                                                         Visibility="Visible"
                                                         Button="{Binding Button, ElementName=redeem_button}" />
                                <Canvas VerticalAlignment="Center">
                                    <Decorator x:Name="widget_text" Canvas.Top="{Binding ActualHeight, RelativeSource={RelativeSource Self}, Converter={LinearTransformConverter Scale=-0.5}}">
                                        <FZTextBlock Text="{Loc HelpButtons.IDS_RedeemRewards}"
                                                     CapHeight="22"
                                                     Stretch="None"
                                                     FontFamily="Horizon_C"
                                                     Margin="0,0,30,0"
                                                     Color="{StaticResource H_Color_Primary_White}" />
                                    </Decorator>
                                </Canvas>
                                <Decorator Width="{Binding ActualWidth, ElementName=widget_text}" Style="{StaticResource H_Style_WidgetSlide}"/>
                            </StackPanel>
                        </DockPanel>
                    </Grid>
                    </Grid>
                </Grid>
                 <Grid Height="83"
                        Width="30"
                      Canvas.Left="0"
                      Canvas.Top="-264">
                    <FZMaterial RenderTransformOrigin="0.5,0.5" RenderTransform="{ScaleTransform ScaleX=-1}" ImageSource="{Binding CampaignId, Converter={StaticResource H_Converter_CampaignToGiftBG}}" Preset="{Roundtangle GradientAngle=-90, GradientColorA=#ffff, GradientColorB=#0fff}"/>
                </Grid>
            </Canvas>
        </Grid>
        <ControlTemplate.Triggers>
            <DataTrigger Binding="{Binding TotalPendingRewards}" Value="0">
                <Setter Property="Visibility" Value="Collapsed"/>
            </DataTrigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>

    <Double x:Key="H_Double_One">1</Double>
    <Double x:Key="H_Double_MinusOne">-1</Double>

    <Style x:Key="H_Style_MilestoneFlip">
        <Setter Property="RenderTransformOrigin" Value="0.5,0.5" />
        <Setter Property="RenderTransform">
            <Setter.Value>
                <ScaleTransform 
                    LastBinding.Input="{Binding SelectedMilestone.Index}" 
                    MultiDataConversion.Output="{StaticResource H_Double_One}" 
                    MultiDataConversion.TargetType="{x:Type Double}" 
                    MultiDataConversion.Value="{Binding (LastBinding.Input), RelativeSource={RelativeSource Self}}" 
                    MultiDataConversion.Parameter="{Binding (LastBinding.Output), RelativeSource={RelativeSource Self}}" 
                    MultiDataConversion.Converter="{CompareConverter LessThan={StaticResource H_Double_MinusOne}, GreaterThanOrEqual={StaticResource H_Double_One}, NotEqual={StaticResource H_Double_One}}" 
                    BindingProxy.AlwaysValidNumeric="{Binding (MultiDataConversion.Output), RelativeSource={RelativeSource Self}, Converter={LinearTransformConverter}}"
                    ScaleX="{Binding (MultiDataConversion.Output), RelativeSource={RelativeSource Self}, Converter={LinearTransformConverter}}"/>
            </Setter.Value>
        </Setter>
    </Style>

    <MotionBlurEffect x:Key="H_MilestoneBlur" />

    <Duration x:Key="H_TimeSpan_MilestoneOnDuration">0:0:0.2</Duration>
    <Duration x:Key="H_TimeSpan_MilestoneOffDuration">0:0:0.2</Duration>
    <Double x:Key="H_Milestone_Slide_Offset">1224</Double>
    <Style x:Key="H_Style_MilestoneAnimateBlur">
        <Setter Property="MotionBlurEffect.MotionBlurPositionXControl" Value="{Binding (RelativeTranslate.AbsX), RelativeSource={RelativeSource Self}}"/>
        <Style.Triggers>
            <EventTrigger RoutedEvent="Binding.TargetUpdated">
                <BeginUIStoryboard>
                    <UIStoryboard DurationOverride="{StaticResource H_TimeSpan_MilestoneOffDuration}"
                                  FillBehavior="Stop">
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Effect)">
                            <DiscreteObjectKeyFrame KeyTime="0:0:0.0"
                                                    Value="{StaticResource H_MilestoneBlur}" />
                            <DiscreteObjectKeyFrame KeyTime="0:0:0.1"
                                                    Value="{StaticResource H_MilestoneBlur}" />
                        </ObjectAnimationUsingKeyFrames>
                        <DoubleAnimation From="0" To="-1" Duration="0:0:1.0" EasingFunction="{QuadraticEasing EasingMode=EaseOut}" Storyboard.TargetProperty="(RelativeTranslate.RelX)"/>
                    </UIStoryboard>
                </BeginUIStoryboard>
            </EventTrigger>
        </Style.Triggers>
    </Style>
    <Style x:Key="H_Style_MilestoneAnimateBlur_AfterFirst">
        <Style.Triggers>
            <EventTrigger RoutedEvent="Binding.TargetUpdated">
                <BeginUIStoryboard>
                    <UIStoryboard FillBehavior="HoldEnd">
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Style">
                            <DiscreteObjectKeyFrame KeyTime="0:0:0"
                                                    Value="{StaticResource H_Style_MilestoneAnimateBlur}" />
                        </ObjectAnimationUsingKeyFrames>
                    </UIStoryboard>
                </BeginUIStoryboard>
            </EventTrigger>
        </Style.Triggers>
    </Style>
    <Style x:Key="H_Style_MilestoneAnimateOff"
        BasedOn="{StaticResource H_Style_RelativeRenderTranslate}">
        <Setter Property="Opacity"
                Value="0" />
        <Style.Triggers>
            <EventTrigger RoutedEvent="Binding.TargetUpdated">
                <BeginUIStoryboard>
                    <UIStoryboard DurationOverride="{StaticResource H_TimeSpan_MilestoneOffDuration}"
                                  FillBehavior="Stop">
                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity">
                            <DiscreteDoubleKeyFrame KeyTime="0:0:0.0"
                                                    Value="1" />
                            <DiscreteDoubleKeyFrame KeyTime="0:0:1"
                                                  Value="0" />
                        </DoubleAnimationUsingKeyFrames>
                        <DoubleAnimation From="0" To="-1" Duration="0:0:1.0" EasingFunction="{QuadraticEasing EasingMode=EaseOut}" Storyboard.TargetProperty="(RelativeTranslate.RelX)"/>
                    </UIStoryboard>
                </BeginUIStoryboard>
            </EventTrigger>
        </Style.Triggers>
    </Style>
    <Style x:Key="H_Style_MilestoneAnimateOff_AfterFirst">
        <Style.Triggers>
            <EventTrigger RoutedEvent="Binding.TargetUpdated">
                <BeginUIStoryboard>
                    <UIStoryboard FillBehavior="HoldEnd">
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Style">
                            <DiscreteObjectKeyFrame KeyTime="0:0:0"
                                                    Value="{StaticResource H_Style_MilestoneAnimateOff}" />
                        </ObjectAnimationUsingKeyFrames>
                    </UIStoryboard>
                </BeginUIStoryboard>
            </EventTrigger>
        </Style.Triggers>
    </Style>
    <Style x:Key="H_Style_MilestoneAnimateOn"
        BasedOn="{StaticResource H_Style_RelativeRenderTranslate}">
        <Style.Triggers>
            <EventTrigger RoutedEvent="Binding.TargetUpdated">
                <BeginUIStoryboard>
                    <UIStoryboard DurationOverride="{StaticResource H_TimeSpan_MilestoneOnDuration}"
                                  FillBehavior="Stop">
                        <DoubleAnimation From="1" To="0" Duration="0:0:1.0" EasingFunction="{QuadraticEasing EasingMode=EaseOut}" Storyboard.TargetProperty="(RelativeTranslate.RelX)"/>
                    </UIStoryboard>
                </BeginUIStoryboard>
            </EventTrigger>
        </Style.Triggers>
    </Style>
    <Style x:Key="H_Style_MilestoneAnimateOn_AfterFirst">
        <Style.Triggers>
            <EventTrigger RoutedEvent="Binding.TargetUpdated">
                <BeginUIStoryboard>
                    <UIStoryboard FillBehavior="HoldEnd">
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Style">
                            <DiscreteObjectKeyFrame KeyTime="0:0:0"
                                                    Value="{StaticResource H_Style_MilestoneAnimateOn}" />
                        </ObjectAnimationUsingKeyFrames>
                    </UIStoryboard>
                </BeginUIStoryboard>
            </EventTrigger>
        </Style.Triggers>
    </Style>
    <Style x:Key="H_Style_MilestoneAnimate_DisableNextButton">
        <Style.Triggers>
            <EventTrigger RoutedEvent="Binding.TargetUpdated">
                <BeginUIStoryboard>
                    <UIStoryboard FillBehavior="Stop">
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Command">
                            <DiscreteObjectKeyFrame KeyTime="0:0:0"
                                                    Value="{x:Null}" />
                            <DiscreteObjectKeyFrame KeyTime="0:0:0.4"
                                                    Value="{x:Null}" />
                        </ObjectAnimationUsingKeyFrames>
                    </UIStoryboard>
                </BeginUIStoryboard>
            </EventTrigger>
        </Style.Triggers>
    </Style>


    <MappingConverter x:Key="H_Converter_CollectionTitleMarkup">
        <MappingConverterEntry Key="{NoCase year}">
            <MappingConverterEntry.Value>
                <Style TargetType="FZRun">
                    <Setter Property="FontFamily" Value="Horizon_B"/>
                    <Setter Property="Color" Value="{StaticResource H_Color_Grey}"/>
                </Style>
            </MappingConverterEntry.Value>
        </MappingConverterEntry>
    </MappingConverter>

    <Identifier64 x:Key="H_Id_PromoCategory">0d1534e7-e43b-ac42-9aa0-7e2ce81ee79d</Identifier64>
    <Identifier64 x:Key="H_Id_PhotoCategory">cf1e7040-9d17-a54c-92db-03ba02d61693</Identifier64>
    <Identifier64 x:Key="H_Id_CarCollectionCategory">300ed03f-e52c-fa4d-9025-09c1a46a1fda</Identifier64>

    <MappingConverter x:Key="H_Converter_CollectionIconBorderVisibility" Default="Collapsed">
        <!-- Car collection -->
        <MappingConverterEntry Key="{StaticResource H_Id_CarCollectionCategory}" Value="Visible"/>
        <!-- Promo collection -->
        <MappingConverterEntry Key="{StaticResource H_Id_PromoCategory}" Value="Visible"/>
    </MappingConverter>

    <Int32 x:Key="H_Rarity_Invalid">-1</Int32>

    <Style x:Key="H_Style_Collection_Rarity" TargetType="FZMaterial"
        BasedOn="{StaticResource A_Style_FZMaterial_RewardBacking_InnerAll}">
        <Setter Property="Height" Value="26" />
        <Setter Property="Margin" Value="5" />
        <Setter Property="MinWidth" Value="100" />
        <Setter Property="HorizontalAlignment" Value="Left" />
        <Setter Property="VerticalAlignment" Value="Top" />
        <Setter Property="Visibility" Value="{Binding Rarity, Converter={CompareConverter
            Value={StaticResource H_Rarity_Invalid},
            Equal={x:Static Visibility.Collapsed},
            NotEqual={x:Static Visibility.Visible}}}"  />
    </Style>

    <Identifier64 x:Key="H_Key_Stamp1">discovery_stamp_1_objective</Identifier64>
    <Identifier64 x:Key="H_Key_Stamp2">discovery_stamp_2_objective</Identifier64>
    <Identifier64 x:Key="H_Key_Stamp3">discovery_stamp_3_objective</Identifier64>
    <Identifier64 x:Key="H_Key_Stamp4">discovery_stamp_4_objective</Identifier64>
    <Identifier64 x:Key="H_Key_Stamp5">discovery_stamp_5_objective</Identifier64>
    <Identifier64 x:Key="H_Key_Stamp6">discovery_stamp_6_objective</Identifier64>
    <Identifier64 x:Key="H_Key_Stamp7">discovery_stamp_7_objective</Identifier64>
    <Identifier64 x:Key="H_Key_Band1">festival_wristband_1_objective</Identifier64>
    <Identifier64 x:Key="H_Key_Band2">festival_wristband_2_objective</Identifier64>
    <Identifier64 x:Key="H_Key_Band3">festival_wristband_3_objective</Identifier64>
    <Identifier64 x:Key="H_Key_Band4">festival_wristband_4_objective</Identifier64>
    <Identifier64 x:Key="H_Key_Band5">festival_wristband_5_objective</Identifier64>
    <Identifier64 x:Key="H_Key_Band6">festival_wristband_6_objective</Identifier64>
    <Identifier64 x:Key="H_Key_Band7">festival_wristband_7_objective</Identifier64>

    <Identifier64 x:Key="H_Key_BandNone">band_none</Identifier64>
    <Identifier64 x:Key="H_Key_StampNone">stamp_none</Identifier64>

    <MappingConverter x:Key="H_MilestoneIdToColourA" Default="#f0f">
        <MappingConverterEntry Key="{StaticResource H_Key_BandNone}" Value="#fff427"/>
        <MappingConverterEntry Key="{StaticResource H_Key_StampNone}" Value="#fff427"/>

        <MappingConverterEntry Key="{StaticResource H_Key_Stamp1}" Value="#fff427"/>
        <MappingConverterEntry Key="{StaticResource H_Key_Stamp2}" Value="#7ffc08"/>
        <MappingConverterEntry Key="{StaticResource H_Key_Stamp3}" Value="#5adcf2"/>
        <MappingConverterEntry Key="{StaticResource H_Key_Stamp4}" Value="#ff52f7"/>
        <MappingConverterEntry Key="{StaticResource H_Key_Stamp5}" Value="#fc842b"/>
        <MappingConverterEntry Key="{StaticResource H_Key_Stamp6}" Value="#af46f9"/>
        <MappingConverterEntry Key="{StaticResource H_Key_Stamp7}" Value="#bf6c11"/>

        <MappingConverterEntry Key="{StaticResource H_Key_Band1}" Value="#fff427"/>
        <MappingConverterEntry Key="{StaticResource H_Key_Band2}" Value="#7ffc08"/>
        <MappingConverterEntry Key="{StaticResource H_Key_Band3}" Value="#5adcf2"/>
        <MappingConverterEntry Key="{StaticResource H_Key_Band4}" Value="#ff52f7"/>
        <MappingConverterEntry Key="{StaticResource H_Key_Band5}" Value="#fc842b"/>
        <MappingConverterEntry Key="{StaticResource H_Key_Band6}" Value="#af46f9"/>
        <MappingConverterEntry Key="{StaticResource H_Key_Band7}" Value="#bf6c11"/>
    </MappingConverter>

    <MappingConverter x:Key="H_MilestoneIdToColourB" Default="#f0f">
        <MappingConverterEntry Key="{StaticResource H_Key_BandNone}" Value="#fff427"/>
        <MappingConverterEntry Key="{StaticResource H_Key_StampNone}" Value="#fff427"/>

        <MappingConverterEntry Key="{StaticResource H_Key_Stamp1}" Value="#fff427"/>
        <MappingConverterEntry Key="{StaticResource H_Key_Stamp2}" Value="#7ffc08"/>
        <MappingConverterEntry Key="{StaticResource H_Key_Stamp3}" Value="#5adcf2"/>
        <MappingConverterEntry Key="{StaticResource H_Key_Stamp4}" Value="#ff52f7"/>
        <MappingConverterEntry Key="{StaticResource H_Key_Stamp5}" Value="#fc842b"/>
        <MappingConverterEntry Key="{StaticResource H_Key_Stamp6}" Value="#af46f9"/>
        <MappingConverterEntry Key="{StaticResource H_Key_Stamp7}" Value="#fee361"/>

        <MappingConverterEntry Key="{StaticResource H_Key_Band1}" Value="#fff427"/>
        <MappingConverterEntry Key="{StaticResource H_Key_Band2}" Value="#7ffc08"/>
        <MappingConverterEntry Key="{StaticResource H_Key_Band3}" Value="#5adcf2"/>
        <MappingConverterEntry Key="{StaticResource H_Key_Band4}" Value="#ff52f7"/>
        <MappingConverterEntry Key="{StaticResource H_Key_Band5}" Value="#fc842b"/>
        <MappingConverterEntry Key="{StaticResource H_Key_Band6}" Value="#af46f9"/>
        <MappingConverterEntry Key="{StaticResource H_Key_Band7}" Value="#fee361"/>
    </MappingConverter>

    <MappingConverter x:Key="H_Converter_ObjectiveToName">
        <MappingConverterEntry Key="{StaticResource H_Key_Stamp1}" Value="{Loc Campaign.IDS_BannerTitleDJ1}" />
        <MappingConverterEntry Key="{StaticResource H_Key_Stamp2}" Value="{Loc Campaign.IDS_BannerTitleDJ2}" />
        <MappingConverterEntry Key="{StaticResource H_Key_Stamp3}" Value="{Loc Campaign.IDS_BannerTitleDJ3}" />
        <MappingConverterEntry Key="{StaticResource H_Key_Stamp4}" Value="{Loc Campaign.IDS_BannerTitleDJ4}" />
        <MappingConverterEntry Key="{StaticResource H_Key_Stamp5}" Value="{Loc Campaign.IDS_BannerTitleDJ5}" />
        <MappingConverterEntry Key="{StaticResource H_Key_Stamp6}" Value="{Loc Campaign.IDS_BannerTitleDJ6}" />
        <MappingConverterEntry Key="{StaticResource H_Key_Stamp7}" Value="{Loc Campaign.IDS_BannerTitleDJ7}" />
        <MappingConverterEntry Key="{StaticResource H_Key_Band1}" Value="{Loc Campaign.IDS_BannerTitleHF1}" />
        <MappingConverterEntry Key="{StaticResource H_Key_Band2}" Value="{Loc Campaign.IDS_BannerTitleHF2}" />
        <MappingConverterEntry Key="{StaticResource H_Key_Band3}" Value="{Loc Campaign.IDS_BannerTitleHF3}" />
        <MappingConverterEntry Key="{StaticResource H_Key_Band4}" Value="{Loc Campaign.IDS_BannerTitleHF4}" />
        <MappingConverterEntry Key="{StaticResource H_Key_Band5}" Value="{Loc Campaign.IDS_BannerTitleHF5}" />
        <MappingConverterEntry Key="{StaticResource H_Key_Band6}" Value="{Loc Campaign.IDS_BannerTitleHF6}" />
        <MappingConverterEntry Key="{StaticResource H_Key_Band7}" Value="{Loc Campaign.IDS_BannerTitleHF7}" />
        
        <MappingConverterEntry Key="{StaticResource H_Key_BandNone}" Value="{Loc Campaign.IDS_BannerTitleHF0}" />
        <MappingConverterEntry Key="{StaticResource H_Key_StampNone}" Value="{Loc Campaign.IDS_BannerTitleDJ0}" />
    </MappingConverter>

    <MappingConverter x:Key="H_Converter_ObjectiveToSubtitle">
        <MappingConverterEntry Key="{StaticResource H_Key_Stamp1}" Value="{Loc Campaign.IDS_BannerSubtitleDJ1}" />
        <MappingConverterEntry Key="{StaticResource H_Key_Stamp2}" Value="{Loc Campaign.IDS_BannerSubtitleDJ2}" />
        <MappingConverterEntry Key="{StaticResource H_Key_Stamp3}" Value="{Loc Campaign.IDS_BannerSubtitleDJ3}" />
        <MappingConverterEntry Key="{StaticResource H_Key_Stamp4}" Value="{Loc Campaign.IDS_BannerSubtitleDJ4}" />
        <MappingConverterEntry Key="{StaticResource H_Key_Stamp5}" Value="{Loc Campaign.IDS_BannerSubtitleDJ5}" />
        <MappingConverterEntry Key="{StaticResource H_Key_Stamp6}" Value="{Loc Campaign.IDS_BannerSubtitleDJ6}" />
        <MappingConverterEntry Key="{StaticResource H_Key_Stamp7}" Value="{Loc Campaign.IDS_BannerSubtitleDJ7}" />
        <MappingConverterEntry Key="{StaticResource H_Key_Band1}" Value="{Loc Campaign.IDS_BannerSubtitleHF1}" />
        <MappingConverterEntry Key="{StaticResource H_Key_Band2}" Value="{Loc Campaign.IDS_BannerSubtitleHF2}" />
        <MappingConverterEntry Key="{StaticResource H_Key_Band3}" Value="{Loc Campaign.IDS_BannerSubtitleHF3}" />
        <MappingConverterEntry Key="{StaticResource H_Key_Band4}" Value="{Loc Campaign.IDS_BannerSubtitleHF4}" />
        <MappingConverterEntry Key="{StaticResource H_Key_Band5}" Value="{Loc Campaign.IDS_BannerSubtitleHF5}" />
        <MappingConverterEntry Key="{StaticResource H_Key_Band6}" Value="{Loc Campaign.IDS_BannerSubtitleHF6}" />
        <MappingConverterEntry Key="{StaticResource H_Key_Band7}" Value="{Loc Campaign.IDS_BannerSubtitleHF7}" />

        <MappingConverterEntry Key="{StaticResource H_Key_BandNone}" Value="{Loc Campaign.IDS_BannerSubtitleHF0}" />
        <MappingConverterEntry Key="{StaticResource H_Key_StampNone}" Value="{Loc Campaign.IDS_BannerSubtitleDJ0}" />
    </MappingConverter>
    
    <MappingConverter x:Key="H_Converter_ObjectiveToPrev">
        <MappingConverterEntry Key="{StaticResource H_Key_Stamp2}" Value="{StaticResource H_Key_Stamp1}" />
        <MappingConverterEntry Key="{StaticResource H_Key_Stamp3}" Value="{StaticResource H_Key_Stamp2}" />
        <MappingConverterEntry Key="{StaticResource H_Key_Stamp4}" Value="{StaticResource H_Key_Stamp3}" />
        <MappingConverterEntry Key="{StaticResource H_Key_Stamp5}" Value="{StaticResource H_Key_Stamp4}" />
        <MappingConverterEntry Key="{StaticResource H_Key_Stamp6}" Value="{StaticResource H_Key_Stamp5}" />
        <MappingConverterEntry Key="{StaticResource H_Key_Stamp7}" Value="{StaticResource H_Key_Stamp6}" />
        <MappingConverterEntry Key="{StaticResource H_Key_Band2}" Value="{StaticResource H_Key_Band1}" />
        <MappingConverterEntry Key="{StaticResource H_Key_Band3}" Value="{StaticResource H_Key_Band2}" />
        <MappingConverterEntry Key="{StaticResource H_Key_Band4}" Value="{StaticResource H_Key_Band3}" />
        <MappingConverterEntry Key="{StaticResource H_Key_Band5}" Value="{StaticResource H_Key_Band4}" />
        <MappingConverterEntry Key="{StaticResource H_Key_Band6}" Value="{StaticResource H_Key_Band5}" />
        <MappingConverterEntry Key="{StaticResource H_Key_Band7}" Value="{StaticResource H_Key_Band6}" />
    </MappingConverter>
    
    <MappingConverter x:Key="H_Converter_ObjectiveToNext">
        <MappingConverterEntry Key="{StaticResource H_Key_Stamp1}" Value="{StaticResource H_Key_Stamp2}" />
        <MappingConverterEntry Key="{StaticResource H_Key_Stamp2}" Value="{StaticResource H_Key_Stamp3}" />
        <MappingConverterEntry Key="{StaticResource H_Key_Stamp3}" Value="{StaticResource H_Key_Stamp4}" />
        <MappingConverterEntry Key="{StaticResource H_Key_Stamp4}" Value="{StaticResource H_Key_Stamp5}" />
        <MappingConverterEntry Key="{StaticResource H_Key_Stamp5}" Value="{StaticResource H_Key_Stamp6}" />
        <MappingConverterEntry Key="{StaticResource H_Key_Stamp6}" Value="{StaticResource H_Key_Stamp7}" />
        <MappingConverterEntry Key="{StaticResource H_Key_Band1}" Value="{StaticResource H_Key_Band2}" />
        <MappingConverterEntry Key="{StaticResource H_Key_Band2}" Value="{StaticResource H_Key_Band3}" />
        <MappingConverterEntry Key="{StaticResource H_Key_Band3}" Value="{StaticResource H_Key_Band4}" />
        <MappingConverterEntry Key="{StaticResource H_Key_Band4}" Value="{StaticResource H_Key_Band5}" />
        <MappingConverterEntry Key="{StaticResource H_Key_Band5}" Value="{StaticResource H_Key_Band6}" />
        <MappingConverterEntry Key="{StaticResource H_Key_Band6}" Value="{StaticResource H_Key_Band7}" />

        <MappingConverterEntry Key="{StaticResource H_Key_BandNone}" Value="{StaticResource H_Key_Band1}" />
        <MappingConverterEntry Key="{StaticResource H_Key_StampNone}" Value="{StaticResource H_Key_Stamp1}" />
    </MappingConverter>
    
    <MultiConverter x:Key="H_Converter_ObjectiveToUpperSubtitle">
        <MultiConverterEntry Converter="{StaticResource H_Converter_ObjectiveToSubtitle}"/>
        <MultiConverterEntry Converter="{StringToUpper}"/>
    </MultiConverter>

    <MappingConverter x:Key="H_Converter_CampaignToCurrencyControlStyle">
        <MappingConverterEntry Key="{StaticResource H_Id_DiscoverCampaign}"
                               Value="{StaticResource H_Style_Control_DJIcon}" />
        <MappingConverterEntry Key="{StaticResource H_Id_FestivalCampaign}"
                               Value="{StaticResource H_Style_Control_FPIcon}" />
    </MappingConverter>

    <MappingConverter x:Key="H_Converter_CampaignToBodyColour"
                      Default="">
        <MappingConverterEntry Key="{StaticResource H_Id_DiscoverCampaign}"
                               Value="{StaticResource A_Color_Campaign_Discover_Body}" />
        <MappingConverterEntry Key="{StaticResource H_Id_FestivalCampaign}"
                               Value="{StaticResource A_Color_Campaign_Festival_Body}" />
    </MappingConverter>

    <MappingConverter x:Key="H_Converter_CampaignToProgressBarColour"
                      Default="">
        <MappingConverterEntry Key="{StaticResource H_Id_DiscoverCampaign}"
                               Value="{StaticResource A_Color_Campaign_Discover_Body}" />
        <MappingConverterEntry Key="{StaticResource H_Id_FestivalCampaign}"
                               Value="{StaticResource A_Color_Campaign_Festival}" />
    </MappingConverter>

    <MappingConverter x:Key="H_Converter_CampaignToScreenReadableName"
                      Default="">
        <MappingConverterEntry Key="{StaticResource H_Id_DiscoverCampaign}"
                               Value="{local:Loc Campaign.IDS_ScreenReader_CampaignCollection_Name_Discover}" />
        <MappingConverterEntry Key="{StaticResource H_Id_FestivalCampaign}"
                               Value="{local:Loc Campaign.IDS_ScreenReader_CampaignCollection_Name_Festival}" />
    </MappingConverter>

    <MappingConverter x:Key="H_Converter_CampaignToScreenReadableCurrencyFormat"
                      Default="">
        <MappingConverterEntry Key="{StaticResource H_Id_DiscoverCampaign}"
                               Value="{local:Loc Campaign.IDS_ScreenReader_Format_DiscoverPoints}" />
        <MappingConverterEntry Key="{StaticResource H_Id_FestivalCampaign}"
                               Value="{local:Loc Campaign.IDS_ScreenReader_Format_FestivalPoints}" />
    </MappingConverter>

    <MappingConverter x:Key="H_Converter_CampaignToScreenReadableProgressFormat"
                      Default="">
        <MappingConverterEntry Key="{StaticResource H_Id_DiscoverCampaign}"
                               Value="{local:Loc Campaign.IDS_ScreenReader_Format_DiscoverProgress}" />
        <MappingConverterEntry Key="{StaticResource H_Id_FestivalCampaign}"
                               Value="{local:Loc Campaign.IDS_ScreenReader_Format_FestivalProgress}" />
    </MappingConverter>

    <MappingConverter x:Key="H_Converter_CampaignToScreenReadableProgressToMilestoneFormat"
                      Default="">
        <MappingConverterEntry Key="{StaticResource H_Id_DiscoverCampaign}"
                               Value="{local:Loc Campaign.IDS_ScreenReader_Format_DiscoverProgressToMilestone}" />
        <MappingConverterEntry Key="{StaticResource H_Id_FestivalCampaign}"
                               Value="{local:Loc Campaign.IDS_ScreenReader_Format_FestivalProgressToMilestone}" />
    </MappingConverter>

    <MappingConverter x:Key="H_Converter_CampaignToScreenReadableRewardFormat"
                      Default="">
        <MappingConverterEntry Key="{StaticResource H_Id_DiscoverCampaign}"
                               Value="{local:Loc Campaign.IDS_ScreenReader_Format_DiscoverRewardDetails}" />
        <MappingConverterEntry Key="{StaticResource H_Id_FestivalCampaign}"
                               Value="{local:Loc Campaign.IDS_ScreenReader_Format_FestivalRewardDetails}" />
    </MappingConverter>
    
    <MappingConverter x:Key="H_MilestoneIdToIcon" Default="">
        <MappingConverterEntry Key="{StaticResource H_Key_BandNone}" 
            Value="game:\media\ui\textures\Data_Bound\CollectionCampaign\Grey_Wristband_Icon.png"/>
        <MappingConverterEntry Key="{StaticResource H_Key_StampNone}" 
            Value="game:\media\ui\textures\Data_Bound\CollectionCampaign\Grey_Stamp.png"/>

        <MappingConverterEntry Key="{StaticResource H_Key_Band1}" 
            Value="game:\media\ui\textures\Data_Bound\CollectionCampaign\Yellow_Wristband_Icon.png"/>
        <MappingConverterEntry Key="{StaticResource H_Key_Band2}" 
            Value="game:\media\ui\textures\Data_Bound\CollectionCampaign\Green_Wristband_Icon.png"/>
        <MappingConverterEntry Key="{StaticResource H_Key_Band3}" 
            Value="game:\media\ui\textures\Data_Bound\CollectionCampaign\Blue_Wristband_Icon.png"/>
        <MappingConverterEntry Key="{StaticResource H_Key_Band4}" 
            Value="game:\media\ui\textures\Data_Bound\CollectionCampaign\Pink_Wristband_Icon.png"/>
        <MappingConverterEntry Key="{StaticResource H_Key_Band5}" 
            Value="game:\media\ui\textures\Data_Bound\CollectionCampaign\Orange_Wristband_Icon.png"/>
        <MappingConverterEntry Key="{StaticResource H_Key_Band6}" 
            Value="game:\media\ui\textures\Data_Bound\CollectionCampaign\Purple_Wristband_Icon.png"/>
        <MappingConverterEntry Key="{StaticResource H_Key_Band7}" 
            Value="game:\media\ui\textures\Data_Bound\CollectionCampaign\Gold_Wristband_Icon.png"/>

        <MappingConverterEntry Key="{StaticResource H_Key_Stamp1}" 
            Value="game:\media\ui\textures\Data_Bound\CollectionCampaign\Yellow_Stamp.png"/>
        <MappingConverterEntry Key="{StaticResource H_Key_Stamp2}" 
            Value="game:\media\ui\textures\Data_Bound\CollectionCampaign\Green_Stamp.png"/>
        <MappingConverterEntry Key="{StaticResource H_Key_Stamp3}" 
            Value="game:\media\ui\textures\Data_Bound\CollectionCampaign\Blue_Stamp.png"/>
        <MappingConverterEntry Key="{StaticResource H_Key_Stamp4}" 
            Value="game:\media\ui\textures\Data_Bound\CollectionCampaign\Pink_Stamp.png"/>
        <MappingConverterEntry Key="{StaticResource H_Key_Stamp5}" 
            Value="game:\media\ui\textures\Data_Bound\CollectionCampaign\Orange_Stamp.png"/>
        <MappingConverterEntry Key="{StaticResource H_Key_Stamp6}" 
            Value="game:\media\ui\textures\Data_Bound\CollectionCampaign\Purple_Stamp.png"/>
        <MappingConverterEntry Key="{StaticResource H_Key_Stamp7}" 
            Value="game:\media\ui\textures\Data_Bound\CollectionCampaign\Gold_Stamp.png"/>
    </MappingConverter>

    <MappingConverter x:Key="H_MilestoneIdToIconMargin" Default="2,0,0,0">
        <MappingConverterEntry Key="{StaticResource H_Key_Stamp2}" 
            Value="6,0,0,0"/>
        <MappingConverterEntry Key="{StaticResource H_Key_Stamp3}" 
            Value="2,0,0,0"/>
        <MappingConverterEntry Key="{StaticResource H_Key_Stamp4}" 
            Value="2,0,0,0"/>
        <MappingConverterEntry Key="{StaticResource H_Key_Stamp5}" 
            Value="3,0,0,0"/>
        <MappingConverterEntry Key="{StaticResource H_Key_Stamp6}" 
            Value="3,0,0,0"/>
        <MappingConverterEntry Key="{StaticResource H_Key_Stamp7}" 
            Value="3,0,0,0"/>
    </MappingConverter>

    <MultiConverter x:Key="H_Converter_MilestoneToNextIcon">
        <MultiConverterEntry Converter="{StaticResource H_Converter_ObjectiveToNext}"/>
        <MultiConverterEntry Converter="{StaticResource H_MilestoneIdToIcon}"/>
    </MultiConverter>

    <Style x:Key="H_Style_MilestonePip"
        TargetType="Control">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate>
                    <Grid Height="28" Width="70" UseLayoutRounding="False">
                        <FZMaterial Visibility="Collapsed" x:Name="selection" Margin="-3" Preset="{Roundtangle CornerRadius=17}" Color="{StaticResource H_Color_Primary_White}"/>
                        <FZMaterial Margin="0" Preset="{Roundtangle CornerRadius=14}" Color="{StaticResource H_Color_Primary_Black}"/>
                        <FZMaterial Margin="{Binding Id, Converter={StaticResource H_MilestoneIdToIconMargin}}" HorizontalAlignment="Left" Stretch="Uniform" GetSizeFromTexture="True"
                            ImageSource="{Binding Id, Converter={StaticResource H_MilestoneIdToIcon}}"/>
                        <Grid HorizontalAlignment="Right" Height="22" Width="22" Margin="0,0,3,0">
                            <FZMaterial x:Name="pip_bg">
                                <FZMaterial.Preset>
                                    <FZMaterialPresetRoundtangle
                                        CornerRadius="11"
                                        GradientAngle="90"
                                        GradientColorA="{Binding Id, Converter={StaticResource H_MilestoneIdToColourA}}" 
                                        GradientColorB="{Binding Id, Converter={StaticResource H_MilestoneIdToColourB}}"/>
                                </FZMaterial.Preset>
                            </FZMaterial>

                            <FZMaterial x:Name="icon" Color="#0000"/>
                        </Grid>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="Selector.IsSelected" Value="True">
                            <Setter TargetName="selection" Property="Visibility" Value="Visible" />
                        </Trigger>
                        <DataTrigger Binding="{Binding Complete}" Value="True">
                            <Setter TargetName="icon" Property="ImageSource" Value="game:\Media\UI\Textures\Data_Bound\CollectionCampaign\Tick_Icon.png"/>
                            <Setter TargetName="icon" Property="Color" Value="{StaticResource H_Color_Primary_Black}"/>
                        </DataTrigger>
                        <DataTrigger Binding="{Binding Reached}" Value="False">
                            <Setter TargetName="icon" Property="ImageSource" Value="game:\Media\UI\Textures\Data_Bound\CollectionCampaign\Lock_Icon.png"/>
                            <Setter TargetName="icon" Property="Color" Value="{StaticResource H_Color_Primary_Black}"/>
                            <Setter TargetName="pip_bg" Property="Preset" Value="{Roundtangle CornerRadius=11, GradientAngle=90}"/>
                            <Setter TargetName="pip_bg" Property="Color" Value="{StaticResource H_Color_Primary_Grey_80pc}"/>
                        </DataTrigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <CornerRadius x:Key="H_CornerRadius_Half">0.5</CornerRadius>
    <CornerRadius x:Key="H_CornerRadius_BottomHalf">0,0,1,1</CornerRadius>

    <Thickness x:Key="H_Thickness_CampaignBarMargin">0.14,0</Thickness>
    
    <Style x:Key="H_Style_NotificationBadge_NarrationPassthrough" BasedOn="{StaticResource H_Style_NotificationBadge}" TargetType="{Type ContentControl}">
        <Setter Property="local:ManualPassthroughProperty.Allowed" Value="{StaticResource A_Boolean_False}"/>
        <Style.Triggers>
            <MultiDataTrigger>
                <MultiDataTrigger.Conditions>
                    <Condition Binding="{Binding IsKeyboardFocusWithin, RelativeSource={RelativeSource AncestorType={x:Type ListBoxItem}}}" Value="{StaticResource A_Boolean_True}"/>
                    <Condition Binding="{Binding Visibility, RelativeSource={RelativeSource Self}}" Value="{x:Static Visibility.Visible}"/>
                </MultiDataTrigger.Conditions>
                <Setter Property="local:ManualPassthroughProperty.Allowed" Value="{StaticResource A_Boolean_True}"/>
            </MultiDataTrigger>
        </Style.Triggers>
    </Style>

    <!--<Style x:Key="H_Style_Milestone_ProgressNarration_MultistringFormatter">
        <Style.Triggers>
            <DataTrigger Binding="{Binding SelectedMilestone.Blocked}" Value="True">
                <Setter Property="local:MultiStringFormatter.Format" Value="{local:Loc Campaign.IDS_MilestoneReached}"/>
            </DataTrigger>

            <DataTrigger Binding="{Binding SelectedMilestone.Blocked}" Value="False">
                <Setter Property="local:MultiStringFormatter.Format" Value="{local:Loc Campaign.IDS_ScreenReader_Format_CampaignProgress}"/>
                <Setter Property="local:MultiStringFormatter.Param0" Value="{Binding SelectedMilestone.Progress}"/>
                <Setter Property="local:MultiStringFormatter.Param1" Value="{Binding SelectedMilestone.Total}"/>
            </DataTrigger>
        </Style.Triggers>
    </Style>-->

    <ControlTemplate x:Key="H_Template_Milestone"
        TargetType="ProgressBar">
<!-- Data expected by this template:
    <DynamicDataItem Name="Thickness" Value="30" DataType="Double" />
    <DynamicDataItem Name="CapHeight" Value="15" DataType="Double" />
-->
        <Grid>
        <Grid Height="{Binding ActualHeight, ElementName=stack_panel}" Visibility="{Binding Blocked, Converter={FZBooleanToVisibilityConverter}}">
            <FZMaterial Margin="20,5" Color="{StaticResource H_Color_Primary_Black}">
                <FZMaterial.Preset>
                    <FZMaterialPresetRoundtangle CornerRadius="{Binding ActualHeight, RelativeSource={RelativeSource AncestorType=FZMaterial}, Converter={MathOperationConverter Operation=Multiply}, ConverterParameter={StaticResource H_CornerRadius_Half}}"/>
                </FZMaterial.Preset>
            </FZMaterial>
                <Viewbox Margin="40,0">
                    <Grid Height="55">
                        <FZTextBlock FontFamily="Horizon_C" VerticalAlignment="Center" Color="{StaticResource H_Color_Primary_White}" CapHeight="20" Text="{Loc Campaign.IDS_MilestoneReached}"/>
                    </Grid>
                </Viewbox>
        </Grid>
        <StackPanel x:Name="stack_panel" Visibility="{Binding Blocked, Converter={FZBooleanToVisibilityConverter InvertResult=True, UseHidden=True}}">
            <Grid 
                Height="{DynamicDataBinding Thickness}">
                <FZMaterial Color="{StaticResource H_Color_Primary_Black}">
                    <FZMaterial.Preset>
                        <FZMaterialPresetRoundtangle CornerRadius="{Binding ActualHeight, RelativeSource={RelativeSource AncestorType=FZMaterial}, Converter={MathOperationConverter Operation=Multiply}, ConverterParameter={StaticResource H_CornerRadius_Half}}"/>
                    </FZMaterial.Preset>
                </FZMaterial>
                <DockPanel UseLayoutRounding="False" Margin="{DynamicDataBinding Thickness, Converter={MathOperationConverter Operation=Multiply}, ConverterParameter={StaticResource H_Thickness_CampaignBarMargin}}">
                    <Decorator DockPanel.Dock="Left" Width="{Binding ActualWidth, RelativeSource={RelativeSource TemplatedParent}, Converter={LinearTransformConverter Scale=0.0077}}"/>
                    <Decorator DockPanel.Dock="Right" Width="{Binding ActualWidth, RelativeSource={RelativeSource TemplatedParent}, Converter={LinearTransformConverter Scale=0.0077}}"/>
                    <FZMaterial MinWidth="40" DockPanel.Dock="Left" GreedyMeasure="True" Height="{DynamicDataBinding Thickness, Converter={LinearTransformConverter Scale=0.8}}" Margin="-4,0,2,1" Stretch="Uniform" ImageSource="{Binding Id, Converter={StaticResource H_MilestoneIdToIcon}}"/>
                    <FZMaterial MinWidth="40" DockPanel.Dock="Right" GreedyMeasure="True" Height="{DynamicDataBinding Thickness, Converter={LinearTransformConverter Scale=0.8}}"  Margin="2,0,-4,1" Stretch="Uniform" ImageSource="{Binding Id, Converter={StaticResource H_Converter_MilestoneToNextIcon}}" Visibility="{Binding ImageSource, RelativeSource={RelativeSource Self}, Converter={FZBooleanToVisibilityConverter}}"/>
                    <Grid>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="7*"/>
                            <RowDefinition Height="16*"/>
                            <RowDefinition Height="7*"/>
                        </Grid.RowDefinitions>
                        <FZMaterial x:Name="bg" Color="#4d4d4d" Grid.Row="1">
                            <FZMaterial.Preset>
                                <FZMaterialPresetRoundtangle CornerRadius="{Binding ActualHeight, RelativeSource={RelativeSource AncestorType=FZMaterial}, Converter={MathOperationConverter Operation=Multiply}, ConverterParameter={StaticResource H_CornerRadius_Half}}"/>
                            </FZMaterial.Preset>
                        </FZMaterial>
                        <Grid x:Name="PART_Indicator" ClipToBounds="True" HorizontalAlignment="Left" Grid.Row="1">
                            <FZMaterial x:Name="PART_Track" Width="{Binding ActualWidth, ElementName=bg}" HorizontalAlignment="Left">
                                <FZMaterial.Preset>
                                    <FZMaterialPresetRoundtangle
                                        CornerRadius="{Binding ActualHeight, RelativeSource={RelativeSource AncestorType=FZMaterial}, Converter={MathOperationConverter Operation=Multiply}, ConverterParameter={StaticResource H_CornerRadius_Half}}"
                                        GradientAngle="90"
                                        GradientColorA="{Binding Id, Converter={StaticResource H_MilestoneIdToColourA}}" 
                                        GradientColorB="{Binding Id, Converter={StaticResource H_MilestoneIdToColourB}}"/>
                                </FZMaterial.Preset>
                            </FZMaterial>
                        </Grid>
                    </Grid>
                </DockPanel>
            </Grid>
            <Grid HorizontalAlignment="Center" Height="26" Width="{Binding ActualWidth, RelativeSource={RelativeSource TemplatedParent}, Converter={LinearTransformConverter Scale=0.73}}">
                <FZMaterial Margin="0,-1,0,0" Color="{StaticResource H_Color_Primary_Black}">
                    <FZMaterial.Preset>
                        <FZMaterialPresetRoundtangle CornerRadius="{Binding ActualHeight, RelativeSource={RelativeSource AncestorType=FZMaterial}, Converter={MathOperationConverter Operation=Multiply}, ConverterParameter={StaticResource H_CornerRadius_BottomHalf}}"/>
                    </FZMaterial.Preset>
                </FZMaterial>
                <DockPanel HorizontalAlignment="Center" VerticalAlignment="Center" Margin="0,-10,0,0">
                    <Decorator DockPanel.Dock="Right" Height="1" VerticalAlignment="Center">
                        <Grid Margin="0,0,0,0" VerticalAlignment="Center" Height="{DynamicDataBinding CapHeight, Converter={LinearTransformConverter Add=6}}" >
                            <Control Style="{Binding CampaignId, RelativeSource={RelativeSource AncestorType=Page}, Converter={StaticResource H_Converter_CampaignToCurrencyControlStyle}}" />
                            <Control Style="{Binding DataContext.Id, RelativeSource={RelativeSource AncestorType=ContentControl}, Converter={StaticResource H_Converter_CampaignToCurrencyControlStyle}}" />
                        </Grid>
                    </Decorator>
                    <FZTextBlock Margin="2,0" HorizontalAlignment="Center" FontFamily="Horizon_C" CapHeight="{DynamicDataBinding CapHeight}" VerticalAlignment="Center" Color="{StaticResource H_Color_Primary_White}">
                        <FZRun Color="{StaticResource H_Color_Primary_White}" Text="{Binding AbsoluteProgress, Converter={NumUnitConverter FractionDigits=0}}"/>
                        <FZRun Text=" / "/>
                        <FZRun Text="{Binding AbsoluteTotal, Converter={NumUnitConverter FractionDigits=0}}"/>
                    </FZTextBlock>
                </DockPanel>
            </Grid>
        </StackPanel>
        </Grid>
    </ControlTemplate>

    <ControlTemplate x:Key="H_Template_Milestone_ProgressBarOnly"
                     TargetType="ProgressBar">
<!-- Data expected by this template:
    <DynamicDataItem Name="Thickness" Value="30" DataType="Double" />
-->
        <Grid>
            <Grid>
                <FZMaterial Color="{StaticResource H_Color_Primary_Black}">
                    <FZMaterial.Preset>
                        <FZMaterialPresetRoundtangle CornerRadius="{Binding ActualHeight, RelativeSource={RelativeSource TemplatedParent}, Converter={MathOperationConverter Operation=Multiply}, ConverterParameter={StaticResource H_CornerRadius_Half}}" />
                    </FZMaterial.Preset>
                </FZMaterial>
                <Grid UseLayoutRounding="False"
                      Margin="{DynamicDataBinding Thickness}">
                        <FZMaterial x:Name="bg"
                                    Color="#4d4d4d"
                                    Grid.Row="1">
                            <FZMaterial.Preset>
                                <FZMaterialPresetRoundtangle CornerRadius="{Binding ActualHeight, ElementName=bg, Converter={MathOperationConverter Operation=Multiply}, ConverterParameter={StaticResource H_CornerRadius_Half}}" />
                            </FZMaterial.Preset>
                        </FZMaterial>
                        <Grid x:Name="PART_Indicator"
                              ClipToBounds="True"
                              HorizontalAlignment="Left">
                            <FZMaterial x:Name="PART_Track"
                                        Width="{Binding ActualWidth, ElementName=bg}"
                                        HorizontalAlignment="Left">
                                <FZMaterial.Preset>
                                    <FZMaterialPresetRoundtangle CornerRadius="{Binding ActualHeight, ElementName=PART_Indicator, Converter={MathOperationConverter Operation=Multiply}, ConverterParameter={StaticResource H_CornerRadius_Half}}"
                                                                 GradientAngle="90"
                                                                 GradientColorA="{Binding Id, Converter={StaticResource H_MilestoneIdToColourA}}"
                                                                 GradientColorB="{Binding Id, Converter={StaticResource H_MilestoneIdToColourB}}" />
                                </FZMaterial.Preset>
                            </FZMaterial>
                        </Grid>
                </Grid>
            </Grid>
        </Grid>
    </ControlTemplate>
    

    <MappingConverter x:Key="H_MilestoneIdToBlockedIcon">
        <MappingConverterEntry Key="{StaticResource H_Key_BandNone}" Value="game:\Media\UI\Textures\Data_Bound\CollectionCampaign\01_Milestone_Objective.png"/>

        <MappingConverterEntry Key="{StaticResource H_Key_Band1}" Value="game:\Media\UI\Textures\Data_Bound\CollectionCampaign\02_Milestone_Objective.png"/>
        <MappingConverterEntry Key="{StaticResource H_Key_Band2}" Value="game:\Media\UI\Textures\Data_Bound\CollectionCampaign\03_Milestone_Objective.png"/>
        <MappingConverterEntry Key="{StaticResource H_Key_Band3}" Value="game:\Media\UI\Textures\Data_Bound\CollectionCampaign\04_Milestone_Objective.png"/>
        <MappingConverterEntry Key="{StaticResource H_Key_Band4}" Value="game:\Media\UI\Textures\Data_Bound\CollectionCampaign\05_Milestone_Objective.png"/>
        <MappingConverterEntry Key="{StaticResource H_Key_Band5}" Value="game:\Media\UI\Textures\Data_Bound\CollectionCampaign\06_Milestone_Objective.png"/>
        <MappingConverterEntry Key="{StaticResource H_Key_Band6}" Value="game:\Media\UI\Textures\Data_Bound\CollectionCampaign\07_Milestone_Objective.png"/>
    </MappingConverter>

    <MappingConverter x:Key="H_MilestoneIdToBlockedText">
        <MappingConverterEntry Key="{StaticResource H_Key_BandNone}" Value="{Loc Campaign.IDS_Journal_Festival_Blocked_Wristband0}"/>

        <MappingConverterEntry Key="{StaticResource H_Key_Band1}" Value="{Loc Campaign.IDS_Journal_Festival_Blocked_Wristband1}"/>
        <MappingConverterEntry Key="{StaticResource H_Key_Band2}" Value="{Loc Campaign.IDS_Journal_Festival_Blocked_Wristband2}"/>
        <MappingConverterEntry Key="{StaticResource H_Key_Band3}" Value="{Loc Campaign.IDS_Journal_Festival_Blocked_Wristband3}"/>
        <MappingConverterEntry Key="{StaticResource H_Key_Band4}" Value="{Loc Campaign.IDS_Journal_Festival_Blocked_Wristband4}"/>
        <MappingConverterEntry Key="{StaticResource H_Key_Band5}" Value="{Loc Campaign.IDS_Journal_Festival_Blocked_Wristband5}"/>
        <MappingConverterEntry Key="{StaticResource H_Key_Band6}" Value="{Loc Campaign.IDS_Journal_Festival_Blocked_Wristband6}"/>
    </MappingConverter>

    <Style x:Key="H_Style_FZRun_GreenBold" TargetType="FZRun">
        <Setter Property="Color" Value="{StaticResource H_Color_Primary_Green}"/>
        <Setter Property="FontFamily" Value="Horizon_C"/>
    </Style>

    <Style x:Key="H_Style_FZRun_PinkBold" TargetType="FZRun">
        <Setter Property="Color" Value="{StaticResource H_Color_Primary_Pink}"/>
        <Setter Property="FontFamily" Value="Horizon_C"/>
    </Style>

    <MappingConverter x:Key="H_MarkupConverter_BlockedDesc">
        <MappingConverterEntry Key="{NoCase highlight}" Value="{StaticResource H_Style_FZRun_GreenBold}"/>
    </MappingConverter>

    <DataTemplate x:Key="H_Template_ItemMapContent">
        <Grid>
            <FZMaterial Color="{StaticResource H_Color_Primary_White}" />
            <FZMaterial Preset="{StaticResource A_FZMaterialPresetRoundtangleStroke_MapBorder}" 
                        Color="#ffafa5af">
                        <FZMaterial Color="#ff000000" 
                                    ImageSource="/ForzaUI;component/Textures/Anthem/Rivals/CarouselGrid.png"/>
            </FZMaterial>

            <!-- This is used to blank out the grid near the route length status box, but the map route should draw on top of it -->
            <FZMaterial Preset="{StaticResource A_FZMaterialPresetRoundtangle_FlatPanel_RivalsDistanceGap}"
                        VerticalAlignment="Bottom"
                        HorizontalAlignment="Right"
                        Margin="0,0,-0.5,-0.5"
                        Width="{Binding ActualWidth, ElementName=LengthStatus}"
                        Height="{Binding ActualHeight, ElementName=LengthStatus}" />
            <MapViewControllerWindowed x:Name="ThumbnailMapView"
                                       DataContext="{Binding}"
                                       Style="{StaticResource A_Style_MapViewController_UIMap}"
                                       MinMapHeight="1000"
                                       InterpolationTime="0" />
            <MapCustomRenderElement Style="{StaticResource A_Style_MapCustomRenderElement_UIMap}"
                                    MapView="{Binding ElementName=ThumbnailMapView}" />

            <Grid VerticalAlignment="Bottom"
                  HorizontalAlignment="Right"
                  Margin="0,0,-0.5,-0.5"
                  x:Name="LengthStatus">
                <local:FZTextBlock Text="{Binding Distance, Converter={StaticResource A_StringToUpper}}"
                                   Style="{StaticResource A_Style_FZTextBlock_RivalsRouteDistanceSmall}"
                                   Margin="5,5,0.5,0.5"
                                   Color="{StaticResource H_Color_Primary_Grey_60pc}" />
            </Grid>
        </Grid> 
    </DataTemplate>

</ResourceDictionary>
