<Page xmlns:local="clr-namespace:ForzaUI"
      xmlns:System="clr-namespace:System;assembly=mscorlib"
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
      xmlns:d="http://schemas.microsoft.com/expression/blend/2008"  
      x:Class="ForzaUI.Scenes.Anthem.A_PostRaceBucketListStars"
      mc:Ignorable="d"
      DataContext="{Binding RelativeSource={RelativeSource Self}}">
    <local:UIPageTransitionManager.TransitionManager>
        <local:UIPageTransitionManager Preset="{StaticResource A_UIPageTransitionManagerPreset_PostRace}"/>
    </local:UIPageTransitionManager.TransitionManager>
    <Page.Resources>
        <local:OffsetKeyTime x:Key="A_KeyTime_MaxGlow_Start"
                             KeyTime="{StaticResource A_KeyTime_Star_Slam_Bloom_Up}"
                             Offset="0:0:0.0" />
        <local:OffsetKeyTime x:Key="A_KeyTime_MaxGlow_Up"
                             KeyTime="{StaticResource A_KeyTime_MaxGlow_Start}"
                             Offset="0:0:0.21" />
        <local:OffsetKeyTime x:Key="A_KeyTime_MaxGlow_Hold"
                             KeyTime="{StaticResource A_KeyTime_MaxGlow_Up}"
                             Offset="0:0:0.03" />
        <local:OffsetKeyTime x:Key="A_KeyTime_MaxGlow_Down"
                             KeyTime="{StaticResource A_KeyTime_MaxGlow_Hold}"
                             Offset="0:0:0.24" />

        <local:OffsetKeyTime x:Key="A_KeyTime_EdgeGlow_Start"
                             KeyTime="{StaticResource A_KeyTime_Star_Slam_Bloom_Up}"
                             Offset="0:0:0.0" />
        <local:OffsetKeyTime x:Key="A_KeyTime_EdgeGlow_Up"
                             KeyTime="{StaticResource A_KeyTime_EdgeGlow_Start}"
                             Offset="0:0:0.09" />
        <local:OffsetKeyTime x:Key="A_KeyTime_EdgeGlow_Down"
                             KeyTime="{StaticResource A_KeyTime_EdgeGlow_Up}"
                             Offset="0:0:1.8" />
 

        <local:OffsetKeyTime x:Key="A_KeyTime_LevelUp_TextIn_Begin"
                             KeyTime="{StaticResource A_KeyTime_EdgeGlow_Down}"
                             Offset="-0:0:0.1" />
        <local:OffsetKeyTime x:Key="A_KeyTime_LevelUp_TextIn_Begin_Audio"
                             KeyTime="{StaticResource A_KeyTime_LevelUp_TextIn_Begin}"
                             Offset="0:0:0.1" />
        <local:OffsetKeyTime x:Key="A_KeyTime_LevelUp_TextIn_End"
                             KeyTime="{StaticResource A_KeyTime_LevelUp_TextIn_Begin}"
                             Offset="0:0:0.2" />
        <local:OffsetKeyTime x:Key="A_KeyTime_LevelUp_TextSlip_Begin"
                             KeyTime="{StaticResource A_KeyTime_LevelUp_TextIn_End}"
                             Offset="0:0:0.1" />

        <System:TimeSpan x:Key="A_TimeSpan_TextSlip_Duration">0:0:5.0</System:TimeSpan>
        <local:OffsetKeyTime x:Key="A_KeyTime_LevelUp_TextSlip_End"
                             KeyTime="{StaticResource A_KeyTime_LevelUp_TextSlip_Begin}"
                             Offset="{StaticResource A_TimeSpan_TextSlip_Duration}" />

        <local:OffsetKeyTime x:Key="A_KeyTime_LevelUp_TextOut_Begin"
                             KeyTime="{StaticResource A_KeyTime_LevelUp_TextSlip_End}"
                             Offset="0:0:0.1" />
        <local:OffsetKeyTime x:Key="A_KeyTime_LevelUp_TextOut_End"
                             KeyTime="{StaticResource A_KeyTime_LevelUp_TextOut_Begin}"
                             Offset="0:0:0.2" />
        <local:OffsetKeyTime x:Key="A_KeyTime_LevelUp_TextOut_Motion_End"
                             KeyTime="{StaticResource A_KeyTime_LevelUp_TextOut_Begin}"
                             Offset="0:0:0.3" />
        <local:OffsetKeyTime x:Key="A_KeyTime_LevelUp_TextOut_Alpha_End"
                             KeyTime="{StaticResource A_KeyTime_LevelUp_TextOut_Begin}"
                             Offset="0:0:0.08" />
        
        <local:OffsetKeyTime x:Key="A_KeyTime_AllStars_AlphaOut_Begin"
                             KeyTime="{StaticResource A_KeyTime_LevelUp_TextIn_Begin}"
                             Offset="0:0:0.00" />
        <local:OffsetKeyTime x:Key="A_KeyTime_AllStars_AlphaOut_End"
                             KeyTime="{StaticResource A_KeyTime_AllStars_AlphaOut_Begin}"
                             Offset="0:0:0.25" />


        <local:UIStoryboard x:Key="A_Storyboard_FinalStarEarned">
            <local:UIStoryboard.TriggerAnimation>
                <local:PlayVideoTrigger local:TriggerAnimation.KeyTime="{StaticResource A_KeyTime_Star_Slam_Bloom_Begin}"
                                        Storyboard.TargetName="Video" />
                <local:StartAudioTrigger local:TriggerAnimation.KeyTime="{StaticResource A_KeyTime_MaxGlow_Start}"
                                         EventName="/Master/UI/E3/UI_Forzathon_Win" />
                <local:StartAudioTrigger local:TriggerAnimation.KeyTime="{StaticResource A_KeyTime_LevelUp_TextIn_Begin_Audio}"
                                         EventName="/Master/UI/E3/UI_Forzathon_WinFlash" />
            </local:UIStoryboard.TriggerAnimation>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="FullGlow"
                                           Storyboard.TargetProperty="Opacity">
                <DiscreteDoubleKeyFrame KeyTime="0:0:0"
                                        Value="0" />
                <DiscreteDoubleKeyFrame KeyTime="{StaticResource A_KeyTime_MaxGlow_Start}"
                                        Value="0" />
                <LinearDoubleKeyFrame KeyTime="{StaticResource A_KeyTime_MaxGlow_Up}"
                                        Value="1" />
                <DiscreteDoubleKeyFrame KeyTime="{StaticResource A_KeyTime_MaxGlow_Hold}"
                                        Value="1" />
                <LinearDoubleKeyFrame KeyTime="{StaticResource A_KeyTime_MaxGlow_Down}"
                                        Value="0" />
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="EdgeGlow"
                                           Storyboard.TargetProperty="Opacity">
                <DiscreteDoubleKeyFrame KeyTime="0:0:0"
                                        Value="0" />
                <DiscreteDoubleKeyFrame KeyTime="{StaticResource A_KeyTime_EdgeGlow_Start}"
                                        Value="0" />
                <LinearDoubleKeyFrame KeyTime="{StaticResource A_KeyTime_EdgeGlow_Up}"
                                      Value="1" />
                <LinearDoubleKeyFrame KeyTime="{StaticResource A_KeyTime_EdgeGlow_Down}"
                                        Value="0" />
            </DoubleAnimationUsingKeyFrames>
            
            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="CompletionTitle"
                                           Storyboard.TargetProperty="Opacity">
                <DiscreteDoubleKeyFrame KeyTime="0:0:0.0"
                                        Value="0" />
                <DiscreteDoubleKeyFrame KeyTime="{StaticResource A_KeyTime_LevelUp_TextIn_Begin}"
                                        Value="0" />
                <EasingDoubleKeyFrame KeyTime="{StaticResource A_KeyTime_LevelUp_TextIn_End}"
                                      Value="1"
                                      EasingFunction="{local:LinearEasing}" />
                <DiscreteDoubleKeyFrame KeyTime="{StaticResource A_KeyTime_LevelUp_TextOut_Begin}"
                                        Value="1" />
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="CompletionDesc"
                                           Storyboard.TargetProperty="Opacity">
                <DiscreteDoubleKeyFrame KeyTime="0:0:0.0"
                                        Value="0" />
                <DiscreteDoubleKeyFrame KeyTime="{StaticResource A_KeyTime_LevelUp_TextIn_Begin}"
                                        Value="0" />
                <EasingDoubleKeyFrame KeyTime="{StaticResource A_KeyTime_LevelUp_TextIn_End}"
                                      Value="1"
                                      EasingFunction="{local:LinearEasing}" />
                <DiscreteDoubleKeyFrame KeyTime="{StaticResource A_KeyTime_LevelUp_TextOut_Begin}"
                                        Value="1" />
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="CompletionTitle"
                                           Storyboard.TargetProperty="(UIElement.RenderTransform).(TranslateTransform.X)">
                <DiscreteDoubleKeyFrame KeyTime="0:0:0.0"
                                        Value="-1000" />
                <DiscreteDoubleKeyFrame KeyTime="{StaticResource A_KeyTime_LevelUp_TextIn_Begin}"
                                        Value="-1000" />
                <EasingDoubleKeyFrame KeyTime="{StaticResource A_KeyTime_LevelUp_TextSlip_Begin}"
                                      Value="-10"
                                      EasingFunction="{local:QuadraticEasing EasingMode=EaseOut}" />
                <EasingDoubleKeyFrame KeyTime="{StaticResource A_KeyTime_LevelUp_TextSlip_End}"
                                      Value="10"
                                      EasingFunction="{local:LinearEasing}" />
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="CompletionDesc"
                                           Storyboard.TargetProperty="(UIElement.RenderTransform).(TranslateTransform.X)">
                <DiscreteDoubleKeyFrame KeyTime="0:0:0"
                                        Value="1000" />
                <DiscreteDoubleKeyFrame KeyTime="{StaticResource A_KeyTime_LevelUp_TextIn_Begin}"
                                        Value="1000" />
                <EasingDoubleKeyFrame KeyTime="{StaticResource A_KeyTime_LevelUp_TextSlip_Begin}"
                                      Value="10"
                                      EasingFunction="{local:QuadraticEasing EasingMode=EaseOut}" />
                <EasingDoubleKeyFrame KeyTime="{StaticResource A_KeyTime_LevelUp_TextSlip_End}"
                                      Value="-10"
                                      EasingFunction="{local:LinearEasing}" />
            </DoubleAnimationUsingKeyFrames>

            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="BonusValue1"
                                           Storyboard.TargetProperty="Opacity">
                <DiscreteDoubleKeyFrame KeyTime="0:0:0.0"
                                        Value="1" />
                <DiscreteDoubleKeyFrame KeyTime="{StaticResource A_KeyTime_AllStars_AlphaOut_Begin}"
                                        Value="1" />
                <EasingDoubleKeyFrame KeyTime="{StaticResource A_KeyTime_AllStars_AlphaOut_End}"
                                      Value="0"
                                      EasingFunction="{local:LinearEasing}" />
            </DoubleAnimationUsingKeyFrames>

            <StringAnimationUsingKeyFrames FillBehavior="HoldEnd"
                                           Storyboard.TargetName="CompletionTitleText"
                                           Storyboard.TargetProperty="Text">
                <DiscreteStringKeyFrame KeyTime="0"
                                        Value="{local:Loc InGame.IDS_BucketList_MaxStars}" />
            </StringAnimationUsingKeyFrames>
            <StringAnimationUsingKeyFrames FillBehavior="HoldEnd"
                                           Storyboard.TargetName="CompletionDescText"
                                           Storyboard.TargetProperty="Text">
                <DiscreteStringKeyFrame KeyTime="0"
                                        Value="{local:Loc InGame.IDS_BucketList_MaxStars_Message}" />
            </StringAnimationUsingKeyFrames>
        </local:UIStoryboard>

        <local:UIStoryboard x:Key="A_Storyboard_NewStarsEarned">
            <local:UIStoryboard.TriggerAnimation>
            <!--0:0:1.5-->
                <local:RaiseEntityModelEvent local:TriggerAnimation.KeyTime="0:0:3.5" EventName="UISequence_Continue" />
            </local:UIStoryboard.TriggerAnimation>
            <Int32AnimationUsingKeyFrames Storyboard.TargetName="TickerStars"
                                          Storyboard.TargetProperty="(local:MinValue.A)">
                <DiscreteInt32KeyFrame KeyTime="0:0:0"
                                       Value="1" />
                <DiscreteInt32KeyFrame KeyTime="0:0:0.5"
                                       Value="2" />
                <DiscreteInt32KeyFrame KeyTime="0:0:1"
                                       Value="3" />
            </Int32AnimationUsingKeyFrames>
        </local:UIStoryboard>

        <local:LinearTransformConverter x:Key="A_Converter_Identity" />

        <DataTemplate x:Key="A_ItemTemplate_BucketListStar">
            <Control Style="{StaticResource A_Style_Control_BucketListStar}" />
        </DataTemplate>

        <Style x:Key="A_Style_Control_PostRace_BonusValueBlock_Stars"
               TargetType="Control">
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate>
                        <ControlTemplate.Resources>
                            <System:Int32 x:Key="A_Int_Zero">0</System:Int32>
                        </ControlTemplate.Resources>
                        <Grid>
                            <local:TickerItemsControl Max="3"
                                                      Value="{Binding Path=(local:MinValue.Result), RelativeSource={RelativeSource Self}, Converter={StaticResource A_Converter_Identity}}"
                                                      local:MinValue.A="{StaticResource A_Int_Zero}"
                                                      local:MinValue.B="{Binding RawValue}"
                                                      x:Name="TickerStars"
                                                      ItemsPanel="{StaticResource A_PanelTemplate_BucketListStars}"
                                                      ItemTemplate="{StaticResource A_ItemTemplate_BucketListStar}" />

                            <local:EventFire.FzTriggers>
                                <local:BeginUIStoryboard local:EventFireTrigger.Event="AnimateStars"
                                                         Storyboard="{StaticResource A_Storyboard_NewStarsEarned}" />
                            </local:EventFire.FzTriggers>
                        </Grid>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>

        <Storyboard x:Key="A_Storyboard_PostRace_TotalPulse">
        </Storyboard>
        
        <local:UIStoryboard x:Key="A_Storyboard_PlayNewUnlockAudio">
            <local:UIStoryboard.TriggerAnimation>
                <local:StartAudioTrigger local:TriggerAnimation.KeyTime="0:0:0.0"
                                         EventName="/Master/UI/PostRace/HZ2_SFX_HUD_PostRace_CashRewardsBalanceOn_01" />
                <local:StartAudioTrigger local:TriggerAnimation.KeyTime="0:0:1.0"
                                         EventName="/Master/UI/PostRace/HZ3_SFX_HUD_PostRace_FanRewardsSheen" />
            </local:UIStoryboard.TriggerAnimation>
        </local:UIStoryboard>

        <local:UIStoryboard x:Key="PART_Storyboard_Stars_Solo">
            <local:UIStoryboard.TriggerAnimation>
                <local:RaiseFzEvent local:TriggerAnimation.KeyTime="0:0:0.67"
                                    EventName="StartStarRewards" />
                <local:RaiseFzEvent local:TriggerAnimation.KeyTime="0:0:7"
                                    EventName="Complete" />
                <local:RaiseFzEvent local:TriggerAnimation.KeyTime="0:0:7.5"
                                    EventName="AutoContinue" />
            </local:UIStoryboard.TriggerAnimation>
        </local:UIStoryboard>


        <local:OffsetKeyTime x:Key="A_KeyTime_MaxScore_TextIn_Begin"
                             KeyTime="0:0:0.0"
                             Offset="-0:0:0.1" />
        <local:OffsetKeyTime x:Key="A_KeyTime_MaxScore_TextIn_End"
                             KeyTime="{StaticResource A_KeyTime_MaxScore_TextIn_Begin}"
                             Offset="0:0:0.2" />
        <local:OffsetKeyTime x:Key="A_KeyTime_MaxScore_TextSlip_Begin"
                             KeyTime="{StaticResource A_KeyTime_MaxScore_TextIn_End}"
                             Offset="0:0:0.1" />

        <System:TimeSpan x:Key="A_TimeSpan_MaxScore_TextSlip_Duration">0:0:3.0</System:TimeSpan>
        <local:OffsetKeyTime x:Key="A_KeyTime_MaxScore_TextSlip_End"
                             KeyTime="{StaticResource A_KeyTime_MaxScore_TextSlip_Begin}"
                             Offset="{StaticResource A_TimeSpan_MaxScore_TextSlip_Duration}" />

        <local:OffsetKeyTime x:Key="A_KeyTime_MaxScore_TextOut_Begin"
                             KeyTime="{StaticResource A_KeyTime_MaxScore_TextSlip_End}"
                             Offset="0:0:0.0" />
        <local:OffsetKeyTime x:Key="A_KeyTime_MaxScore_TextOut_End"
                             KeyTime="{StaticResource A_KeyTime_MaxScore_TextOut_Begin}"
                             Offset="0:0:0.3" />
        <local:OffsetKeyTime x:Key="A_KeyTime_MaxScore_TextOut_Motion_End"
                             KeyTime="{StaticResource A_KeyTime_MaxScore_TextOut_Begin}"
                             Offset="0:0:0.4" />
        <local:OffsetKeyTime x:Key="A_KeyTime_MaxScore_TextOut_Alpha_End"
                             KeyTime="{StaticResource A_KeyTime_MaxScore_TextOut_Begin}"
                             Offset="0:0:0.18" />

        
        <local:OffsetKeyTime x:Key="A_KeyTime_MaxScore_StartStars"
                             KeyTime="{StaticResource A_KeyTime_MaxScore_TextOut_End}"
                             Offset="0:0:0.67" />
        <local:OffsetKeyTime x:Key="A_KeyTime_Complete"
                             KeyTime="{StaticResource A_KeyTime_MaxScore_TextOut_End}"
                             Offset="0:0:8.2" />
        <local:OffsetKeyTime x:Key="A_KeyTime_Continue"
                             KeyTime="{StaticResource A_KeyTime_Complete}"
                             Offset="0:0:0.5" />
        
        <local:UIStoryboard x:Key="PART_Storyboard_Stars_Coop">
            <local:UIStoryboard.TriggerAnimation>
                <local:RaiseFzEvent local:TriggerAnimation.KeyTime="{StaticResource A_KeyTime_MaxScore_StartStars}"
                                    EventName="StartStarRewards" />
                <local:RaiseFzEvent local:TriggerAnimation.KeyTime="{StaticResource A_KeyTime_Complete}"
                                    EventName="Complete" />
                <local:RaiseFzEvent local:TriggerAnimation.KeyTime="{StaticResource A_KeyTime_Continue}"
                                    EventName="AutoContinue" />
                <local:StartAudioTrigger local:TriggerAnimation.KeyTime="0:0:0"
                                         EventName="/Master/UI/PostRace/HZ2_SFX_HUD_PostRace_XPRewardsTitleOn_01" />
            </local:UIStoryboard.TriggerAnimation>

            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="CompletionTitle"
                                           Storyboard.TargetProperty="Opacity">
                <DiscreteDoubleKeyFrame KeyTime="0:0:0.0"
                                        Value="0" />
                <DiscreteDoubleKeyFrame KeyTime="{StaticResource A_KeyTime_MaxScore_TextIn_Begin}"
                                        Value="0" />
                <EasingDoubleKeyFrame KeyTime="{StaticResource A_KeyTime_MaxScore_TextIn_End}"
                                      Value="1"
                                      EasingFunction="{local:LinearEasing}" />
                <DiscreteDoubleKeyFrame KeyTime="{StaticResource A_KeyTime_MaxScore_TextOut_Begin}"
                                        Value="1" />
                <EasingDoubleKeyFrame KeyTime="{StaticResource A_KeyTime_MaxScore_TextOut_Alpha_End}"
                                      Value="0"
                                      EasingFunction="{local:LinearEasing}" />
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="CompletionDesc"
                                           Storyboard.TargetProperty="Opacity">
                <DiscreteDoubleKeyFrame KeyTime="0:0:0.0"
                                        Value="0" />
                <DiscreteDoubleKeyFrame KeyTime="{StaticResource A_KeyTime_MaxScore_TextIn_Begin}"
                                        Value="0" />
                <EasingDoubleKeyFrame KeyTime="{StaticResource A_KeyTime_MaxScore_TextIn_End}"
                                      Value="1"
                                      EasingFunction="{local:LinearEasing}" />
                <DiscreteDoubleKeyFrame KeyTime="{StaticResource A_KeyTime_MaxScore_TextOut_Begin}"
                                        Value="1" />
                <EasingDoubleKeyFrame KeyTime="{StaticResource A_KeyTime_MaxScore_TextOut_Alpha_End}"
                                      Value="0"
                                      EasingFunction="{local:LinearEasing}" />
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="CompletionTitle"
                                           Storyboard.TargetProperty="(UIElement.RenderTransform).(TranslateTransform.X)">
                <DiscreteDoubleKeyFrame KeyTime="0:0:0.0"
                                        Value="-1000" />
                <DiscreteDoubleKeyFrame KeyTime="{StaticResource A_KeyTime_MaxScore_TextIn_Begin}"
                                        Value="-1000" />
                <EasingDoubleKeyFrame KeyTime="{StaticResource A_KeyTime_MaxScore_TextSlip_Begin}"
                                      Value="-10"
                                      EasingFunction="{local:QuadraticEasing EasingMode=EaseOut}" />
                <EasingDoubleKeyFrame KeyTime="{StaticResource A_KeyTime_MaxScore_TextSlip_End}"
                                      Value="10"
                                      EasingFunction="{local:LinearEasing}" />
                <EasingDoubleKeyFrame KeyTime="{StaticResource A_KeyTime_MaxScore_TextOut_Motion_End}"
                                      Value="1000"
                                      EasingFunction="{local:QuadraticEasing EasingMode=EaseIn}" />
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="CompletionDesc"
                                           Storyboard.TargetProperty="(UIElement.RenderTransform).(TranslateTransform.X)">
                <DiscreteDoubleKeyFrame KeyTime="0:0:0"
                                        Value="1000" />
                <DiscreteDoubleKeyFrame KeyTime="{StaticResource A_KeyTime_MaxScore_TextIn_Begin}"
                                        Value="1000" />
                <EasingDoubleKeyFrame KeyTime="{StaticResource A_KeyTime_MaxScore_TextSlip_Begin}"
                                      Value="10"
                                      EasingFunction="{local:QuadraticEasing EasingMode=EaseOut}" />
                <EasingDoubleKeyFrame KeyTime="{StaticResource A_KeyTime_MaxScore_TextSlip_End}"
                                      Value="-10"
                                      EasingFunction="{local:LinearEasing}" />
                <EasingDoubleKeyFrame KeyTime="{StaticResource A_KeyTime_MaxScore_TextOut_Motion_End}"
                                      Value="-1000"
                                      EasingFunction="{local:QuadraticEasing EasingMode=EaseIn}" />
            </DoubleAnimationUsingKeyFrames>

            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="BonusValue1"
                                           Storyboard.TargetProperty="Opacity">
                <DiscreteDoubleKeyFrame KeyTime="0:0:0.0"
                                        Value="0" />
                <DiscreteDoubleKeyFrame KeyTime="{StaticResource A_KeyTime_MaxScore_TextOut_Begin}"
                                        Value="0" />
                <EasingDoubleKeyFrame KeyTime="{StaticResource A_KeyTime_MaxScore_TextOut_Alpha_End}"
                                      Value="1"
                                      EasingFunction="{local:LinearEasing}" />
            </DoubleAnimationUsingKeyFrames>

        </local:UIStoryboard>

    </Page.Resources>
    <Grid Width="1920"
          Height="540"
          ClipToBounds="True">
        <Control Template="{StaticResource A_Template_StarsGoldBackground}" />

        <local:FZMaterial x:Name="HighContrastBg"
                          Color="#99000000"
                          Visibility="{StaticResource A_Visibility_ShowForHighContrastOnly}" />
        
        <Control x:Name="BonusValue1"
                 HorizontalAlignment="Center"
                 Style="{StaticResource A_Style_Control_PostRace_BonusValueBlock_Stars}"
                 Opacity="1"
                 DataContext="{Binding BonusItems[0]}" />

        <local:FZMaterial CaptureSubgraph="True"
                          Preset="{StaticResource A_FZMaterialPresetAdditive}">
            <MediaElement Source="game:/Media/UI/Videos/Stars_Particles.bk2"
                          local:FzMediaElementExtension.Loop="True"
                          LoadedBehavior="Stop"
                          UnloadedBehavior="Stop"
                          Stretch="UniformToFill"
                          Width="1920"
                          Height="540"
                          x:Name="Video" />
        </local:FZMaterial>

        <Viewbox Stretch="Uniform"
                 StretchDirection="DownOnly"
                 VerticalAlignment="Center"
                 HorizontalAlignment="Center"
                 Height="300">
            <StackPanel HorizontalAlignment="Center"
                        Margin="0,0,0,30"
                        VerticalAlignment="Center"
                        RenderTransformOrigin="0.5,0.5">
                <StackPanel.RenderTransform>
                    <RotateTransform Angle="-6" />
                </StackPanel.RenderTransform>
                <Decorator Effect="{StaticResource A_MotionBlurEffect}"
                           Opacity="0"
                           local:MotionBlurEffect.MotionBlurPositionXControl="{Binding RenderTransform.X, RelativeSource={RelativeSource Self}}"
                           x:Name="CompletionTitle">
                    <UIElement.RenderTransform>
                        <TranslateTransform />
                    </UIElement.RenderTransform>
                    <Decorator>
                        <UIElement.RenderTransform>
                            <TranslateTransform X="100" />
                        </UIElement.RenderTransform>
                        <Decorator RenderTransform="{StaticResource A_Transform_Italic}"
                                   HorizontalAlignment="Left">
                            <local:FZTextBlock Style="{StaticResource A_Style_FZTextBlock_HorizonB}"
                                               CapHeight="52"
                                               Color="#fff"
                                               x:Name="CompletionTitleText"
                                               Text="{Binding SinglePlayerProfile.FormattedGamertag, FallbackValue={local:Loc InGame.IDS_BucketList_TeamScore}}" />
                        </Decorator>
                    </Decorator>
                </Decorator>
                <Decorator Height="15" />
                <Decorator Effect="{StaticResource A_MotionBlurEffect}"
                           Opacity="0"
                           local:MotionBlurEffect.MotionBlurPositionXControl="{Binding RenderTransform.X, RelativeSource={RelativeSource Self}}"
                           x:Name="CompletionDesc">
                    <UIElement.RenderTransform>
                        <TranslateTransform />
                    </UIElement.RenderTransform>
                    <Decorator RenderTransform="{StaticResource A_Transform_Italic}"
                               HorizontalAlignment="Left">
                        <local:FZTextBlock Style="{StaticResource A_Style_FZTextBlock_PostRace_TotalText}"
                                           CapHeight="118"
                                           Color="#fff"
                                           x:Name="CompletionDescText"
                                           Text="{Binding TeamScore, Converter={StaticResource A_StringToUpper}}" />
                    </Decorator>
                </Decorator>
            </StackPanel>
        </Viewbox>

        <local:FZMaterial CaptureSubgraph="True"
                          x:Name="EdgeGlow"
                          Opacity="0"
                          Preset="{StaticResource A_FZMaterialPresetAdditive}"
                          Color="{StaticResource A_Color_StarRewards_Gradient_Stop3}">

            <Grid ClipToBounds="True">

                <local:FZMaterial />

                <local:FZMaterial Margin="-100"
                                  Color="#000">
                    <local:FZMaterial.Preset>
                        <local:FZMaterialPresetRoundtangle Softness="200" />
                    </local:FZMaterial.Preset>
                </local:FZMaterial>

            </Grid>

        </local:FZMaterial>

        <local:FZMaterial x:Name="FullGlow"
                          Preset="{StaticResource A_FZMaterialPresetAdditive}"
                          Opacity="0" />

        <local:FZMaterial Style="{StaticResource A_Style_FZMaterial_PostRacePanel_Vignette}" />

        <local:EventFire x:Name="EventFire" />
        <local:EventFire x:Name="PART_UnlockRewardEventFire" />

    </Grid>


    <local:EventFire.FzTriggers>
        <local:EventFireTrigger Event="ShowNewUnlock"
                                TargetName="NewUnlockAudio"
                                Storyboard="{StaticResource A_Storyboard_PlayNewUnlockAudio}" />
        <local:RaiseFzEvent local:EventFireTrigger.Event="StartStarRewards"
                            local:EventFireTrigger.TargetName="BonusValue1"
                            EventName="AnimateStars" />

        <!-- Compose this BeginUIStoryboard so that it doesn't kill the trigger animation in PART_Storyboard_Stars_Coop -->
        <local:BeginUIStoryboard local:EventFireTrigger.Event="FinalStarAnimation"
                                 HandoffBehavior="Compose"
                                 Storyboard="{StaticResource A_Storyboard_FinalStarEarned}" />

        <local:RaiseEntityModelEvent local:EventFireTrigger.Event="StartPanelAnimation"
                                     EventName="PostRaceBucketListStarsPanel" />
    </local:EventFire.FzTriggers>
</Page>
