<Page x:Class="ForzaUI.Scenes.Anthem.A_CharacterIntroScene"
      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:local="clr-namespace:ForzaUI"
      mc:Ignorable="d"
      Style="{StaticResource A_Style_Page_Generic}">

    <Page.Resources>
        <Style x:Key="A_Style_FZTextBlock_Normal" TargetType="{x:Type local:FZTextBlock}" BasedOn="{StaticResource A_Style_FZTextBlock_HorizonB}">
            <Setter Property="Color" Value="{StaticResource A_Color_White}"/>
            <Setter Property="FontSize"
                    Value="68" />
        </Style>
        
        <Style x:Key="A_Style_FZRun_Bold" TargetType="{x:Type local:FZRun}">
            <Setter Property="FontFamily" Value="Horizon_A"/>
        </Style>

        <Style x:Key="A_Style_ContentControl_Slide"
                TargetType="{x:Type ContentControl}"
                BasedOn="{StaticResource A_Style_ContentControl_AnimatedTagSlideFromLeft}">
            <Setter Property="Opacity"
                    Value="1" />
            <Setter Property="local:UIPageTransitionManager.TransitionIndex"
                    Value="0" />
            <Style.Resources>
                <local:UIStoryboard x:Key="transition_in">
                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Tag"
                                                    Storyboard.TargetName="{x:Null}">
                        <DiscreteDoubleKeyFrame KeyTime="0:0:0"
                                                Value="0.15" />
                        <DiscreteDoubleKeyFrame KeyTime="0:0:0.0"
                                                Value="0.15" />
                        <EasingDoubleKeyFrame KeyTime="0:0:0.3"
                                                Value="0.0">
                            <EasingDoubleKeyFrame.EasingFunction>
                                <CubicEase EasingMode="EaseOut" />
                            </EasingDoubleKeyFrame.EasingFunction>
                        </EasingDoubleKeyFrame>
                        <DiscreteDoubleKeyFrame KeyTime="0:0:5.2"
                                                Value="0.0" />
                        <EasingDoubleKeyFrame KeyTime="0:0:5.5"
                                              Value="1" />
                    </DoubleAnimationUsingKeyFrames>
                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)"
                                                    Storyboard.TargetName="{x:Null}">
                        <DiscreteDoubleKeyFrame KeyTime="0:0:0.0"
                                                Value="0.0" />
                        <DiscreteDoubleKeyFrame KeyTime="0:0:0.0"
                                                Value="0.0" />
                        <EasingDoubleKeyFrame KeyTime="0:0:0.3"
                                                Value="1.0" />
                        <DiscreteDoubleKeyFrame KeyTime="0:0:5.2"
                                                Value="1.0" />
                        <EasingDoubleKeyFrame KeyTime="0:0:5.5"
                                              Value="0" />
                    </DoubleAnimationUsingKeyFrames>
                </local:UIStoryboard>
                <local:UIStoryboard x:Key="transition_out_forward"
                                    DurationOverride="0:0:0.3">
                </local:UIStoryboard>
                <local:UIStoryboard x:Key="transition_out_back"
                                    DurationOverride="0:0:0.3">
                </local:UIStoryboard>
            </Style.Resources>
        </Style>
        
        <DropShadowEffect x:Key="A_DropShadowEffect_Default"
                            Color="{StaticResource A_Color_DropShadow}"
                            BlurRadius="0"
                            ShadowDepth="3" />
    </Page.Resources>

    <local:UIPageTransitionManager.TransitionManager>
        <local:UIPageTransitionManager Preset="{StaticResource A_UIPageTransitionManagerPreset_NoAudio}" />
    </local:UIPageTransitionManager.TransitionManager>

    <Border Style="{StaticResource A_Style_FrameworkElement_LayoutRoot}">
        <Decorator Effect="{StaticResource A_DropShadowEffect_Default}">
            <ContentControl Style="{StaticResource A_Style_ContentControl_Slide}">
                <Grid>
                    <local:FZMaterial Preset="{StaticResource A_FZMaterialPresetScreenShadow_ARUI}" />

                    <StackPanel HorizontalAlignment="Left"
                                VerticalAlignment="Top"
                                Margin="85,662,0,0">
                        <local:FZTextBlock VerticalAlignment="Bottom"
                                           Style="{StaticResource A_Style_FZTextBlock_Normal}"
                                           Text="{Binding UserProfile.FormattedGamertag, RelativeSource={RelativeSource FindAncestor, AncestorType=Page}, Converter={StaticResource A_StringToUpper}}"
                                           FontFamily="Horizon_A" />
                        <Decorator Height="10" />
                        <StackPanel Orientation="Horizontal">
                            <local:FZTextBlock VerticalAlignment="Top"
                                               Text="{local:Loc MyProfile.IDS_CharacterIntroScene_FestivalBoss}"
                                               Style="{StaticResource A_Style_FZTextBlock_Normal}" />
                        </StackPanel>

                    </StackPanel>
                </Grid>
            </ContentControl>
        </Decorator>
    </Border>
</Page>
