<UserControl 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" 
			 x:Class="ForzaUI.HUD321Control" 
			 DataContext="{Binding RelativeSource={RelativeSource Self}}"
             mc:Ignorable="d">
	<UserControl.Resources>
	    <Style x:Key="A_Style_321Text" TargetType="local:FZTextBlock" BasedOn="{StaticResource A_Style_FZTextBlock_HorizonA}">
            <Setter Property="Color" Value="{StaticResource A_Color_Tile_Background}" />
            <Setter Property="FontSize" Value="320"/>
            <Setter Property="TextAlignment" Value="Center"/>
            <Setter Property="HorizontalAlignment" Value="Center"/>
            <Setter Property="VerticalAlignment" Value="Center"/>
            <Setter Property="Effect" Value="{StaticResource A_DropShadowEffect_DefaultHud}" />
		</Style>
        <Style x:Key="A_Style_AlternateGoText" TargetType="local:FZTextBlock" BasedOn="{StaticResource A_Style_321Text}">
            <Setter Property="FontSize" Value="140"/>
		</Style>
		<CubicEase x:Key="A_EasingFunction_EaseIn" EasingMode="EaseIn"/>
		<CubicEase x:Key="A_EasingFunction_EaseOut" EasingMode="EaseOut"/>
	</UserControl.Resources>
	<Grid x:Name="OuterPanel" HorizontalAlignment="Center" VerticalAlignment="Center" RenderTransformOrigin="0.5,0.5">
		<Grid.RenderTransform>
			<TransformGroup>
    			<ScaleTransform/>
    			<SkewTransform/>
    			<RotateTransform/>
    			<TranslateTransform/>
    		</TransformGroup>
		</Grid.RenderTransform>
		<VisualStateManager.VisualStateGroups>
			<VisualStateGroup x:Name="VisualStateGroup">
				<VisualStateGroup.Transitions>
					<VisualTransition GeneratedDuration="0"/>
				</VisualStateGroup.Transitions>
				<VisualState x:Name="Hidden">
					<Storyboard>
						<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="OuterPanel">
							<EasingDoubleKeyFrame KeyTime="0" Value="1"/>
                            <EasingDoubleKeyFrame KeyTime="0:0:0.3" Value="0" EasingFunction="{StaticResource A_EasingFunction_EaseIn}"/>
						</DoubleAnimationUsingKeyFrames>
						<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)" Storyboard.TargetName="OuterPanel">
                            <DiscreteDoubleKeyFrame KeyTime="0:0:0.0" Value="1"/>
                            <EasingDoubleKeyFrame KeyTime="0:0:0.3" Value="1.2" EasingFunction="{StaticResource A_EasingFunction_EaseIn}"/>
                        </DoubleAnimationUsingKeyFrames>
						<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)" Storyboard.TargetName="OuterPanel">
                            <DiscreteDoubleKeyFrame KeyTime="0:0:0.0" Value="1"/>
                            <EasingDoubleKeyFrame KeyTime="0:0:0.3" Value="1.2" EasingFunction="{StaticResource A_EasingFunction_EaseIn}"/>
                        </DoubleAnimationUsingKeyFrames>
					</Storyboard>
				</VisualState>
				<VisualState x:Name="Shown">
					<Storyboard>
                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="OuterPanel">
                            <DiscreteDoubleKeyFrame KeyTime="0:0:0.0" Value="0"/>
                            <EasingDoubleKeyFrame KeyTime="0:0:0.25" Value="1" EasingFunction="{StaticResource A_EasingFunction_EaseOut}"/>
                        </DoubleAnimationUsingKeyFrames>
                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)" Storyboard.TargetName="OuterPanel">
                            <DiscreteDoubleKeyFrame KeyTime="0:0:0.0" Value="0.8"/>
                            <EasingDoubleKeyFrame KeyTime="0:0:0.25" Value="1" EasingFunction="{StaticResource A_EasingFunction_EaseOut}"/>
                        </DoubleAnimationUsingKeyFrames>
						<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)" Storyboard.TargetName="OuterPanel">
                            <DiscreteDoubleKeyFrame KeyTime="0:0:0.0" Value="0.8"/>
                            <EasingDoubleKeyFrame KeyTime="0:0:0.25" Value="1" EasingFunction="{StaticResource A_EasingFunction_EaseOut}"/>
                        </DoubleAnimationUsingKeyFrames>
                        <StringAnimationUsingKeyFrames Storyboard.TargetProperty="(local:EventFire.EventName)" Storyboard.TargetName="EventFire">
							<DiscreteStringKeyFrame KeyTime="0:0:1" Value="ShownComplete"/>
						</StringAnimationUsingKeyFrames>
					</Storyboard>
				</VisualState>
			</VisualStateGroup>
		</VisualStateManager.VisualStateGroups>
        <Grid Visibility="{Binding DefaultGo, Converter={StaticResource A_FZBooleanToVisibilityConverter}}">
            <local:FZTextBlock Text="{Binding Text}" Style="{StaticResource A_Style_321Text}" />
        </Grid>
        <Grid Visibility="{Binding DefaultGo, Converter={StaticResource A_FZBooleanToVisibilityConverter_Inverse}}">
            <local:FZTextBlock Text="{Binding Text}" Style="{StaticResource A_Style_AlternateGoText}" />
        </Grid>
		<local:EventFire x:Name="EventFire" />
	</Grid>
</UserControl>
