<Page HorizontalAlignment="Center"
      RenderTransformOrigin="0.5,0.5"
      VerticalAlignment="Stretch"
      mc:Ignorable="d"
      x:Name="page"
      x:Class="ForzaUI.Scenes.Anthem.AR_EliminatorEncounterActivation"
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
      xmlns:local="clr-namespace:ForzaUI"
      xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
    <Page.Resources>
        <Style BasedOn="{StaticResource A_Style_FZTextBlock_Title}"
               TargetType="local:FZTextBlock"
               x:Key="A_Style_FZTextBlock_InstructionText">
            <Setter Property="FontSize"
                    Value="46" />
            <Setter Property="Color"
                    Value="{StaticResource A_Color_SubHeader_Text}" />
        </Style>
        <Storyboard x:Key="TransitionIn" />
        <Storyboard x:Key="Focus">
            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="Root"
                                           Storyboard.TargetProperty="(UIElement.Opacity)">
                <DiscreteDoubleKeyFrame KeyTime="0:0:0"
                                        Value="1" />
            </DoubleAnimationUsingKeyFrames>
        </Storyboard>
        <Storyboard x:Key="Blur">
            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="Root"
                                           Storyboard.TargetProperty="(UIElement.Opacity)">
                <EasingDoubleKeyFrame KeyTime="0:0:0.18"
                                      Value="0">
                    <EasingDoubleKeyFrame.EasingFunction>
                        <CubicEase EasingMode="EaseIn" />
                    </EasingDoubleKeyFrame.EasingFunction>
                </EasingDoubleKeyFrame>
            </DoubleAnimationUsingKeyFrames>
        </Storyboard>
        <Storyboard x:Key="Activated">
            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="Root"
                                           Storyboard.TargetProperty="(UIElement.Opacity)">
                <EasingDoubleKeyFrame KeyTime="0:0:0.18"
                                      Value="0">
                    <EasingDoubleKeyFrame.EasingFunction>
                        <CubicEase EasingMode="EaseIn" />
                    </EasingDoubleKeyFrame.EasingFunction>
                </EasingDoubleKeyFrame>
            </DoubleAnimationUsingKeyFrames>
        </Storyboard>
        <Storyboard x:Key="A_Storyboard_AR_Abandon">
            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="Root"
                                           Storyboard.TargetProperty="(UIElement.Opacity)">
                <EasingDoubleKeyFrame KeyTime="0:0:0.18"
                                      Value="0">
                    <EasingDoubleKeyFrame.EasingFunction>
                        <CubicEase EasingMode="EaseIn" />
                    </EasingDoubleKeyFrame.EasingFunction>
                </EasingDoubleKeyFrame>
            </DoubleAnimationUsingKeyFrames>
            <BooleanAnimationUsingKeyFrames Storyboard.TargetName="page"
                                            Storyboard.TargetProperty="DataContext.Complete">
                <DiscreteBooleanKeyFrame KeyTime="0:0:0.18"
                                         Value="True" />
            </BooleanAnimationUsingKeyFrames>
        </Storyboard>

        <DropShadowEffect x:Key="A_Effect_ActivationTextDropShadow"
                          Color="{StaticResource A_Color_DropShadow}"
                          BlurRadius="0"
                          ShadowDepth="4" />

        <Style x:Key="A_Style_ControllerButtonControl_ActivationButton_EventType"
           BasedOn="{StaticResource A_Style_ControllerButtonControl_ActivationButton}"
           TargetType="local:ControllerButtonControl">
            <Setter Property="InputOverride" Value="{Binding ActivateCommand}" />
        </Style>

    </Page.Resources>
    <Page.Triggers>
        <EventTrigger RoutedEvent="FrameworkElement.Loaded">
            <BeginStoryboard Storyboard="{StaticResource Focus}" />
            <BeginStoryboard Storyboard="{StaticResource Blur}" />
        </EventTrigger>
    </Page.Triggers>
    <UniformGrid Rows="2">
        <Decorator />
        <StackPanel Orientation="Vertical"
                    VerticalAlignment="Top"
                    HorizontalAlignment="Center">
            <Decorator Margin="0,-15,0,0"
                            x:Name="Root">
                <StackPanel Margin="10,20"
                            Orientation="Horizontal">
                    <local:ControllerButtonControl Height="42"
                                                   VerticalAlignment="Center"
                                                   UseLargeIcon="True"
                                                   Margin="-4,0,0,0"
                                                   Style="{StaticResource A_Style_ControllerButtonControl_ActivationButton_EventType}" />
                    <local:FZTextBlock Margin="10,0,0,3"
                                       TextAlignment="Center"
                                       VerticalAlignment="Center"
                                       Effect="{StaticResource A_Effect_ActivationTextDropShadow}">
                        <FrameworkElement.Style>
                            <Style TargetType="local:FZTextBlock"
                                   BasedOn="{StaticResource A_Style_FZTextBlock_InstructionText}">
                                <Setter Property="Text"
                                        Value="{Binding RaceDifficultyText}" />
                                <Style.Triggers>
                                    <DataTrigger Binding="{Binding RaceDifficultyText}"
                                                 Value="{x:Null}">
                                        <Setter Property="Text"
                                                Value="{local:Loc RaceEncounters.IDS_Interact_Prompt}" />
                                    </DataTrigger>
                                </Style.Triggers>
                            </Style>
                        </FrameworkElement.Style>
                    </local:FZTextBlock>
                </StackPanel>
            </Decorator>
        </StackPanel>
    </UniformGrid>
</Page>
