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

        <local:OffsetKeyTime x:Key="A_KeyTime_Announcement_Begin"
                             KeyTime="0:0:0" />
        <local:OffsetKeyTime x:Key="A_KeyTime_Announcement_Land"
                             KeyTime="0:0:0.36" />
        <local:OffsetKeyTime x:Key="A_KeyTime_Announcement_Slide_End"
                             KeyTime="0:0:5" />
        <local:OffsetKeyTime x:Key="A_KeyTime_Announcement_Fade_End"
                             KeyTime="{StaticResource A_KeyTime_Announcement_Slide_End}"
                             Offset="-0:0:1.0" />
        <local:OffsetKeyTime x:Key="A_KeyTime_Announcement_Fade_Start"
                             KeyTime="{StaticResource A_KeyTime_Announcement_Fade_End}"
                             Offset="-0:0:0.3" />

        <local:UIStoryboard x:Key="A_Storyboard_Announcement">
            <!-- Whoosh -->
            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="TopLine"
                                           Storyboard.TargetProperty="(UIElement.RenderTransform).(TranslateTransform.X)">
                <DiscreteDoubleKeyFrame KeyTime="0:0:0"
                                        Value="-2000" />
                <DiscreteDoubleKeyFrame KeyTime="{StaticResource A_KeyTime_Announcement_Begin}"
                                        Value="-2000" />
                <EasingDoubleKeyFrame KeyTime="{StaticResource A_KeyTime_Announcement_Land}"
                                      Value="0"
                                      EasingFunction="{local:QuadraticEasing EasingMode=EaseInOut}" />
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="BottomLine"
                                           Storyboard.TargetProperty="(UIElement.RenderTransform).(TranslateTransform.X)">
                <DiscreteDoubleKeyFrame KeyTime="0:0:0"
                                        Value="2000" />
                <DiscreteDoubleKeyFrame KeyTime="{StaticResource A_KeyTime_Announcement_Begin}"
                                        Value="2000" />
                <EasingDoubleKeyFrame KeyTime="{StaticResource A_KeyTime_Announcement_Land}"
                                      Value="100"
                                      EasingFunction="{local:QuadraticEasing EasingMode=EaseInOut}" />
            </DoubleAnimationUsingKeyFrames>

            <!-- Slide -->
            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="TopLine"
                                           IsAdditive="True"
                                           Storyboard.TargetProperty="(UIElement.RenderTransform).(TranslateTransform.X)">
                <EasingDoubleKeyFrame KeyTime="{StaticResource A_KeyTime_Announcement_Slide_End}"
                                      Value="100"
                                      EasingFunction="{local:QuadraticEasing EasingMode=EaseOut}" />
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="BottomLine"
                                           IsAdditive="True"
                                           Storyboard.TargetProperty="(UIElement.RenderTransform).(TranslateTransform.X)">
                <EasingDoubleKeyFrame KeyTime="{StaticResource A_KeyTime_Announcement_Slide_End}"
                                      Value="-100"
                                      EasingFunction="{local:QuadraticEasing EasingMode=EaseOut}" />
            </DoubleAnimationUsingKeyFrames>

            <!-- Fade on & off -->
            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="TopLine"
                                           Storyboard.TargetProperty="Opacity">
                <DiscreteDoubleKeyFrame KeyTime="0:0:0"
                                        Value="0" />
                <DiscreteDoubleKeyFrame KeyTime="{StaticResource A_KeyTime_Announcement_Begin}"
                                        Value="0" />
                <EasingDoubleKeyFrame KeyTime="{StaticResource A_KeyTime_Announcement_Land}"
                                      Value="1"
                                      EasingFunction="{local:LinearEasing}" />
                <DiscreteDoubleKeyFrame KeyTime="{StaticResource A_KeyTime_Announcement_Fade_Start}"
                                        Value="1" />
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="BottomLine"
                                           Storyboard.TargetProperty="Opacity">
                <DiscreteDoubleKeyFrame KeyTime="0:0:0"
                                        Value="0" />
                <DiscreteDoubleKeyFrame KeyTime="{StaticResource A_KeyTime_Announcement_Begin}"
                                        Value="0" />
                <EasingDoubleKeyFrame KeyTime="{StaticResource A_KeyTime_Announcement_Land}"
                                      Value="1"
                                      EasingFunction="{local:LinearEasing}" />
                <DiscreteDoubleKeyFrame KeyTime="{StaticResource A_KeyTime_Announcement_Fade_Start}"
                                        Value="1" />
            </DoubleAnimationUsingKeyFrames>
        </local:UIStoryboard>

        <Style x:Key="A_Style_FZRun_Announcement_TopLine_White"
               TargetType="local:FZRun">
            <Setter Property="Color"
                    Value="#ffffffff" />
        </Style>

        <Thickness x:Key="A_Thickness_Bucketlist_Separator">0</Thickness>
        <Thickness x:Key="A_Thickness_Bucketlist_Separator_BR">0,26,0,0</Thickness>
        <Thickness x:Key="A_Thickness_Bucketlist_Separator_KO">0,26,0,0</Thickness>
        <Thickness x:Key="A_Thickness_Bucketlist_Separator_CHS">0,26,0,0</Thickness>
        <Thickness x:Key="A_Thickness_Bucketlist_Separator_CHT">0,26,0,0</Thickness>
        <Thickness x:Key="A_Thickness_Bucketlist_Separator_JP">0,26,0,0</Thickness>
        <Thickness x:Key="A_Thickness_Bucketlist_Separator_CZ">0,26,0,0</Thickness>
        <Thickness x:Key="A_Thickness_Bucketlist_Separator_MX">0,26,0,0</Thickness>
    </Page.Resources>
    <Grid>
        <Decorator Style="{StaticResource A_Style_FrameworkElement_LayoutRoot}">
            <Grid RenderTransformOrigin="0.5,0.5"
                  HorizontalAlignment="Center"
                  VerticalAlignment="Center">
                <UIElement.RenderTransform>
                    <RotateTransform Angle="-6" />
                </UIElement.RenderTransform>
                <StackPanel MaxWidth="1500"
                            Margin="0,60,0,0">
                    <Decorator x:Name="TopLine"
                               Margin="70,0,0,0"
                               Effect="{StaticResource A_MotionBlurEffect}"
                               local:MotionBlurEffect.MotionBlurPositionXControl="{Binding RenderTransform.X, RelativeSource={RelativeSource Self}}"
                               Opacity="0">
                        <UIElement.RenderTransform>
                            <TranslateTransform />
                        </UIElement.RenderTransform>
                        <Decorator RenderTransformOrigin="0.5,0.5"
                                   RenderTransform="{StaticResource A_Transform_Italic}">
                            <local:FZTextBlock Color="{Binding InfluenceThread, Converter={StaticResource A_Converter_InfluenceThreadIdToColor}}"
                                               Style="{StaticResource A_Style_FZTextBlock_HorizonA}"
                                               CapHeight="54"
                                               local:TextBlockInlineMarkup.ResourceBaseName="A_Style_FZRun_Announcement_TopLine_"
                                               local:TextBlockInlineMarkup.Markup="{Binding TopText, Converter={StaticResource A_StringToUpper}}" />
                        </Decorator>
                    </Decorator>

                    <Decorator Height="13" />

                    <Decorator x:Name="BottomLine"
                               Effect="{StaticResource A_MotionBlurEffect}"
                               local:MotionBlurEffect.MotionBlurPositionXControl="{Binding RenderTransform.X, RelativeSource={RelativeSource Self}}"
                               RenderTransformOrigin="0.5,0.5"
                               Margin="{local:LocalizedResource A_Thickness_Bucketlist_Separator}"
                               Opacity="0">
                        <UIElement.RenderTransform>
                            <TranslateTransform />
                        </UIElement.RenderTransform>
                        <Decorator RenderTransformOrigin="0.5,0.5"
                                   RenderTransform="{StaticResource A_Transform_Italic}">
                            <local:FZTextBlock Color="#fff"
                                               Style="{StaticResource A_Style_FZTextBlock_HorizonA}"
                                               CapHeight="134"
                                               TextWrapping="NoWrap"
                                               TextAlignment="Center"
                                               LineAdjust="-0.4"
                                               local:TextBlockInlineMarkup.ResourceBaseName="A_Style_FZRun_Announcement_BottomLine_"
                                               local:TextBlockInlineMarkup.Markup="{Binding BottomText}" />
                        </Decorator>
                    </Decorator>
                </StackPanel>
            </Grid>
        </Decorator>

        <ContentControl x:Name="BottomBar" Style="{StaticResource A_Style_ButtonBar}">
            <ContentControl x:Name="DefaultHelpPanel"
                            local:ControllerButtonPanel.ADescription="{local:Loc HelpButtons.IDS_Retry}"
                            local:ControllerButtonPanel.BDescription="{local:Loc HelpButtons.IDS_Quit}"
                            Style="{StaticResource A_Style_ContentControl_DefaultButtonBar}" />
        </ContentControl>
    </Grid>
    <FrameworkElement.Triggers>
        <EventTrigger RoutedEvent="FrameworkElement.Loaded">
            <local:BeginUIStoryboard Storyboard="{StaticResource A_Storyboard_Announcement}" />
        </EventTrigger>
    </FrameworkElement.Triggers>
</Page>
