<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_PostRaceFans"
      mc:Ignorable="d"
      Style="{StaticResource A_Style_Page_Generic}"
      DataContext="{Binding RelativeSource={RelativeSource Self}}">
    <local:UIPageTransitionManager.TransitionManager>
        <local:UIPageTransitionManager Preset="{StaticResource A_UIPageTransitionManagerPreset_PostRace}"/>
    </local:UIPageTransitionManager.TransitionManager>

    <Page.Resources>

        <Style x:Key="A_Style_Control_PostRace_RewardLabelBlock" TargetType="Control" 
               BasedOn="{StaticResource A_Style_Control_PostRace_BonusLabelBlock}">
            <Setter Property="Visibility" Value="{Binding Type, Converter={StaticResource A_StringVisConverter}}" />
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate>
                        <Grid Visibility="{Binding Name, Converter={StaticResource A_StringVisConverter_UseHidden}}">
                            <local:FZMaterial x:Name="FrontFace"
                                              Style="{StaticResource A_Style_FZMaterial_AcrylicPanel_PostRace_Fans}">
                                <local:FZTextBlock x:Name="FrontFace_Text"
                                                   Style="{StaticResource A_Style_FZTextBlock_PostRace_BonusText}"
                                                   Text="{Binding Name}"
                                                   VerticalAlignment="Center" HorizontalAlignment="Left" />
                            </local:FZMaterial>
                            <local:FZMaterial x:Name="BackFace" Style="{StaticResource A_Style_FZMaterial_AcrylicPanel_PostRace_Fans}">
                                <local:ZPanel.Transform>
                                    <Transform3DGroup>
                                        <RotateTransform3D CenterY="{StaticResource A_Double_PostRace_HalfSmallBlockHeight}">
                                            <RotateTransform3D.Rotation>
                                                <AxisAngleRotation3D Axis="-1,0,0" Angle="180" />
                                            </RotateTransform3D.Rotation>
                                        </RotateTransform3D>
                                    </Transform3DGroup>
                                </local:ZPanel.Transform>
                                <local:FZTextBlock x:Name="BackFace_Text"
                                                   Style="{StaticResource A_Style_FZTextBlock_PostRace_BonusText}"
                                                   Text="{Binding Name}"
                                                   VerticalAlignment="Center" HorizontalAlignment="Left" />
                            </local:FZMaterial>
                        </Grid>
                        <ControlTemplate.Triggers>
                            <DataTrigger Binding="{Binding HasBeenAchieved}" Value="False">
                                <Setter TargetName="FrontFace" Property="Style" Value="{StaticResource A_Style_FZMaterial_AcrylicPanel_Tile_Background}" />
                                <Setter TargetName="FrontFace_Text" Property="Color" Value="{StaticResource A_Color_GlossyBlack}" />
                                <Setter TargetName="BackFace" Property="Style" Value="{StaticResource A_Style_FZMaterial_AcrylicPanel_Tile_Background}" />
                                <Setter TargetName="BackFace_Text" Property="Color" Value="{StaticResource A_Color_GlossyBlack}" />
                            </DataTrigger>
                            <DataTrigger Binding="{Binding HasBeenAchieved}" Value="True">
                                <Setter TargetName="FrontFace_Text" Property="Text" Value="{Binding CompletedObjectiveText}" />
                                <Setter TargetName="BackFace_Text" Property="Text" Value="{Binding CompletedObjectiveText}" />
                            </DataTrigger>
                            <DataTrigger Binding="{Binding ShowBackFaceContent}" Value="False">
                                <Setter TargetName="BackFace_Text" Property="Visibility" Value="Hidden" />
                            </DataTrigger>
                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>

        <Style x:Key="A_Style_Control_PostRace_RewardValueBlock" 
               BasedOn="{StaticResource A_Style_Control_PostRace_BonusValueBlock}"
               TargetType="Control">
            <Setter Property="Visibility" Value="{Binding Type, Converter={StaticResource A_StringVisConverter}}" />
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate>
                        <Decorator Visibility="{Binding Name, Converter={StaticResource A_StringVisConverter_UseHidden}}">
                            <Grid x:Name="OuterContainer">
                                <StackPanel x:Name="FrontFace" Orientation="Horizontal" >
                                    <local:FZMaterial x:Name="UnitIcon_FrontFace"  Style="{StaticResource A_Style_FZMaterial_AcrylicPanel_Tile_Background}"
                                                    ImageSource="{Binding Tag, RelativeSource={RelativeSource TemplatedParent}}"
                                                    Width="{Binding ActualHeight, RelativeSource={RelativeSource Self}}" />
                                    <local:FZMaterial Style="{StaticResource A_Style_FZMaterial_AcrylicPanel_PostRace_RewardBoxPanel}">
                                        <local:FZTextBlock x:Name="Text_FrontFace"
                                                           Style="{StaticResource A_Style_FZTextBlock_PostRace_BonusText}"
                                                           Text="{Binding Value}" VerticalAlignment="Center" HorizontalAlignment="Right" />
                                    </local:FZMaterial>
                                </StackPanel>
                                <StackPanel x:Name="BackFace" Orientation="Horizontal">
                                    <local:ZPanel.Transform>
                                        <Transform3DGroup>
                                            <RotateTransform3D CenterY="{StaticResource A_Double_PostRace_HalfSmallBlockHeight}">
                                                <RotateTransform3D.Rotation>
                                                    <AxisAngleRotation3D Axis="-1,0,0" Angle="180" />
                                                </RotateTransform3D.Rotation>
                                            </RotateTransform3D>
                                        </Transform3DGroup>
                                    </local:ZPanel.Transform>
                                    <local:FZMaterial x:Name="UnitIcon_BackFace" Style="{StaticResource A_Style_FZMaterial_AcrylicPanel_Tile_Background}"
                                                    ImageSource="{Binding Tag, RelativeSource={RelativeSource TemplatedParent}}"
                                                    Width="{Binding ActualHeight, RelativeSource={RelativeSource Self}}" />
                                    <local:FZMaterial Style="{StaticResource A_Style_FZMaterial_AcrylicPanel_PostRace_RewardBoxPanel}">
                                        <StackPanel Orientation="Horizontal" >
                                            <Decorator x:Name="BackfaceUnitIconSpacer" 
                                                       Width="{Binding ActualHeight, RelativeSource={RelativeSource Self}}" 
                                                       Visibility="Collapsed" />
                                            <local:FZTextBlock x:Name="Text_BackFace"  
                                                           Style="{StaticResource A_Style_FZTextBlock_PostRace_BonusText}"
                                                           Text="{Binding Value}" VerticalAlignment="Center" HorizontalAlignment="Right" />
                                        </StackPanel>
                                    </local:FZMaterial>
                                </StackPanel>
                            </Grid>
                        </Decorator>
                        <ControlTemplate.Triggers>
                            <DataTrigger Binding="{Binding HasBeenAchieved}" Value="True">
                                <Setter TargetName="Text_FrontFace" Property="Text" Value="{Binding CountText}" />
                                <Setter TargetName="Text_BackFace" Property="Text" Value="{Binding CountText}" />
                                <Setter TargetName="UnitIcon_FrontFace" Property="Visibility" Value="Collapsed" />
                                <Setter TargetName="UnitIcon_BackFace" Property="Visibility" Value="Collapsed" />
                            </DataTrigger>
                            <MultiDataTrigger>
                                <MultiDataTrigger.Conditions>
                                    <Condition Binding="{Binding HasBeenAchieved}" Value="True" />
                                    <Condition Binding="{Binding Count}" Value="1" />
                                </MultiDataTrigger.Conditions>
                                <Setter TargetName="OuterContainer" Property="Visibility" Value="Collapsed" />
                            </MultiDataTrigger>
                            <DataTrigger Binding="{Binding ShowBackFaceContent}" Value="False">
                                <Setter TargetName="Text_BackFace" Property="Visibility" Value="Hidden" />
                                <Setter TargetName="UnitIcon_BackFace" Property="Visibility" Value="Collapsed" />
                                <Setter TargetName="BackfaceUnitIconSpacer" Property="Visibility" Value="Visible" />
                            </DataTrigger>
                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
            <Setter Property="Tag" Value="/ForzaUI;component/Textures/Anthem/Icons/FansIcon/Fans_64.png" />
        </Style>

        <Style x:Key="A_Style_FZMaterial_RewardLabelSheen" TargetType="{x:Type local:FZMaterial}">
            <Setter Property="Opacity" Value="0" />
            <Setter Property="RenderTransformOrigin" Value="0.5,0.5" />
            <Setter Property="Margin" Value="0,0,9,8" />
            <Setter Property="Effect">
                <Setter.Value>
                    <local:TextureMaskEffect Texture="{StaticResource A_Brush_PostRace_Silhouette}"
                                             Mask="{StaticResource A_Brush_PostRace_MaskGradient}"/>
                </Setter.Value>
            </Setter>
        </Style>

        <ExponentialEase x:Key="A_EasingFunction_EaseInOut" EasingMode="EaseInOut"/>
        <ExponentialEase x:Key="A_EasingFunction_EaseIn" EasingMode="EaseInOut"/>
        <ExponentialEase x:Key="A_EasingFunction_EaseOut" EasingMode="EaseInOut"/>

        <local:UIStoryboard x:Key="A_Storyboard_PostRace_Show_1Bonus">
            <local:UIStoryboard.TriggerAnimation>
                <local:RaiseFzEvent local:TriggerAnimation.KeyTime="0:0:0.5"
                                    Storyboard.TargetName="EventFire"
                                EventName="ShowBonusItem1" />
                <local:RaiseFzEvent local:TriggerAnimation.KeyTime="0:0:0.8"
                                    Storyboard.TargetName="EventFire"
                                    EventName="ShowTotal" />
                <local:RaiseFzEvent local:TriggerAnimation.KeyTime="0:0:2.2"
                                    Storyboard.TargetName="EventFire"
                                    EventName="ShowRewardItem1" />
                <local:RaiseFzEvent local:TriggerAnimation.KeyTime="0:0:2.7"
                                    Storyboard.TargetName="PART_LevelBar"
                                    EventName="StartLevelBarFillAnimation" />
            </local:UIStoryboard.TriggerAnimation>
        </local:UIStoryboard>

        <local:UIStoryboard x:Key="A_Storyboard_PostRace_Show_2Bonus">
            <local:UIStoryboard.TriggerAnimation>
                <local:RaiseFzEvent local:TriggerAnimation.KeyTime="0:0:0.5"
                                    EventName="ShowBonusItem1"/>
                <local:RaiseFzEvent local:TriggerAnimation.KeyTime="0:0:0.8"
                                    EventName="ShowBonusItem2"/>
                <local:RaiseFzEvent local:TriggerAnimation.KeyTime="0:0:1.1"
                                    EventName="ShowTotal"/>
                <local:RaiseFzEvent local:TriggerAnimation.KeyTime="0:0:2.5"
                                    EventName="ShowRewardItem1"/>
                <local:RaiseFzEvent local:TriggerAnimation.KeyTime="0:0:3.0"
                                    EventName="StartLevelBarFillAnimation"
                                    Storyboard.TargetName="PART_LevelBar" />
            </local:UIStoryboard.TriggerAnimation>
        </local:UIStoryboard>

        <local:UIStoryboard x:Key="A_Storyboard_PostRace_Show_3Bonus">
            <local:UIStoryboard.TriggerAnimation>
                <local:RaiseFzEvent local:TriggerAnimation.KeyTime="0:0:0.5"
                                    Storyboard.TargetName="EventFire"
                                    EventName="ShowBonusItem1"/>
                <local:RaiseFzEvent local:TriggerAnimation.KeyTime="0:0:0.8"
                                    Storyboard.TargetName="EventFire"
                                    EventName="ShowBonusItem2"/>
                <local:RaiseFzEvent local:TriggerAnimation.KeyTime="0:0:1.1"
                                    Storyboard.TargetName="EventFire"
                                    EventName="ShowBonusItem3"/>
                <local:RaiseFzEvent local:TriggerAnimation.KeyTime="0:0:1.4"
                                    Storyboard.TargetName="EventFire"
                                    EventName="ShowTotal"/>
                <local:RaiseFzEvent local:TriggerAnimation.KeyTime="0:0:2.8"
                                    Storyboard.TargetName="EventFire"
                                    EventName="ShowRewardItem1"/>
                <local:RaiseFzEvent local:TriggerAnimation.KeyTime="0:0:3.3"
                                    EventName="StartLevelBarFillAnimation"
                                    Storyboard.TargetName="PART_LevelBar"/>
            </local:UIStoryboard.TriggerAnimation>
        </local:UIStoryboard>

        <local:UIStoryboard x:Key="A_Storyboard_PostRace_Show_4Bonus">
            <local:UIStoryboard.TriggerAnimation>
                <local:RaiseFzEvent local:TriggerAnimation.KeyTime="0:0:0.5"
                                    Storyboard.TargetName="EventFire"
                                    EventName="ShowBonusItem1"/>
                <local:RaiseFzEvent local:TriggerAnimation.KeyTime="0:0:0.8"
                                    Storyboard.TargetName="EventFire"
                                    EventName="ShowBonusItem2"/>
                <local:RaiseFzEvent local:TriggerAnimation.KeyTime="0:0:1.1"
                                    Storyboard.TargetName="EventFire"
                                    EventName="ShowBonusItem3"/>
                <local:RaiseFzEvent local:TriggerAnimation.KeyTime="0:0:1.4"
                                    Storyboard.TargetName="EventFire"
                                    EventName="ShowBonusItem4"/>
                <local:RaiseFzEvent local:TriggerAnimation.KeyTime="0:0:1.7"
                                    Storyboard.TargetName="EventFire"
                                    EventName="ShowTotal"/>
                <local:RaiseFzEvent local:TriggerAnimation.KeyTime="0:0:3.1"
                                    Storyboard.TargetName="EventFire"
                                    EventName="ShowRewardItem1"/>
                <local:RaiseFzEvent local:TriggerAnimation.KeyTime="0:0:3.6"
                                    Storyboard.TargetName="PART_LevelBar"
                                    EventName="StartLevelBarFillAnimation"/>
            </local:UIStoryboard.TriggerAnimation>
        </local:UIStoryboard>

        <Storyboard x:Key="A_Storyboard_PostRace_FinalLevelUp" BeginTime="0:0:0">
            <StringAnimationUsingKeyFrames Storyboard.TargetProperty="(local:EventFire.EventName)" 
                                           Storyboard.TargetName="LevelBarEventFire" FillBehavior="Stop">
                <DiscreteStringKeyFrame KeyTime="0:0:0" Value=""/>
                <DiscreteStringKeyFrame KeyTime="0:0:1.0" Value="Complete"/>
                <DiscreteStringKeyFrame KeyTime="0:0:2.2" Value="AutoContinue"/>
                <DiscreteStringKeyFrame KeyTime="0:0:2.4" Value=""/>
            </StringAnimationUsingKeyFrames>
        </Storyboard>

        <Storyboard x:Key="A_Storyboard_PostRace_LevelUpFlipBar" BeginTime="0:0:1.23">
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(local:ZPanel.Transform).(Transform3DGroup.Children)[0].(RotateTransform3D.Rotation).(AxisAngleRotation3D.Angle)" 
                                           Storyboard.TargetName="{x:Null}">
                <DiscreteDoubleKeyFrame KeyTime="0:0:1.0" Value="0" />
                <EasingDoubleKeyFrame KeyTime="0:0:1.43" Value="-180" EasingFunction="{StaticResource A_EasingFunction_EaseInOut}" />
                <DiscreteDoubleKeyFrame KeyTime="0:0:1.5" Value="0" />
            </DoubleAnimationUsingKeyFrames>
            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" 
                                           Storyboard.TargetName="LevelBarContainer_Front">
                <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{x:Static Visibility.Visible}" />
                <DiscreteObjectKeyFrame KeyTime="0:0:1.206" Value="{x:Static Visibility.Hidden}" />
                <DiscreteObjectKeyFrame KeyTime="0:0:1.5" Value="{x:Static Visibility.Visible}" />
            </ObjectAnimationUsingKeyFrames>
            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" 
                                           Storyboard.TargetName="LevelBarContainer_Back">
                <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{x:Static Visibility.Hidden}" />
                <DiscreteObjectKeyFrame KeyTime="0:0:1.206" Value="{x:Static Visibility.Visible}" />
                <DiscreteObjectKeyFrame KeyTime="0:0:1.5" Value="{x:Static Visibility.Hidden}" />
            </ObjectAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Value" 
                                           Storyboard.TargetName="PART_LevelBar">
                <DiscreteDoubleKeyFrame KeyTime="0:0:1.3" Value="0" />
            </DoubleAnimationUsingKeyFrames>
            <StringAnimationUsingKeyFrames Storyboard.TargetProperty="(local:EventFire.EventName)" 
                                           Storyboard.TargetName="LevelBarEventFire" FillBehavior="Stop">
                <DiscreteStringKeyFrame KeyTime="0:0:0" Value=""/>
                <DiscreteStringKeyFrame KeyTime="0:0:1.23" Value="LevelBarMidFlip" />
                <DiscreteStringKeyFrame KeyTime="0:0:2.0" Value="StartLevelBarFillAnimation"/>
                <DiscreteStringKeyFrame KeyTime="0:0:2.2" Value=""/>
            </StringAnimationUsingKeyFrames>
            <StringAnimationUsingKeyFrames Storyboard.TargetProperty="(local:EventFire.EventName)" 
                                           Storyboard.TargetName="NextObjectiveEventFire" FillBehavior="Stop">
                <DiscreteStringKeyFrame KeyTime="0:0:0" Value=""/>
                <DiscreteStringKeyFrame KeyTime="0:0:1.0" Value="ShowNextObjective" />
                <DiscreteStringKeyFrame KeyTime="0:0:2.2" Value=""/>
            </StringAnimationUsingKeyFrames>
        </Storyboard>

        <Storyboard x:Key="A_Storyboard_PostRace_LevelUpFlipObjective">
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(local:ZPanel.Transform).(Transform3DGroup.Children)[0].(RotateTransform3D.Rotation).(AxisAngleRotation3D.Angle)"
                                           Storyboard.TargetName="{x:Null}">
                <DiscreteDoubleKeyFrame KeyTime="0:0:0.0"
                                        Value="0" />
                <EasingDoubleKeyFrame KeyTime="0:0:0.43"
                                      Value="-180"
                                      EasingFunction="{StaticResource A_EasingFunction_EaseInOut}" />
            </DoubleAnimationUsingKeyFrames>
        </Storyboard>

        <Storyboard x:Key="A_Storyboard_PostRace_LevelUpFlash">
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity"
                                           Storyboard.TargetName="ObjectiveCompleteBoxGlow">
                <DiscreteDoubleKeyFrame KeyTime="0:0:0.0" Value="0" />
                <DiscreteDoubleKeyFrame KeyTime="0:0:0.03" Value="1" />
                <DiscreteDoubleKeyFrame KeyTime="0:0:0.4" Value="1" />
                <LinearDoubleKeyFrame KeyTime="0:0:0.63" Value="0" />
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" 
                                           Storyboard.TargetName="ObjectiveCompleteLargeGlow">
                <DiscreteDoubleKeyFrame KeyTime="0:0:0" Value="0" />
                <DiscreteDoubleKeyFrame KeyTime="0:0:0.03" Value="2.0" />
                <LinearDoubleKeyFrame KeyTime="0:0:0.27" Value="2.0" />
                <LinearDoubleKeyFrame KeyTime="0:0:0.9" Value="0" />
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)" 
                                           Storyboard.TargetName="ObjectiveCompleteLargeGlow">
                <DiscreteDoubleKeyFrame KeyTime="0:0:0" Value="10" />
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)"
                                           Storyboard.TargetName="ObjectiveCompleteLargeGlow">
                <DiscreteDoubleKeyFrame KeyTime="0:0:0" Value="10" />
            </DoubleAnimationUsingKeyFrames>
        </Storyboard>

        <local:UIStoryboard x:Key="A_Storyboard_PostRace_Sheen" DurationOverride="0:0:2.0">
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="{x:Null}">
                <DiscreteDoubleKeyFrame KeyTime="0:0:0" Value="0"/>
                <EasingDoubleKeyFrame KeyTime="0:0:0.75" Value="0.6"/>
                <DiscreteDoubleKeyFrame KeyTime="0:0:1.5" Value="0"/>
            </DoubleAnimationUsingKeyFrames>
            <SingleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Effect).(FadeInStart)" Storyboard.TargetName="{x:Null}">
                <DiscreteSingleKeyFrame KeyTime="0:0:0" Value="-0.33"/>
                <DiscreteSingleKeyFrame KeyTime="0:0:0.83" Value="-0.33"/>
                <EasingSingleKeyFrame KeyTime="0:0:1.25" Value="1" EasingFunction="{StaticResource A_EasingFunction_EaseInOut}"/>
            </SingleAnimationUsingKeyFrames>
            <SingleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Effect).(FadeInEnd)" Storyboard.TargetName="{x:Null}">
                <DiscreteSingleKeyFrame KeyTime="0:0:0" Value="-0.3"/>
                <DiscreteSingleKeyFrame KeyTime="0:0:0.83" Value="-0.3"/>
                <EasingSingleKeyFrame KeyTime="0:0:1.25" Value="1.03" EasingFunction="{StaticResource A_EasingFunction_EaseInOut}"/>
            </SingleAnimationUsingKeyFrames>
            <SingleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Effect).(FadeOutStart)" Storyboard.TargetName="{x:Null}">
                <DiscreteSingleKeyFrame KeyTime="0:0:0" Value="-0.03"/>
                <DiscreteSingleKeyFrame KeyTime="0:0:0.83" Value="-0.03"/>
                <EasingSingleKeyFrame KeyTime="0:0:1.25" Value="1.33" EasingFunction="{StaticResource A_EasingFunction_EaseInOut}"/>
            </SingleAnimationUsingKeyFrames>
            <SingleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Effect).(FadeOutEnd)" Storyboard.TargetName="{x:Null}">
                <DiscreteSingleKeyFrame KeyTime="0:0:0" Value="0"/>
                <DiscreteSingleKeyFrame KeyTime="0:0:0.83" Value="0"/>
                <EasingSingleKeyFrame KeyTime="0:0:1.25" Value="1.36" EasingFunction="{StaticResource A_EasingFunction_EaseInOut}"/>
            </SingleAnimationUsingKeyFrames>
        </local:UIStoryboard>

        <Storyboard x:Key="A_Storyboard_PlayBonusItemOnAudio">
            <StringAnimationUsingKeyFrames Storyboard.TargetName="{x:Null}" Storyboard.TargetProperty="(local:AudioEvent.SoundName)">
                <DiscreteStringKeyFrame KeyTime="0:0:0" Value="" />
                <DiscreteStringKeyFrame KeyTime="0:0:0.01" Value="/Master/UI/PostRace/HZ3_SFX_HUD_PostRace_FansItemOn_01" />
            </StringAnimationUsingKeyFrames>
        </Storyboard>

        <Storyboard x:Key="A_Storyboard_PlayFansBarOnAudio">
            <StringAnimationUsingKeyFrames Storyboard.TargetName="{x:Null}" Storyboard.TargetProperty="(local:AudioEvent.SoundName)">
                <DiscreteStringKeyFrame KeyTime="0:0:0" Value="" />
                <DiscreteStringKeyFrame KeyTime="0:0:0.01" Value="/Master/UI/PostRace/HZ3_SFX_HUD_PostRace_FansTotalOn_01" />
            </StringAnimationUsingKeyFrames>
        </Storyboard>

        <Storyboard x:Key="A_Storyboard_PlayObjectiveOnAudio">
            <StringAnimationUsingKeyFrames Storyboard.TargetName="{x:Null}" Storyboard.TargetProperty="(local:AudioEvent.SoundName)">
                <DiscreteStringKeyFrame KeyTime="0:0:0" Value="" />
                <DiscreteStringKeyFrame KeyTime="0:0:0.01" Value="/Master/UI/PostRace/HZ3_SFX_HUD_PostRace_FansObjectiveOn_01" />
            </StringAnimationUsingKeyFrames>
        </Storyboard>

        <Storyboard x:Key="A_Storyboard_PlayObjectiveAchieveAudio">
            <StringAnimationUsingKeyFrames Storyboard.TargetName="{x:Null}" Storyboard.TargetProperty="(local:AudioEvent.SoundName)">
                <DiscreteStringKeyFrame KeyTime="0:0:0" Value="" />
                <DiscreteStringKeyFrame KeyTime="0:0:0.01" Value="/Master/UI/PostRace/HZ3_SFX_HUD_PostRace_FansObjectiveAchieve_01" />
                <DiscreteStringKeyFrame KeyTime="0:0:1.0" Value="/Master/UI/PostRace/HZ3_SFX_HUD_PostRace_FanRewardsSheen" />
            </StringAnimationUsingKeyFrames>
        </Storyboard>

        <Storyboard x:Key="A_Storyboard_PlayObjectiveIncreaseAudio" BeginTime="0:0:0.23">
            <StringAnimationUsingKeyFrames Storyboard.TargetName="{x:Null}" Storyboard.TargetProperty="(local:AudioEvent.SoundName)">
                <DiscreteStringKeyFrame KeyTime="0:0:0" Value="" />
                <DiscreteStringKeyFrame KeyTime="0:0:0.01" Value="/Master/UI/PostRace/HZ3_SFX_HUD_PostRace_FansObjectiveIncrease_01" />
                <DiscreteStringKeyFrame KeyTime="0:0:0.77" Value="/Master/UI/PostRace/HZ3_SFX_HUD_PostRace_FanRewardsSheen" />
            </StringAnimationUsingKeyFrames>
        </Storyboard>
        
        <Storyboard x:Key="A_Storyboard_PlayObjectiveUpdateAudio">
            <StringAnimationUsingKeyFrames Storyboard.TargetName="{x:Null}" Storyboard.TargetProperty="(local:AudioEvent.SoundName)">
                <DiscreteStringKeyFrame KeyTime="0:0:0" Value="" />
                <DiscreteStringKeyFrame KeyTime="0:0:0.01" Value="/Master/UI/PostRace/HZ3_SFX_HUD_PostRace_FansObjectiveUpdate_01" />
            </StringAnimationUsingKeyFrames>
        </Storyboard>

        <Storyboard x:Key="A_Storyboard_PlayObjectiveReachedAudio">
            <StringAnimationUsingKeyFrames Storyboard.TargetName="{x:Null}" Storyboard.TargetProperty="(local:AudioEvent.SoundName)">
                <DiscreteStringKeyFrame KeyTime="0:0:0" Value="" />
                <DiscreteStringKeyFrame KeyTime="0:0:0.01" Value="/Master/UI/PostRace/HZ3_SFX_HUD_PostRace_FanRewardsLevelUp_01" />
                <DiscreteStringKeyFrame KeyTime="0:0:2.23" Value="/Master/UI/PostRace/HZ3_SFX_HUD_PostRace_FanRewardsLevelBarFlip_01" />
            </StringAnimationUsingKeyFrames>
        </Storyboard>

        <Storyboard x:Key="A_Storyboard_PlayFinalObjectiveReachedAudio">
            <StringAnimationUsingKeyFrames Storyboard.TargetName="{x:Null}" Storyboard.TargetProperty="(local:AudioEvent.SoundName)">
                <DiscreteStringKeyFrame KeyTime="0:0:0" Value="" />
                <DiscreteStringKeyFrame KeyTime="0:0:0.01" Value="/Master/UI/PostRace/HZ3_SFX_HUD_PostRace_FanRewardsLevelUp_01" />
            </StringAnimationUsingKeyFrames>
        </Storyboard>

        <Storyboard x:Key="A_Storyboard_PostRace_RewardValueFlipCommon" BeginTime="0:0:0.23">
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(local:ZPanel.Transform).(Transform3DGroup.Children)[0].(RotateTransform3D.Rotation).(AxisAngleRotation3D.Angle)"
                                           Storyboard.TargetName="{x:Null}">
                <DiscreteDoubleKeyFrame KeyTime="0:0:0.0"
                                        Value="0" />
                <EasingDoubleKeyFrame KeyTime="0:0:0.43"
                                      Value="-180"
                                      EasingFunction="{StaticResource A_EasingFunction_EaseInOut}" />
                <DiscreteDoubleKeyFrame KeyTime="0:0:0.5"
                                        Value="0" />
            </DoubleAnimationUsingKeyFrames>
        </Storyboard>

        <Storyboard x:Key="A_Storyboard_PostRace_RewardValueFlipObjective">
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(local:ZPanel.Transform).(Transform3DGroup.Children)[0].(RotateTransform3D.Rotation).(AxisAngleRotation3D.Angle)"
                                           Storyboard.TargetName="{x:Null}">
                <DiscreteDoubleKeyFrame KeyTime="0:0:0.0"
                                        Value="0" />
                <EasingDoubleKeyFrame KeyTime="0:0:0.43"
                                      Value="-180"
                                      EasingFunction="{StaticResource A_EasingFunction_EaseInOut}" />
                <DiscreteDoubleKeyFrame KeyTime="0:0:0.5"
                                        Value="0" />
            </DoubleAnimationUsingKeyFrames>
        </Storyboard>

        <Storyboard x:Key="A_Storyboard_PostRace_RewardValueHideObjective">
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(local:ZPanel.Transform).(Transform3DGroup.Children)[0].(RotateTransform3D.Rotation).(AxisAngleRotation3D.Angle)"
                                           Storyboard.TargetName="{x:Null}">
                <DiscreteDoubleKeyFrame KeyTime="0:0:0.0"
                                        Value="0" />
                <EasingDoubleKeyFrame KeyTime="0:0:0.43"
                                      Value="-90"
                                      EasingFunction="{StaticResource A_EasingFunction_EaseInOut}" />
            </DoubleAnimationUsingKeyFrames>
        </Storyboard>

        <Storyboard x:Key="A_Storyboard_PostRace_RewardValue1AchieveFlip">
            <StringAnimationUsingKeyFrames Storyboard.TargetProperty="(local:EventFire.EventName)" 
                                           Storyboard.TargetName="RewardItemsEventFire" FillBehavior="Stop">
                <DiscreteStringKeyFrame KeyTime="0:0:0" Value=""/>
                <DiscreteStringKeyFrame KeyTime="0:0:0.23" Value="RewardItem1MidFlip" />
                <DiscreteStringKeyFrame KeyTime="0:0:0.43" Value=""/>
            </StringAnimationUsingKeyFrames>
        </Storyboard>

        <Storyboard x:Key="A_Storyboard_PostRace_RewardValue2AchieveFlip">
            <StringAnimationUsingKeyFrames Storyboard.TargetProperty="(local:EventFire.EventName)" 
                                           Storyboard.TargetName="RewardItemsEventFire" FillBehavior="Stop">
                <DiscreteStringKeyFrame KeyTime="0:0:0" Value=""/>
                <DiscreteStringKeyFrame KeyTime="0:0:0.23" Value="RewardItem2MidFlip" />
                <DiscreteStringKeyFrame KeyTime="0:0:0.43" Value=""/>
            </StringAnimationUsingKeyFrames>
        </Storyboard>

        <Storyboard x:Key="A_Storyboard_PostRace_RewardValue3AchieveFlip">
            <StringAnimationUsingKeyFrames Storyboard.TargetProperty="(local:EventFire.EventName)" 
                                           Storyboard.TargetName="RewardItemsEventFire" FillBehavior="Stop">
                <DiscreteStringKeyFrame KeyTime="0:0:0" Value=""/>
                <DiscreteStringKeyFrame KeyTime="0:0:0.23" Value="RewardItem3MidFlip" />
                <DiscreteStringKeyFrame KeyTime="0:0:0.43" Value=""/>
            </StringAnimationUsingKeyFrames>
        </Storyboard>

        <Storyboard x:Key="A_Storyboard_PostRace_RewardValue1IncreaseFlip" BeginTime="0:0:0.23">
            <StringAnimationUsingKeyFrames Storyboard.TargetProperty="(local:EventFire.EventName)" 
                                           Storyboard.TargetName="RewardItemsIncreaseEventFire" FillBehavior="Stop">
                <DiscreteStringKeyFrame KeyTime="0:0:0" Value=""/>
                <DiscreteStringKeyFrame KeyTime="0:0:0.23" Value="RewardItem1MidFlip" />
                <DiscreteStringKeyFrame KeyTime="0:0:0.43" Value=""/>
            </StringAnimationUsingKeyFrames>
        </Storyboard>

        <Storyboard x:Key="A_Storyboard_PostRace_RewardValue2IncreaseFlip" BeginTime="0:0:0.23">
            <StringAnimationUsingKeyFrames Storyboard.TargetProperty="(local:EventFire.EventName)" 
                                           Storyboard.TargetName="RewardItemsIncreaseEventFire" FillBehavior="Stop">
                <DiscreteStringKeyFrame KeyTime="0:0:0" Value=""/>
                <DiscreteStringKeyFrame KeyTime="0:0:0.23" Value="RewardItem2MidFlip" />
                <DiscreteStringKeyFrame KeyTime="0:0:0.43" Value=""/>
            </StringAnimationUsingKeyFrames>
        </Storyboard>

        <Storyboard x:Key="A_Storyboard_PostRace_RewardValue3IncreaseFlip" BeginTime="0:0:0.23">
            <StringAnimationUsingKeyFrames Storyboard.TargetProperty="(local:EventFire.EventName)" 
                                           Storyboard.TargetName="RewardItemsIncreaseEventFire" FillBehavior="Stop">
                <DiscreteStringKeyFrame KeyTime="0:0:0" Value=""/>
                <DiscreteStringKeyFrame KeyTime="0:0:0.23" Value="RewardItem3MidFlip" />
                <DiscreteStringKeyFrame KeyTime="0:0:0.43" Value=""/>
            </StringAnimationUsingKeyFrames>
        </Storyboard>

        <Storyboard x:Key="A_Storyboard_PostRace_RewardValue2ObjectiveFlip">
            <StringAnimationUsingKeyFrames Storyboard.TargetProperty="(local:EventFire.EventName)" 
                                           Storyboard.TargetName="RewardItemsIncreaseEventFire" FillBehavior="Stop">
                <DiscreteStringKeyFrame KeyTime="0:0:0" Value=""/>
                <DiscreteStringKeyFrame KeyTime="0:0:0.23" Value="ObjectiveItem2MidFlip" />
                <DiscreteStringKeyFrame KeyTime="0:0:0.43" Value=""/>
            </StringAnimationUsingKeyFrames>
        </Storyboard>

        <Storyboard x:Key="A_Storyboard_PostRace_RewardValue3ObjectiveFlip">
            <StringAnimationUsingKeyFrames Storyboard.TargetProperty="(local:EventFire.EventName)" 
                                           Storyboard.TargetName="RewardItemsIncreaseEventFire" FillBehavior="Stop">
                <DiscreteStringKeyFrame KeyTime="0:0:0" Value=""/>
                <DiscreteStringKeyFrame KeyTime="0:0:0.23" Value="ObjectiveItem3MidFlip" />
                <DiscreteStringKeyFrame KeyTime="0:0:0.43" Value=""/>
            </StringAnimationUsingKeyFrames>
        </Storyboard>

        <Storyboard x:Key="A_Storyboard_PostRace_RewardValue4ObjectiveFlip">
            <StringAnimationUsingKeyFrames Storyboard.TargetProperty="(local:EventFire.EventName)" 
                                           Storyboard.TargetName="RewardItemsIncreaseEventFire" FillBehavior="Stop">
                <DiscreteStringKeyFrame KeyTime="0:0:0" Value=""/>
                <DiscreteStringKeyFrame KeyTime="0:0:0.23" Value="ObjectiveItem4MidFlip" />
                <DiscreteStringKeyFrame KeyTime="0:0:0.43" Value=""/>
            </StringAnimationUsingKeyFrames>
        </Storyboard>
    </Page.Resources>

    <Grid>
        <ContentControl x:Name="BottomBar" Style="{StaticResource A_Style_ButtonBar}">
            <ContentControl x:Name="DefaultHelpPanel"
                    Style="{StaticResource A_Style_ContentControl_DefaultButtonBar}" />
        </ContentControl>
        <Decorator Style="{StaticResource A_Style_FrameworkElement_DefaultTransition_0}">
            <Grid Margin="0,-82,0,0"
                  Style="{StaticResource A_Style_FrameworkElement_LayoutRoot}">
                <StackPanel VerticalAlignment="Center" HorizontalAlignment="Left" Margin="190,0,0,0">
                    <ContentControl Content="{Binding ScreenTitle}"
                        HorizontalAlignment="Left"
                        Style="{StaticResource A_Style_ContentControl_ScreenTitleBlock}"
                        local:BindingProxy.A="{Binding ScreenTitleIcon}" Margin="0,0,0,56" />

                    <Viewbox MaxHeight="680" HorizontalAlignment="Left" StretchDirection="DownOnly">
                        <StackPanel  VerticalAlignment="Center" HorizontalAlignment="Left">

                            <Decorator MinHeight="100">
                                <Grid Margin="0,0,0,49" VerticalAlignment="Top">
                                    <Grid.RowDefinitions>
                                        <RowDefinition />
                                        <RowDefinition />
                                        <RowDefinition />
                                        <RowDefinition />
                                    </Grid.RowDefinitions>
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="Auto" />
                                        <ColumnDefinition />
                                    </Grid.ColumnDefinitions>

                                    <Control x:Name="BonusLabel1" Style="{StaticResource A_Style_Control_PostRace_BonusLabelBlock_Fans}"
                                    Grid.Row="0" Grid.Column="0" DataContext="{Binding BonusItems[0]}" />
                                    <Control x:Name="BonusValue1" Style="{StaticResource A_Style_Control_PostRace_BonusValueBlock_Fans}" 
                                    Grid.Row="0" Grid.Column="1" DataContext="{Binding BonusItems[0]}" />

                                    <Control x:Name="BonusLabel2" Style="{StaticResource A_Style_Control_PostRace_BonusLabelBlock_Fans}" 
                                    Grid.Row="1" Grid.Column="0" DataContext="{Binding BonusItems[1]}" />
                                    <Control x:Name="BonusValue2" Style="{StaticResource A_Style_Control_PostRace_BonusValueBlock_Fans}" 
                                    Grid.Row="1" Grid.Column="1" DataContext="{Binding BonusItems[1]}" />

                                    <Control x:Name="BonusLabel3" Style="{StaticResource A_Style_Control_PostRace_BonusLabelBlock_Fans}" 
                                    Grid.Row="2" Grid.Column="0" DataContext="{Binding BonusItems[2]}" />
                                    <Control x:Name="BonusValue3" Style="{StaticResource A_Style_Control_PostRace_BonusValueBlock_Fans}" 
                                    Grid.Row="2" Grid.Column="2" DataContext="{Binding BonusItems[2]}" />

                                    <Control x:Name="BonusLabel4" Style="{StaticResource A_Style_Control_PostRace_BonusLabelBlock_Fans}" 
                                    Grid.Row="3" Grid.Column="0" DataContext="{Binding BonusItems[3]}" />
                                    <Control x:Name="BonusValue4" Style="{StaticResource A_Style_Control_PostRace_BonusValueBlock_Fans}" 
                                    Grid.Row="3" Grid.Column="2" DataContext="{Binding BonusItems[3]}" />
                                </Grid>
                            </Decorator>

                            <StackPanel Orientation="Horizontal" HorizontalAlignment="Left" Margin="0,0,0,8" Panel.ZIndex="10">
                                <Control x:Name="TotalLabel" Style="{StaticResource A_Style_Control_PostRace_TotalLabelBlock_Fans}" />

                                <Grid x:Name="TotalValueAndLevelBar_FlashContainer" Margin="0,0,10,0">
                                    <Decorator x:Name="TotalValueAndLevelBar"
                              Style="{StaticResource A_Style_FrameworkElement_PostRace_TotalLabelBlock_Fans}" Margin="0">
                                        <Grid x:Name="LevelBarFlipContainer" MinWidth="706">
                                            <local:ZPanel.Transform>
                                                <Transform3DGroup>
                                                    <RotateTransform3D CenterY="{StaticResource A_Double_PostRace_HalfLargeBlockHeight}">
                                                        <RotateTransform3D.Rotation>
                                                            <AxisAngleRotation3D Axis="-1,0,0" Angle="0" />
                                                        </RotateTransform3D.Rotation>
                                                    </RotateTransform3D>
                                                </Transform3DGroup>
                                            </local:ZPanel.Transform>
                                            <local:FZMaterial x:Name="MotionBlurExpander"  Margin="-50" Opacity="0" />
                                            <DockPanel x:Name="LevelBarContainer_Front">
                                                <local:FZMaterial Style="{StaticResource A_Style_FZMaterial_AcrylicPanel_Tile_Background}"
                                        ImageSource="/ForzaUI;component/Textures/Anthem/Icons/FansIcon/Fans_256.png"
                                        Width="163"
                                        DockPanel.Dock="Left" />

                                                <Grid>
                                                    <ProgressBar x:Name="PART_LevelBar" Style="{StaticResource A_Style_ProgressBar_FansLevelBar}"
                                                        Value="{Binding DisplayedFanTotal, Converter={StaticResource A_IntToFloatConverter}}" 
                                                        Minimum="{Binding LevelBarMinimum, Converter={StaticResource A_IntToFloatConverter}}" 
                                                        Maximum="{Binding LevelBarMaximum, Converter={StaticResource A_IntToFloatConverter}}" />

                                                    <local:FZTextBlock Style="{StaticResource A_Style_FZTextBlock_PostRace_TotalText}"
                                            Text="{Binding DisplayedFanTotal, Converter={StaticResource A_NumUnitConverter_ShowUnit_0dp}}" 
                                            VerticalAlignment="Center" 
                                            HorizontalAlignment="Right" 
                                            TextAlignment="Right" />
                                                </Grid>
                                            </DockPanel>
                                            <DockPanel x:Name="LevelBarContainer_Back" Visibility="Hidden">
                                                <local:ZPanel.Transform>
                                                    <RotateTransform3D CenterY="{StaticResource A_Double_PostRace_HalfLargeBlockHeight}">
                                                        <RotateTransform3D.Rotation>
                                                            <AxisAngleRotation3D Axis="-1,0,0" Angle="180" />
                                                        </RotateTransform3D.Rotation>
                                                    </RotateTransform3D>
                                                </local:ZPanel.Transform>
                                                <local:FZMaterial Style="{StaticResource A_Style_FZMaterial_AcrylicPanel_Tile_Background}"
                                            ImageSource="/ForzaUI;component/Textures/Anthem/Icons/FansIcon/Fans_256.png"
                                            Width="163"
                                            DockPanel.Dock="Left" />

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

                                                    <local:FZTextBlock Style="{StaticResource A_Style_FZTextBlock_PostRace_TotalText}"
                                               Text="{Binding DisplayedFanTotal, Converter={StaticResource A_NumUnitConverter_ShowUnit_0dp}}" 
                                               VerticalAlignment="Center" 
                                               HorizontalAlignment="Right" 
                                               TextAlignment="Right" />
                                                </Grid>
                                            </DockPanel>

                                            <local:EventFire x:Name="LevelBarEventFire" />
                                            <local:EventFire x:Name="NextObjectiveEventFire" />
                                        </Grid>
                                    </Decorator>

                                    <local:FZMaterial x:Name="ObjectiveCompleteBoxGlow" 
                                              Opacity="0"
                                              Color="#F3FFFFFF"
                                              Preset="{StaticResource A_FZMaterialPresetAdditive}">
                                    </local:FZMaterial>

                                    <local:FZMaterial x:Name="ObjectiveCompleteLargeGlow" 
                                            RenderTransformOrigin="0.5, 0.5"
                                            Opacity="0"
                                            Color="#9AFFFFFF"
                                            Preset="{StaticResource A_FZMaterialPresetAdditive}"
                                            ImageSource="/ForzaUI;component/Textures/Anthem/HUD/SkillsLargeGlow.png"
                                            local:ZPanel.DisableClipping="True">
                                        <local:FZMaterial.RenderTransform>
                                            <TransformGroup>
                                                <ScaleTransform ScaleX="0" ScaleY="0"/>
                                            </TransformGroup>
                                        </local:FZMaterial.RenderTransform>
                                    </local:FZMaterial>
                                </Grid>
                            </StackPanel>


                            <Grid>
                                <Grid.RowDefinitions>
                                    <RowDefinition />
                                    <RowDefinition />
                                    <RowDefinition />
                                    <RowDefinition />
                                </Grid.RowDefinitions>
                                <StackPanel Grid.Row="0" Grid.Column="0" Orientation="Horizontal">
                                    <Grid>
                                        <Control x:Name="RewardLabel1" Style="{StaticResource A_Style_Control_PostRace_RewardLabelBlock}"
                                             DataContext="{Binding RewardItems[0]}" />
                                        <local:FZMaterial x:Name="RewardLabel1Sheen" Style="{StaticResource A_Style_FZMaterial_RewardLabelSheen}" />
                                    </Grid>
                                    <Control x:Name="RewardValue1" Style="{StaticResource A_Style_Control_PostRace_RewardValueBlock}" 
                                         DataContext="{Binding RewardItems[0]}" />
                                </StackPanel>
                                <StackPanel Grid.Row="1" Grid.Column="0" Orientation="Horizontal">
                                    <Grid>
                                        <Control x:Name="RewardLabel2" Style="{StaticResource A_Style_Control_PostRace_RewardLabelBlock}"
                                             DataContext="{Binding RewardItems[1]}" />
                                        <local:FZMaterial x:Name="RewardLabel2Sheen" Style="{StaticResource A_Style_FZMaterial_RewardLabelSheen}" />
                                    </Grid>
                                    <Control x:Name="RewardValue2" Style="{StaticResource A_Style_Control_PostRace_RewardValueBlock}" 
                                         DataContext="{Binding RewardItems[1]}" />
                                </StackPanel>
                                <StackPanel Grid.Row="2" Grid.Column="0" Orientation="Horizontal">
                                    <Grid>
                                        <Control x:Name="RewardLabel3" Style="{StaticResource A_Style_Control_PostRace_RewardLabelBlock}"
                                         DataContext="{Binding RewardItems[2]}" />
                                        <local:FZMaterial x:Name="RewardLabel3Sheen" Style="{StaticResource A_Style_FZMaterial_RewardLabelSheen}" />
                                    </Grid>
                                    <Control x:Name="RewardValue3" Style="{StaticResource A_Style_Control_PostRace_RewardValueBlock}" 
                                         DataContext="{Binding RewardItems[2]}" />
                                </StackPanel>
                                <StackPanel Grid.Row="3" Grid.Column="0" Orientation="Horizontal">
                                    <Grid>
                                        <Control x:Name="RewardLabel4" Style="{StaticResource A_Style_Control_PostRace_RewardLabelBlock}"
                                         DataContext="{Binding RewardItems[3]}" />
                                        <local:FZMaterial x:Name="RewardLabel4Sheen" Style="{StaticResource A_Style_FZMaterial_RewardLabelSheen}" />
                                    </Grid>
                                    <Control x:Name="RewardValue4" Style="{StaticResource A_Style_Control_PostRace_RewardValueBlock}" 
                                         DataContext="{Binding RewardItems[3]}" />
                                </StackPanel>
                                <local:EventFire x:Name="RewardItemsEventFire" />
                                <local:EventFire x:Name="RewardItemsIncreaseEventFire" />
                            </Grid>
                        </StackPanel>
                    </Viewbox>
                </StackPanel>

                <local:AudioEvent x:Name="BonusItemAudio1" />
                <local:AudioEvent x:Name="BonusItemAudio2" />
                <local:AudioEvent x:Name="BonusItemAudio3" />
                <local:AudioEvent x:Name="BonusItemAudio4" />
                <local:AudioEvent x:Name="TotalAudio" />
                <local:AudioEvent x:Name="ObjectiveAudio" />
                <local:AudioEvent x:Name="ObjectiveAchieveAudio" />
                <local:AudioEvent x:Name="ObjectiveIncreaseAudio" />
                <local:AudioEvent x:Name="LevelUpAudio" />

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

                <local:EventFire.FzTriggers>
                    <local:EventFireTrigger Event="ShowBonusItem1" TargetName="BonusLabel1" Storyboard="{StaticResource A_Storyboard_PostRace_RowIn}" />
                    <local:EventFireTrigger Event="ShowBonusItem1" TargetName="BonusValue1" Storyboard="{StaticResource A_Storyboard_PostRace_RowIn}" />
                    <local:EventFireTrigger Event="ShowBonusItem1" TargetName="BonusItemAudio1" Storyboard="{StaticResource A_Storyboard_PlayBonusItemOnAudio}" />
                    <local:EventFireTrigger Event="ShowBonusItem2" TargetName="BonusLabel2" Storyboard="{StaticResource A_Storyboard_PostRace_RowIn}" />
                    <local:EventFireTrigger Event="ShowBonusItem2" TargetName="BonusValue2" Storyboard="{StaticResource A_Storyboard_PostRace_RowIn}" />
                    <local:EventFireTrigger Event="ShowBonusItem2" TargetName="BonusItemAudio2" Storyboard="{StaticResource A_Storyboard_PlayBonusItemOnAudio}" />
                    <local:EventFireTrigger Event="ShowBonusItem3" TargetName="BonusLabel3" Storyboard="{StaticResource A_Storyboard_PostRace_RowIn}" />
                    <local:EventFireTrigger Event="ShowBonusItem3" TargetName="BonusValue3" Storyboard="{StaticResource A_Storyboard_PostRace_RowIn}" />
                    <local:EventFireTrigger Event="ShowBonusItem3" TargetName="BonusItemAudio3" Storyboard="{StaticResource A_Storyboard_PlayBonusItemOnAudio}" />
                    <local:EventFireTrigger Event="ShowBonusItem4" TargetName="BonusLabel4" Storyboard="{StaticResource A_Storyboard_PostRace_RowIn}" />
                    <local:EventFireTrigger Event="ShowBonusItem4" TargetName="BonusValue4" Storyboard="{StaticResource A_Storyboard_PostRace_RowIn}" />
                    <local:EventFireTrigger Event="ShowBonusItem4" TargetName="BonusItemAudio4" Storyboard="{StaticResource A_Storyboard_PlayBonusItemOnAudio}" />
                    <local:EventFireTrigger Event="ShowTotal" TargetName="TotalLabel" Storyboard="{StaticResource A_Storyboard_PostRace_WhooshInFromLeft}" />
                    <local:EventFireTrigger Event="ShowTotal" TargetName="TotalValueAndLevelBar" Storyboard="{StaticResource A_Storyboard_PostRace_WhooshInFromRight_Slide}" />
                    <local:EventFireTrigger Event="ShowTotal" TargetName="TotalAudio" Storyboard="{StaticResource A_Storyboard_PlayFansBarOnAudio}" />

                    <local:EventFireTrigger Event="LevelUp" TargetName="LevelBarFlipContainer" Storyboard="{StaticResource A_Storyboard_PostRace_LevelUpFlipBar}" />
                    <local:EventFireTrigger Event="LevelUp" TargetName="TotalValueAndLevelBar_FlashContainer" Storyboard="{StaticResource A_Storyboard_PostRace_LevelUpFlash}" />
                    <local:EventFireTrigger Event="LevelUp" TargetName="LevelUpAudio" Storyboard="{StaticResource A_Storyboard_PlayObjectiveReachedAudio}" />

                    <local:EventFireTrigger Event="FinalLevelUp" TargetName="LevelBarFlipContainer" Storyboard="{StaticResource A_Storyboard_PostRace_FinalLevelUp}" />
                    <local:EventFireTrigger Event="FinalLevelUp" TargetName="TotalValueAndLevelBar_FlashContainer" Storyboard="{StaticResource A_Storyboard_PostRace_LevelUpFlash}" />
                    <local:EventFireTrigger Event="FinalLevelUp" TargetName="LevelUpAudio" Storyboard="{StaticResource A_Storyboard_PlayFinalObjectiveReachedAudio}" />

                    <local:EventFireTrigger Event="ShowRewardItem1" TargetName="RewardLabel1" Storyboard="{StaticResource A_Storyboard_PostRace_RowIn}" />
                    <local:EventFireTrigger Event="ShowRewardItem1" TargetName="RewardValue1" Storyboard="{StaticResource A_Storyboard_PostRace_RowIn}" />
                    <local:EventFireTrigger Event="ShowRewardItem1" TargetName="ObjectiveAudio" Storyboard="{StaticResource A_Storyboard_PlayObjectiveOnAudio}" />
                    <local:EventFireTrigger Event="ShowRewardItem2" TargetName="RewardLabel2" Storyboard="{StaticResource A_Storyboard_PostRace_RowIn}" />
                    <local:EventFireTrigger Event="ShowRewardItem2" TargetName="RewardValue2" Storyboard="{StaticResource A_Storyboard_PostRace_RowIn}" />
                    <local:EventFireTrigger Event="ShowRewardItem2" TargetName="ObjectiveAudio" Storyboard="{StaticResource A_Storyboard_PlayObjectiveOnAudio}" />
                    <local:EventFireTrigger Event="ShowRewardItem3" TargetName="RewardLabel3" Storyboard="{StaticResource A_Storyboard_PostRace_RowIn}" />
                    <local:EventFireTrigger Event="ShowRewardItem3" TargetName="RewardValue3" Storyboard="{StaticResource A_Storyboard_PostRace_RowIn}" />
                    <local:EventFireTrigger Event="ShowRewardItem3" TargetName="ObjectiveAudio" Storyboard="{StaticResource A_Storyboard_PlayObjectiveOnAudio}" />
                    <local:EventFireTrigger Event="ShowRewardItem4" TargetName="RewardLabel4" Storyboard="{StaticResource A_Storyboard_PostRace_RowIn}" />
                    <local:EventFireTrigger Event="ShowRewardItem4" TargetName="RewardValue4" Storyboard="{StaticResource A_Storyboard_PostRace_RowIn}" />
                    <local:EventFireTrigger Event="ShowRewardItem4" TargetName="ObjectiveAudio" Storyboard="{StaticResource A_Storyboard_PlayObjectiveOnAudio}" />

                    <local:EventFireTrigger Event="AchieveRewardItem1" TargetName="RewardLabel1" Storyboard="{StaticResource A_Storyboard_PostRace_LevelUpFlipObjective}" />
                    <local:EventFireTrigger Event="AchieveRewardItem1" TargetName="RewardValue1" Storyboard="{StaticResource A_Storyboard_PostRace_LevelUpFlipObjective}" />
                    <local:EventFireTrigger Event="AchieveRewardItem1" TargetName="RewardValue1" Storyboard="{StaticResource A_Storyboard_PostRace_RewardValue1AchieveFlip}" />
                    <local:EventFireTrigger Event="AchieveRewardItem1" TargetName="RewardLabel1Sheen" Storyboard="{StaticResource A_Storyboard_PostRace_Sheen}" />
                    <local:EventFireTrigger Event="AchieveRewardItem1" TargetName="ObjectiveAchieveAudio" Storyboard="{StaticResource A_Storyboard_PlayObjectiveAchieveAudio}" />
                    <local:EventFireTrigger Event="AchieveRewardItem2" TargetName="RewardLabel2" Storyboard="{StaticResource A_Storyboard_PostRace_LevelUpFlipObjective}" />
                    <local:EventFireTrigger Event="AchieveRewardItem2" TargetName="RewardValue2" Storyboard="{StaticResource A_Storyboard_PostRace_LevelUpFlipObjective}" />
                    <local:EventFireTrigger Event="AchieveRewardItem2" TargetName="RewardLabel2" Storyboard="{StaticResource A_Storyboard_PostRace_RewardValue2AchieveFlip}" />
                    <local:EventFireTrigger Event="AchieveRewardItem2" TargetName="RewardLabel2Sheen" Storyboard="{StaticResource A_Storyboard_PostRace_Sheen}" />
                    <local:EventFireTrigger Event="AchieveRewardItem2" TargetName="ObjectiveAchieveAudio" Storyboard="{StaticResource A_Storyboard_PlayObjectiveAchieveAudio}" />
                    <local:EventFireTrigger Event="AchieveRewardItem3" TargetName="RewardLabel3" Storyboard="{StaticResource A_Storyboard_PostRace_LevelUpFlipObjective}" />
                    <local:EventFireTrigger Event="AchieveRewardItem3" TargetName="RewardValue3" Storyboard="{StaticResource A_Storyboard_PostRace_LevelUpFlipObjective}" />
                    <local:EventFireTrigger Event="AchieveRewardItem3" TargetName="RewardValue3" Storyboard="{StaticResource A_Storyboard_PostRace_RewardValue3AchieveFlip}" />
                    <local:EventFireTrigger Event="AchieveRewardItem3" TargetName="RewardLabel3Sheen" Storyboard="{StaticResource A_Storyboard_PostRace_Sheen}" />
                    <local:EventFireTrigger Event="AchieveRewardItem3" TargetName="ObjectiveAchieveAudio" Storyboard="{StaticResource A_Storyboard_PlayObjectiveAchieveAudio}" />

                    <local:EventFireTrigger Event="IncreaseRewardItem1" TargetName="RewardValue1" Storyboard="{StaticResource A_Storyboard_PostRace_RewardValueFlipCommon}" />
                    <local:EventFireTrigger Event="IncreaseRewardItem1" TargetName="RewardValue1" Storyboard="{StaticResource A_Storyboard_PostRace_RewardValue1IncreaseFlip}" />
                    <local:EventFireTrigger Event="IncreaseRewardItem1" TargetName="RewardLabel1Sheen" Storyboard="{StaticResource A_Storyboard_PostRace_Sheen}" />
                    <local:EventFireTrigger Event="IncreaseRewardItem1" TargetName="ObjectiveIncreaseAudio" Storyboard="{StaticResource A_Storyboard_PlayObjectiveIncreaseAudio}" />
                    <local:EventFireTrigger Event="IncreaseRewardItem2" TargetName="RewardValue2" Storyboard="{StaticResource A_Storyboard_PostRace_RewardValueFlipCommon}" />
                    <local:EventFireTrigger Event="IncreaseRewardItem2" TargetName="RewardValue2" Storyboard="{StaticResource A_Storyboard_PostRace_RewardValue2IncreaseFlip}" />
                    <local:EventFireTrigger Event="IncreaseRewardItem2" TargetName="RewardLabel2Sheen" Storyboard="{StaticResource A_Storyboard_PostRace_Sheen}" />
                    <local:EventFireTrigger Event="IncreaseRewardItem2" TargetName="ObjectiveIncreaseAudio" Storyboard="{StaticResource A_Storyboard_PlayObjectiveIncreaseAudio}" />
                    <local:EventFireTrigger Event="IncreaseRewardItem3" TargetName="RewardValue3" Storyboard="{StaticResource A_Storyboard_PostRace_RewardValueFlipCommon}" />
                    <local:EventFireTrigger Event="IncreaseRewardItem3" TargetName="RewardValue3" Storyboard="{StaticResource A_Storyboard_PostRace_RewardValue3IncreaseFlip}" />
                    <local:EventFireTrigger Event="IncreaseRewardItem3" TargetName="RewardLabel3Sheen" Storyboard="{StaticResource A_Storyboard_PostRace_Sheen}" />
                    <local:EventFireTrigger Event="IncreaseRewardItem3" TargetName="ObjectiveIncreaseAudio" Storyboard="{StaticResource A_Storyboard_PlayObjectiveIncreaseAudio}" />

                    <local:EventFireTrigger Event="IncreaseRewardItemWithLabelChange1" TargetName="RewardLabel1" Storyboard="{StaticResource A_Storyboard_PostRace_LevelUpFlipObjective}" />
                    <local:EventFireTrigger Event="IncreaseRewardItemWithLabelChange1" TargetName="RewardValue1" Storyboard="{StaticResource A_Storyboard_PostRace_LevelUpFlipObjective}" />
                    <local:EventFireTrigger Event="IncreaseRewardItemWithLabelChange1" TargetName="RewardValue1" Storyboard="{StaticResource A_Storyboard_PostRace_RewardValue1AchieveFlip}" />
                    <local:EventFireTrigger Event="IncreaseRewardItemWithLabelChange1" TargetName="RewardLabel1Sheen" Storyboard="{StaticResource A_Storyboard_PostRace_Sheen}" />
                    <local:EventFireTrigger Event="IncreaseRewardItemWithLabelChange1" TargetName="ObjectiveIncreaseAudio" Storyboard="{StaticResource A_Storyboard_PlayObjectiveIncreaseAudio}" />
                    <local:EventFireTrigger Event="IncreaseRewardItemWithLabelChange2" TargetName="RewardLabel2" Storyboard="{StaticResource A_Storyboard_PostRace_LevelUpFlipObjective}" />
                    <local:EventFireTrigger Event="IncreaseRewardItemWithLabelChange2" TargetName="RewardValue2" Storyboard="{StaticResource A_Storyboard_PostRace_LevelUpFlipObjective}" />
                    <local:EventFireTrigger Event="IncreaseRewardItemWithLabelChange2" TargetName="RewardValue2" Storyboard="{StaticResource A_Storyboard_PostRace_RewardValue2AchieveFlip}" />
                    <local:EventFireTrigger Event="IncreaseRewardItemWithLabelChange2" TargetName="RewardLabel2Sheen" Storyboard="{StaticResource A_Storyboard_PostRace_Sheen}" />
                    <local:EventFireTrigger Event="IncreaseRewardItemWithLabelChange2" TargetName="ObjectiveIncreaseAudio" Storyboard="{StaticResource A_Storyboard_PlayObjectiveIncreaseAudio}" />
                    <local:EventFireTrigger Event="IncreaseRewardItemWithLabelChange3" TargetName="RewardLabel3" Storyboard="{StaticResource A_Storyboard_PostRace_LevelUpFlipObjective}" />
                    <local:EventFireTrigger Event="IncreaseRewardItemWithLabelChange3" TargetName="RewardValue3" Storyboard="{StaticResource A_Storyboard_PostRace_LevelUpFlipObjective}" />
                    <local:EventFireTrigger Event="IncreaseRewardItemWithLabelChange3" TargetName="RewardValue3" Storyboard="{StaticResource A_Storyboard_PostRace_RewardValue3AchieveFlip}" />
                    <local:EventFireTrigger Event="IncreaseRewardItemWithLabelChange3" TargetName="RewardLabel3Sheen" Storyboard="{StaticResource A_Storyboard_PostRace_Sheen}" />
                    <local:EventFireTrigger Event="IncreaseRewardItemWithLabelChange3" TargetName="ObjectiveIncreaseAudio" Storyboard="{StaticResource A_Storyboard_PlayObjectiveIncreaseAudio}" />

                    <local:EventFireTrigger Event="UpdateRewardItemObjective2" TargetName="RewardLabel2" Storyboard="{StaticResource A_Storyboard_PostRace_RewardValueFlipObjective}" />
                    <local:EventFireTrigger Event="UpdateRewardItemObjective2" TargetName="RewardValue2" Storyboard="{StaticResource A_Storyboard_PostRace_RewardValueFlipObjective}" />
                    <local:EventFireTrigger Event="UpdateRewardItemObjective2" TargetName="RewardValue2" Storyboard="{StaticResource A_Storyboard_PostRace_RewardValue2ObjectiveFlip}" />
                    <local:EventFireTrigger Event="UpdateRewardItemObjective2" TargetName="ObjectiveAudio" Storyboard="{StaticResource A_Storyboard_PlayObjectiveUpdateAudio}" />
                    <local:EventFireTrigger Event="UpdateRewardItemObjective3" TargetName="RewardLabel3" Storyboard="{StaticResource A_Storyboard_PostRace_RewardValueFlipObjective}" />
                    <local:EventFireTrigger Event="UpdateRewardItemObjective3" TargetName="RewardValue3" Storyboard="{StaticResource A_Storyboard_PostRace_RewardValueFlipObjective}" />
                    <local:EventFireTrigger Event="UpdateRewardItemObjective3" TargetName="RewardValue3" Storyboard="{StaticResource A_Storyboard_PostRace_RewardValue3ObjectiveFlip}" />
                    <local:EventFireTrigger Event="UpdateRewardItemObjective3" TargetName="ObjectiveAudio" Storyboard="{StaticResource A_Storyboard_PlayObjectiveUpdateAudio}" />
                    <local:EventFireTrigger Event="UpdateRewardItemObjective4" TargetName="RewardLabel4" Storyboard="{StaticResource A_Storyboard_PostRace_RewardValueFlipObjective}" />
                    <local:EventFireTrigger Event="UpdateRewardItemObjective4" TargetName="RewardValue4" Storyboard="{StaticResource A_Storyboard_PostRace_RewardValueFlipObjective}" />
                    <local:EventFireTrigger Event="UpdateRewardItemObjective4" TargetName="RewardValue4" Storyboard="{StaticResource A_Storyboard_PostRace_RewardValue4ObjectiveFlip}" />
                    <local:EventFireTrigger Event="UpdateRewardItemObjective4" TargetName="ObjectiveAudio" Storyboard="{StaticResource A_Storyboard_PlayObjectiveUpdateAudio}" />

                    <local:EventFireTrigger Event="HideRewardItemObjective2" TargetName="RewardLabel2" Storyboard="{StaticResource A_Storyboard_PostRace_RewardValueHideObjective}" />
                    <local:EventFireTrigger Event="HideRewardItemObjective2" TargetName="RewardValue2" Storyboard="{StaticResource A_Storyboard_PostRace_RewardValueHideObjective}" />
                    <local:EventFireTrigger Event="HideRewardItemObjective3" TargetName="RewardLabel3" Storyboard="{StaticResource A_Storyboard_PostRace_RewardValueHideObjective}" />
                    <local:EventFireTrigger Event="HideRewardItemObjective3" TargetName="RewardValue3" Storyboard="{StaticResource A_Storyboard_PostRace_RewardValueHideObjective}" />
                    <local:EventFireTrigger Event="HideRewardItemObjective4" TargetName="RewardLabel4" Storyboard="{StaticResource A_Storyboard_PostRace_RewardValueHideObjective}" />
                    <local:EventFireTrigger Event="HideRewardItemObjective4" TargetName="RewardValue4" Storyboard="{StaticResource A_Storyboard_PostRace_RewardValueHideObjective}" />

                    <local:EventFireTrigger Event="SkipIntro" TargetName="BonusLabel1" Storyboard="{StaticResource A_Storyboard_PostRace_SkipIntro}" />
                    <local:EventFireTrigger Event="SkipIntro" TargetName="BonusValue1" Storyboard="{StaticResource A_Storyboard_PostRace_SkipIntro}" />
                    <local:EventFireTrigger Event="SkipIntro" TargetName="BonusLabel2" Storyboard="{StaticResource A_Storyboard_PostRace_SkipIntro}" />
                    <local:EventFireTrigger Event="SkipIntro" TargetName="BonusValue2" Storyboard="{StaticResource A_Storyboard_PostRace_SkipIntro}" />
                    <local:EventFireTrigger Event="SkipIntro" TargetName="BonusLabel3" Storyboard="{StaticResource A_Storyboard_PostRace_SkipIntro}" />
                    <local:EventFireTrigger Event="SkipIntro" TargetName="BonusValue3" Storyboard="{StaticResource A_Storyboard_PostRace_SkipIntro}" />
                    <local:EventFireTrigger Event="SkipIntro" TargetName="BonusLabel4" Storyboard="{StaticResource A_Storyboard_PostRace_SkipIntro}" />
                    <local:EventFireTrigger Event="SkipIntro" TargetName="BonusValue4" Storyboard="{StaticResource A_Storyboard_PostRace_SkipIntro}" />
                    <local:EventFireTrigger Event="SkipIntro" TargetName="TotalLabel" Storyboard="{StaticResource A_Storyboard_PostRace_SkipIntro}" />
                    <local:EventFireTrigger Event="SkipIntro" TargetName="TotalValueAndLevelBar" Storyboard="{StaticResource A_Storyboard_PostRace_SkipIntro}" />
                    <local:EventFireTrigger Event="SkipIntro" TargetName="RewardLabel1" Storyboard="{StaticResource A_Storyboard_PostRace_SkipIntro}" />
                    <local:EventFireTrigger Event="SkipIntro" TargetName="RewardValue1" Storyboard="{StaticResource A_Storyboard_PostRace_SkipIntro}" />
                    <local:EventFireTrigger Event="SkipIntro" TargetName="RewardLabel2" Storyboard="{StaticResource A_Storyboard_PostRace_SkipIntro}" />
                    <local:EventFireTrigger Event="SkipIntro" TargetName="RewardValue2" Storyboard="{StaticResource A_Storyboard_PostRace_SkipIntro}" />
                    <local:EventFireTrigger Event="SkipIntro" TargetName="RewardLabel3" Storyboard="{StaticResource A_Storyboard_PostRace_SkipIntro}" />
                    <local:EventFireTrigger Event="SkipIntro" TargetName="RewardValue3" Storyboard="{StaticResource A_Storyboard_PostRace_SkipIntro}" />
                    <local:EventFireTrigger Event="SkipIntro" TargetName="RewardLabel4" Storyboard="{StaticResource A_Storyboard_PostRace_SkipIntro}" />
                    <local:EventFireTrigger Event="SkipIntro" TargetName="RewardValue4" Storyboard="{StaticResource A_Storyboard_PostRace_SkipIntro}" />
                </local:EventFire.FzTriggers>
            </Grid>
        </Decorator>
    </Grid>
</Page>
