<Page
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
    xmlns:System="clr-namespace:System;assembly=mscorlib"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
    xmlns:local="clr-namespace:ForzaUI"
    mc:Ignorable="d"
	x:Class="ForzaUI.CHE_CorvetteZR1_19">
	
    <Page.Resources>
        <Style x:Key="TextBlockStyle" TargetType="{x:Type local:FastTextBlock}">
            <Setter Property="FontFamily" Value="Moire"/>
            <Setter Property="Foreground" Value="White"/>
             
            <Setter Property="TextAlignment" Value="Right"/>
        </Style>
		
		<local:DigitalGaugeConfig x:Key="Config" HasClock="False" HasExternalTemp="False" UseDegreesF="True" UseMPH="True" UsePsi="True" MaxBoost="13" MinBoost="1" MaxSpeed="120" HasAbsLight="False" HasStmLight="False" HasTcsLight="False" HasGAccelX="False" HasGAccelY="False" HasShiftLights="True" HasTextTach="False" HasLapPlaceInfo="False" HasTextBoost="False" HasTextGAccel="False" HasTextOdometer="True" HasTextFuel="False" MaxFuel="20.0" MinGear="-1" MaxGear="1" MaxRpm="8000"></local:DigitalGaugeConfig>
        
		<Storyboard x:Key="Tach">
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)" Storyboard.TargetName="Needle">
				<EasingDoubleKeyFrame KeyTime="0" Value="-118.967"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.125" Value="-89.388"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.251" Value="-59.948"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.375" Value="-30.353"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.5" Value="0"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.625" Value="30.056"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.751" Value="60.437"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.875" Value="90.094"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.942" Value="104.618"/>
				<EasingDoubleKeyFrame KeyTime="0:0:1" Value="104.618"/>
			</DoubleAnimationUsingKeyFrames>
		</Storyboard>
		<Storyboard x:Key="Start Up Animation">
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="Start_Up_Mask">
				<EasingDoubleKeyFrame KeyTime="0" Value="1"/>
				<EasingDoubleKeyFrame KeyTime="0:0:1" Value="0"/>
			</DoubleAnimationUsingKeyFrames>
		</Storyboard>
		<Storyboard x:Key="Shift Lights Flash" RepeatBehavior="Forever"/>
		<Storyboard x:Key="Shift Lights Progress">
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="Shift_Yellow">
				<EasingDoubleKeyFrame KeyTime="0" Value="0"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.545" Value="0"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.555" Value="1"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.798" Value="1"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.806" Value="0"/>
				<EasingDoubleKeyFrame KeyTime="0:0:1" Value="0"/>
			</DoubleAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="Shift_Red">
				<EasingDoubleKeyFrame KeyTime="0" Value="0"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.798" Value="0"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.808" Value="1"/>
				<EasingDoubleKeyFrame KeyTime="0:0:1" Value="1"/>
			</DoubleAnimationUsingKeyFrames>
		</Storyboard>
	</Page.Resources>
	<Page.Triggers>
		<EventTrigger RoutedEvent="FrameworkElement.Loaded" SourceName="LayoutRoot">
			<BeginStoryboard Storyboard="{StaticResource Shift Lights Flash}"/>
			<BeginStoryboard Storyboard="{StaticResource Tach}"/>
		</EventTrigger>
	</Page.Triggers>
	<local:EventFire.FzTriggers>
        <local:EventFireTrigger Event="StartUp" Storyboard="{StaticResource Start Up Animation}"/>
    </local:EventFire.FzTriggers>
	  

	<Canvas x:Name="LayoutRoot" Background="Transparent" Width="1280" Height="720">
		<VisualStateManager.VisualStateGroups>
			<VisualStateGroup x:Name="NightDaySplit">
				<VisualState x:Name="Day"/>
				<VisualState x:Name="Night"/>
			</VisualStateGroup>
		</VisualStateManager.VisualStateGroups>
        <Rectangle x:Name="Background_Grey" Fill="#FF030303" Height="720" Width="1280" Canvas.Left="0" Canvas.Top="0"/>
        <Rectangle x:Name="Grey2" Fill="#FF030303" Height="720" Canvas.Left="677" Width="603"/>

        <Canvas x:Name="Tach" Canvas.Left="0" Canvas.Top="0" Height="720" Width="1280">
            <Image x:Name="Tach_Graphics" Height="540" Canvas.Left="243" Source="game:/media/cars/CHE_CorvetteZR1_19/UI/Textures/CHE_CorvetteZ06_15_tach_graphics.png" Stretch="Fill" Canvas.Top="108" Width="730"/>
            <Canvas x:Name="Shift_Progress" Height="720" Width="1280">
            	<Image x:Name="Shift_Yellow" Height="526" Canvas.Left="316" Source="game:/media/cars/CHE_CorvetteZR1_19/UI/Textures/CHE_CorvetteZ06_15_Shift.png" Stretch="Fill" Canvas.Top="122" Width="586" Opacity="0"/>
            	<Image x:Name="Shift_Red" Height="526" Canvas.Left="316" Source="game:/media/cars/CHE_CorvetteZR1_19/UI/Textures/CHE_CorvetteZ06_15_Shift_Red.png" Stretch="Fill" Canvas.Top="122" Width="586" Opacity="0"/>
            </Canvas>
            <Canvas x:Name="Shift_Flashing" Height="720" Width="1280" Visibility="Hidden">
            	<Image x:Name="Shift_Graphics1" Height="526" Canvas.Left="316" Source="game:/media/cars/CHE_CorvetteZR1_19/UI/Textures/CHE_CorvetteZ06_15_Shift.png" Stretch="Fill" Canvas.Top="122" Width="586"/>
            </Canvas>
            <Image x:Name="Needle" Height="201" Canvas.Left="605.333" Source="game:/media/cars/CHE_CorvetteZR1_19/UI/Textures/CHE_CorvetteZ06_15_needle.png" Stretch="Fill" Canvas.Top="181.333" Width="11" RenderTransformOrigin="0.5,1.177">
            	<Image.RenderTransform>
            		<TransformGroup>
            			<ScaleTransform/>
            			<SkewTransform/>
            			<RotateTransform Angle="-118.967"/>
            			<TranslateTransform/>
            		</TransformGroup>
            	</Image.RenderTransform>
            </Image>
		</Canvas>
		<Canvas x:Name="Text" Height="720" Width="1280">
            <local:FastTextBlock x:Name="Text_Speed" Canvas.Left="502.665" Canvas.Top="350.832" Text="{Binding Speed}" Width="220" FontSize="90.667" Style="{StaticResource TextBlockStyle}" Foreground="White" FontFamily="Moire" RenderTransformOrigin="0.5,0.5" TextAlignment="Center">
            	<local:FastTextBlock.RenderTransform>
            		<TransformGroup>
            			<ScaleTransform ScaleX="0.9" ScaleY="1.1"/>
            			<SkewTransform AngleX="-15"/>
            			<RotateTransform/>
            			<TranslateTransform/>
            		</TransformGroup>
            	</local:FastTextBlock.RenderTransform>
            </local:FastTextBlock>
            <local:FastTextBlock x:Name="Text_Odometer" Canvas.Left="199.168" Canvas.Top="552.058" Text="{Binding Odometer}" FontSize="20" Style="{StaticResource TextBlockStyle}" Width="140" FontFamily="Moire" Foreground="White" RenderTransformOrigin="0.5,0.5" TextAlignment="Right">
            	<local:FastTextBlock.RenderTransform>
            		<TransformGroup>
            			<ScaleTransform ScaleY="1.2" ScaleX="0.95"/>
            			<SkewTransform/>
            			<RotateTransform/>
            			<TranslateTransform/>
            		</TransformGroup>
            	</local:FastTextBlock.RenderTransform>
            </local:FastTextBlock>
            <local:FastTextBlock x:Name="Text_Gear" Canvas.Left="725.665" Canvas.Top="482.832" Text="{Binding Gear}" Width="120" FontSize="72" Style="{StaticResource TextBlockStyle}" Foreground="White" FontFamily="Moire" RenderTransformOrigin="0.5,0.5" TextAlignment="Center">
            	<local:FastTextBlock.RenderTransform>
            		<TransformGroup>
            			<ScaleTransform ScaleX="0.9" ScaleY="1.1"/>
            			<SkewTransform AngleX="-15"/>
            			<RotateTransform/>
            			<TranslateTransform/>
            		</TransformGroup>
            	</local:FastTextBlock.RenderTransform>
            </local:FastTextBlock>
		</Canvas>
		<Image x:Name="Needle_Oil_Pressure" Height="270" Canvas.Left="402" Source="game:/media/cars/CHE_CorvetteZR1_19/UI/Textures/CHE_CorvetteZ06_15_needle_sides.png" Stretch="Fill" Canvas.Top="284.5" Width="11" RenderTransformOrigin="0.5,1" >
			<Image.RenderTransform>
				<TransformGroup>
					<ScaleTransform/>
					<SkewTransform/>
					<RotateTransform Angle="-99.731"/>
					<TranslateTransform X="134.539" Y="-136.541"/>
				</TransformGroup>
			</Image.RenderTransform>
		</Image>
		<Image x:Name="Needle_Oil_Temperature" Height="270" Canvas.Left="534.5" Source="game:/media/cars/CHE_CorvetteZR1_19/UI/Textures/CHE_CorvetteZ06_15_needle_sides.png" Stretch="Fill" Canvas.Top="284.5" Width="11" RenderTransformOrigin="0.5,1" >
			<Image.RenderTransform>
				<TransformGroup>
					<ScaleTransform/>
					<SkewTransform/>
					<RotateTransform Angle="-262.815"/>
					<TranslateTransform X="134.539" Y="-136.541"/>
				</TransformGroup>
			</Image.RenderTransform>
		</Image>
        <Rectangle x:Name="Start_Up_Mask" Fill="Black" Height="720" Stroke="Black" Width="1280" Opacity="0"/>
		
				<!-- Storyboard binding controllers -->
		<local:StoryboardController SeekPct="{Binding Tach}" Target="{StaticResource Tach}"/>
		<local:StoryboardController SeekPct="{Binding Tach}" Target="{StaticResource Shift Lights Progress}"/>

		
	</Canvas>
</Page>