<Page xmlns:local="clr-namespace:ForzaUI"
      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.Scenes.Anthem.A_ReplayHud"
      x:Name="Page"
      mc:Ignorable="d"
      Style="{StaticResource A_Style_Page_Generic}"
      DataContext="{Binding RelativeSource={RelativeSource Self}}">
    
    <local:UIPageTransitionManager.TransitionManager>
        <local:UIPageTransitionManager Preset="{StaticResource A_UIPageTransitionManagerPreset_NoAudio}"/>
    </local:UIPageTransitionManager.TransitionManager>

    <Grid x:Name="LayoutRoot" Style="{StaticResource A_Style_FrameworkElement_DefaultTransition_0}">
        
        <local:RoutedEventCommand x:Name="FastForward"
                                  RoutedEvent="UIElement.MouseLeftButtonDown"
                                  Command="{Binding FastForwardCommand}" />
        <local:RoutedEventCommand x:Name="Rewind"
                                  RoutedEvent="UIElement.MouseLeftButtonDown"
                                  Command="{Binding RewindCommand}" />
        <local:RoutedEventCommand x:Name="StopFastForwardOrRewind"
                                  RoutedEvent="UIElement.MouseLeftButtonUp"
                                  Command="{Binding StopFastForwardOrRewindCommand}" />
        <local:RoutedEventCommand x:Name="LeaveFastForwardOrRewind"
                                  RoutedEvent="UIElement.MouseLeave"
                                  Command="{Binding StopFastForwardOrRewindCommand}" />

        <ContentControl Style="{StaticResource A_Style_ButtonBar}"
                        x:Name="BottomBar">
            <local:ControllerButtonPanel x:Name="HelpPanel"
                                         Style="{StaticResource A_Style_ControllerButtonPanel_Default}">
                <local:ControllerButtonControl Button="A"
                                               Description="{local:Loc HelpButtons.IDS_Select}"/>
                <local:ControllerButtonControl Button="B"
                                               Description="{local:Loc HelpButtons.IDS_Exit}" />
                <local:ControllerButtonControl Button="Y"
                                               Description="{local:Loc HelpButtons.IDS_HideUI}" />
                <local:ControllerButtonControl SupportsControllerInput="True"
                                               InputOverride="{local:Input Command=INPUTCMD_UI_REPLAY_SPEED_LEFT, Context=INPUTCONTEXT_UI}"
                                               Description="{local:Loc HelpButtons.IDS_Mulligan}"
                                               local:RoutedEventCommand.Action="{Binding ElementName=Rewind}"
                                               local:RoutedEventCommand.Action2="{Binding ElementName=StopFastForwardOrRewind}"
                                               local:RoutedEventCommand.Action3="{Binding ElementName=StopFastForwardOrRewind}" />
                <local:ControllerButtonControl SupportsControllerInput="True"
                                               InputOverride="{local:Input Command=INPUTCMD_UI_REPLAY_SPEED_RIGHT, Context=INPUTCONTEXT_UI}"
                                               Description="{local:Loc HelpButtons.IDS_Advance}"
                                               local:RoutedEventCommand.Action="{Binding ElementName=FastForward}"
                                               local:RoutedEventCommand.Action2="{Binding ElementName=StopFastForwardOrRewind}"
                                               local:RoutedEventCommand.Action3="{Binding ElementName=StopFastForwardOrRewind}" />
            </local:ControllerButtonPanel>
        </ContentControl>

        <Grid Style="{StaticResource A_Style_FrameworkElement_LayoutRoot}">
            <Canvas>
                <VisualStateManager.VisualStateGroups>
                    <VisualStateGroup x:Name="VisualStateGroup">
                        <VisualState x:Name="IdleState">
                            <Storyboard>
                                <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="Page">
                                    <EasingDoubleKeyFrame KeyTime="0:0:0.5" Value="0"/>
                                </DoubleAnimationUsingKeyFrames>
                            </Storyboard>
                        </VisualState>
                        <VisualState x:Name="ActiveState">
                            <Storyboard>
                                <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="Page">
                                    <EasingDoubleKeyFrame KeyTime="0:0:0.1" Value="1"/>
                                </DoubleAnimationUsingKeyFrames>
                            </Storyboard>
                        </VisualState>
                    </VisualStateGroup>
                </VisualStateManager.VisualStateGroups>

                <local:DVRControls x:Name="MyDVRControls" ReplayMode="True" Canvas.Left="80" Canvas.Top="818" />

            </Canvas>
        </Grid>

        <Control Style="{StaticResource A_Style_Control_CancelHideUIWithMouse}"/>

    </Grid>
</Page>
