<Page HorizontalAlignment="Center"
      RenderTransformOrigin="0.5,0.5"
      VerticalAlignment="Center"
      mc:Ignorable="d"
      x:Class="ForzaUI.Scenes.Anthem.AR_Billboard"
      x:Name="page"
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:ForzaUI="clr-namespace:ForzaUI;assembly="
      xmlns:System="clr-namespace:System;assembly=mscorlib"
      xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
      xmlns:local="clr-namespace:ForzaUI;assembly="
      xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      Style="{StaticResource A_PageStyle_AR_Activation}">
    <Page.Resources>
        <QuarticEase x:Key="A_EasingFunction_EaseInOut" EasingMode="EaseInOut" />
        <QuarticEase x:Key="A_EasingFunction_EaseOut" EasingMode="EaseOut" />
        <QuarticEase x:Key="A_EasingFunction_EaseIn" EasingMode="EaseIn" />
        <local:UIStoryboard DurationOverride="0:0:2.5"
                            x:Key="PART_A_Storyboard_AR_Appear">
            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="TopIconContainer"
                                           Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)">
                <EasingDoubleKeyFrame KeyTime="0"
                                      Value="0.01" />
                <EasingDoubleKeyFrame KeyTime="0:0:0.6"
                                      Value="1"
                                      EasingFunction="{StaticResource A_EasingFunction_EaseInOut}"/>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="TopIconContainer"
                                           Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)">
                <EasingDoubleKeyFrame KeyTime="0"
                                      Value="0.01" />
                <EasingDoubleKeyFrame KeyTime="0:0:0.6"
                                      Value="1"
                                      EasingFunction="{StaticResource A_EasingFunction_EaseInOut}"/>
            </DoubleAnimationUsingKeyFrames>
        </local:UIStoryboard>
        <local:UIStoryboard x:Key="PART_A_Storyboard_AR_Abandon"
                            DurationOverride="0:0:0.3">
            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="page"
                                           Storyboard.TargetProperty="(UIElement.Opacity)">
                <EasingDoubleKeyFrame KeyTime="0:0:1"
                                      Value="0" />
            </DoubleAnimationUsingKeyFrames>
            <BooleanAnimationUsingKeyFrames Storyboard.TargetName="page"
                                            Storyboard.TargetProperty="DataContext.Complete">
                <DiscreteBooleanKeyFrame KeyTime="0:0:1"
                                         Value="True" />
            </BooleanAnimationUsingKeyFrames>
        </local:UIStoryboard>
    </Page.Resources>
    <Page.LayoutTransform>
        <TransformGroup>
            <ScaleTransform />
            <SkewTransform />
            <RotateTransform />
            <TranslateTransform />
        </TransformGroup>
    </Page.LayoutTransform>
    <Grid HorizontalAlignment="Center"
          VerticalAlignment="Center"
          Height="1080">

        <Decorator HorizontalAlignment="Center" 
                   VerticalAlignment="Center" 
                   Grid.Row="0" 
                   RenderTransformOrigin="0.5,0.5"
                   x:Name="TopIconContainer">
            <Decorator.RenderTransform>
                <TransformGroup>
                    <ScaleTransform/>
                    <SkewTransform/>
                    <TranslateTransform/>
                    <RotateTransform/>
                </TransformGroup>
            </Decorator.RenderTransform>
            <local:FZMaterial Width="1080" Height="1080" ImageSource="{Binding BillboardImage}" />
        </Decorator>
    </Grid>
</Page>
