<Page xmlns:local="clr-namespace:ForzaUI"
      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"
      xmlns:System="clr-namespace:System;assembly=mscorlib"
      x:Class="ForzaUI.A_PostRaceCreditsReward"
      mc:Ignorable="d"
      Style="{StaticResource A_Style_Page_Generic}"
      DataContext="{Binding RelativeSource={RelativeSource Self}}">

    <Page.Resources>
        <ResourceDictionary>

            <CircleEase x:Key="A_EasingFunction_Circle_EaseOut"
                        EasingMode="EaseOut" />

            <Storyboard x:Key="FullScreenFlashStoryboard">
                <DoubleAnimationUsingKeyFrames Storyboard.TargetName="FullScreenFlashMaterial"
                                               Storyboard.TargetProperty="(FrameworkElement.Opacity)">
                    <DiscreteDoubleKeyFrame KeyTime="0:0:0.0"
                                            Value="0" />
                    <EasingDoubleKeyFrame KeyTime="0:0:0.1"
                                          Value="1" />
                    <EasingDoubleKeyFrame KeyTime="0:0:0.8"
                                          Value="0"/>
                    <DiscreteDoubleKeyFrame KeyTime="0:0:1.0"
                                            Value="0" />
                </DoubleAnimationUsingKeyFrames>
                <DoubleAnimationUsingKeyFrames Storyboard.TargetName="FullScreenFlashMaterial"
                                               Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)">
                    <DiscreteDoubleKeyFrame KeyTime="0:0:0.0"
                                            Value="0" />
                    <EasingDoubleKeyFrame KeyTime="0:0:0.1"
                                          Value="0.8" />
                    <EasingDoubleKeyFrame KeyTime="0:0:0.8"
                                          Value="6"
                                          EasingFunction="{StaticResource A_EasingFunction_Circle_EaseOut}" />
                    <DiscreteDoubleKeyFrame KeyTime="0:0:1.0"
                                            Value="0" />
                </DoubleAnimationUsingKeyFrames>
                <DoubleAnimationUsingKeyFrames Storyboard.TargetName="FullScreenFlashMaterial"
                                               Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)">
                    <DiscreteDoubleKeyFrame KeyTime="0:0:0.0"
                                            Value="0" />
                    <EasingDoubleKeyFrame KeyTime="0:0:0.1"
                                          Value="0.8" />
                    <EasingDoubleKeyFrame KeyTime="0:0:0.8"
                                          Value="6"
                                          EasingFunction="{StaticResource A_EasingFunction_Circle_EaseOut}" />
                    <DiscreteDoubleKeyFrame KeyTime="0:0:1.0"
                                            Value="0" />
                </DoubleAnimationUsingKeyFrames>
                <StringAnimationUsingKeyFrames Storyboard.TargetName="FlashAudioEvent"
                                               Storyboard.TargetProperty="(local:AudioEvent.SoundName)">
                    <DiscreteStringKeyFrame KeyTime="0:0:0.0"
                                            Value="" />
                    <DiscreteStringKeyFrame KeyTime="0:0:0.01"
                                            Value="/Master/UI/ChampionshipWrapUp/HZ2_SFX_HUD_ChampionshipWrapUp_RewardFlash_01" />
                </StringAnimationUsingKeyFrames>
            </Storyboard>

        </ResourceDictionary>
    </Page.Resources>

    <Grid Style="{StaticResource A_Style_FrameworkElement_LayoutRoot}">
        <local:FZMaterial Preset="{StaticResource A_FZMaterialPresetScreenShadow_ARUI}" />

        <ContentControl x:Name="BottomBar" Style="{StaticResource A_Style_ButtonBar}">
            <ContentControl x:Name="DefaultHelpPanel"
                            local:ControllerButtonPanel.ADescription="{local:Loc HelpButtons.IDS_Continue}"
                            local:ControllerButtonPanel.XDescription="{local:Loc HelpButtons.IDS_Restart}"
                            local:ControllerButtonPanel.YDescription="{local:Loc HelpButtons.IDS_WatchReplay}"
                            Style="{StaticResource A_Style_ContentControl_DefaultButtonBar}" />
        </ContentControl>

        <local:FZMaterial x:Name="FullScreenFlashMaterial"
                          ImageSource="/ForzaUI;component/Textures/Anthem/HUD/SkillsLargeGlow.png"
                          RenderTransformOrigin="0.5,0.5"
                          Width="1080"
                          Height="1080"
                          VerticalAlignment="Center"
                          HorizontalAlignment="Center"
                          Opacity="0"
                          Preset="{StaticResource A_FZMaterialPresetAdditive}">
            <local:FZMaterial.RenderTransform>
                <TransformGroup>
                    <ScaleTransform />
                    <SkewTransform />
                    <RotateTransform />
                    <TranslateTransform />
                </TransformGroup>
            </local:FZMaterial.RenderTransform>
        </local:FZMaterial>

        <local:AudioEvent x:Name="FlashAudioEvent" />
    </Grid>
</Page>
