<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.ACU_NSX_16">
	
    <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" HasTachMem="False" HasClock="False" HasExternalTemp="True" 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="15.6" MaxGear="8" MaxRpm="9000"></local:DigitalGaugeConfig>
        
		<Storyboard x:Key="Tach">
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)" Storyboard.TargetName="Needle">
				<EasingDoubleKeyFrame KeyTime="0" Value="-179.832"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.5" Value="-45.851"/>
				<EasingDoubleKeyFrame KeyTime="0:0:1" Value="87.67"/>
			</DoubleAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)" Storyboard.TargetName="Orange_1">
				<EasingDoubleKeyFrame KeyTime="0" Value="0"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.335" Value="90"/>
			</DoubleAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)" Storyboard.TargetName="Orange_2">
				<EasingDoubleKeyFrame KeyTime="0" Value="0"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.335" Value="90"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.669" Value="180"/>
			</DoubleAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)" Storyboard.TargetName="Orange_3">
				<EasingDoubleKeyFrame KeyTime="0" Value="0"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.335" Value="90"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.669" Value="180"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.835" Value="223.058528189911"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.836" Value="223.058528189911"/>
				<EasingDoubleKeyFrame KeyTime="0:0:1" Value="267.437"/>
			</DoubleAnimationUsingKeyFrames>
			<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Orange_1">
				<DiscreteObjectKeyFrame KeyTime="0:0:0.335" Value="{x:Static Visibility.Visible}"/>
				<DiscreteObjectKeyFrame KeyTime="0:0:0.835" Value="{x:Static Visibility.Visible}"/>
			</ObjectAnimationUsingKeyFrames>
			<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Orange_2">
				<DiscreteObjectKeyFrame KeyTime="0:0:0.669" Value="{x:Static Visibility.Visible}"/>
				<DiscreteObjectKeyFrame KeyTime="0:0:0.835" Value="{x:Static Visibility.Visible}"/>
			</ObjectAnimationUsingKeyFrames>
			<ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(Shape.Fill).(SolidColorBrush.Color)" Storyboard.TargetName="Orange_1">
				<EasingColorKeyFrame KeyTime="0:0:0.835" Value="#FFF08E10"/>
				<EasingColorKeyFrame KeyTime="0:0:0.836" Value="#FFF82020"/>
			</ColorAnimationUsingKeyFrames>
			<ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(Shape.Fill).(SolidColorBrush.Color)" Storyboard.TargetName="Orange_2">
				<EasingColorKeyFrame KeyTime="0:0:0.835" Value="#FFF08E10"/>
				<EasingColorKeyFrame KeyTime="0:0:0.836" Value="#FFF82020"/>
			</ColorAnimationUsingKeyFrames>
			<ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(Shape.Fill).(SolidColorBrush.Color)" Storyboard.TargetName="Orange_3">
				<EasingColorKeyFrame KeyTime="0:0:0.835" Value="#FFF08E10"/>
				<EasingColorKeyFrame KeyTime="0:0:0.836" Value="#FFF82020"/>
			</ColorAnimationUsingKeyFrames>
		</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="Fuel Gauge">
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)" Storyboard.TargetName="Fuel_Fill">
				<EasingDoubleKeyFrame KeyTime="0" Value="0"/>
				<EasingDoubleKeyFrame KeyTime="0:0:1" Value="1"/>
			</DoubleAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)" Storyboard.TargetName="Fuel_Needle">
				<EasingDoubleKeyFrame KeyTime="0" Value="0"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.1" Value="3.7"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.2" Value="12.511"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.3" Value="21.822"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.4" Value="30.419"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.5" Value="35.682"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.6" Value="39.946"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.7" Value="43.71"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.8" Value="46.307"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.9" Value="47.653"/>
				<EasingDoubleKeyFrame KeyTime="0:0:1" Value="47"/>
			</DoubleAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)" Storyboard.TargetName="Fuel_Needle">
				<EasingDoubleKeyFrame KeyTime="0" Value="0"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.1" Value="-15.4"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.2" Value="-33.578"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.3" Value="-51.756"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.4" Value="-70.934"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.5" Value="-89.445"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.6" Value="-108.356"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.7" Value="-126.517"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.8" Value="-144.511"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.9" Value="-162.255"/>
				<EasingDoubleKeyFrame KeyTime="0:0:1" Value="-179"/>
			</DoubleAnimationUsingKeyFrames>
		</Storyboard>
		<Storyboard x:Key="Shift Lights Progress"/>
		<Storyboard x:Key="Shift Lights Flash"/>
	</Page.Resources>
	<Page.Triggers>
		<EventTrigger RoutedEvent="FrameworkElement.Loaded">
			<BeginStoryboard Storyboard="{StaticResource Fuel Gauge}"/>
			<BeginStoryboard Storyboard="{StaticResource Shift Lights Progress}"/>
			<BeginStoryboard Storyboard="{StaticResource Shift Lights Flash}"/>
		</EventTrigger>
	</Page.Triggers>
	  

	<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="Black_Background" Fill="Black" Height="720" Stroke="Black" Width="1280" Canvas.Top="0" Canvas.Left="-0.333"/>
		<Canvas x:Name="Tach_Color" Height="528" Canvas.Left="375.625" Canvas.Top="89.375" Width="528">
			<Rectangle x:Name="Orange_1" Fill="#FFF08E10" Height="250" Canvas.Left="264.25" Canvas.Top="264.25" Width="250" RenderTransformOrigin="0,0">
				<Rectangle.RenderTransform>
					<TransformGroup>
						<ScaleTransform/>
						<SkewTransform/>
						<RotateTransform/>
						<TranslateTransform/>
					</TransformGroup>
				</Rectangle.RenderTransform>
			</Rectangle>
			<Rectangle x:Name="Orange_2" Fill="#FFF08E10" Height="250" Canvas.Left="264.25" Canvas.Top="264.25" Width="250" RenderTransformOrigin="0,0">
				<Rectangle.RenderTransform>
					<TransformGroup>
						<ScaleTransform/>
						<SkewTransform/>
						<RotateTransform/>
						<TranslateTransform/>
					</TransformGroup>
				</Rectangle.RenderTransform>
			</Rectangle>
			<Rectangle x:Name="Orange_3" Fill="#FFF08E10" Height="250" Canvas.Left="264.25" Canvas.Top="264.25" Width="250" RenderTransformOrigin="0,0">
				<Rectangle.RenderTransform>
					<TransformGroup>
						<ScaleTransform/>
						<SkewTransform/>
						<RotateTransform/>
						<TranslateTransform/>
					</TransformGroup>
				</Rectangle.RenderTransform>
			</Rectangle>
			<Canvas x:Name="Tach_Red" Height="528" Width="528" Visibility="Hidden">
				<Canvas x:Name="Tach_Red_Flash" Height="528" Width="528">
					<Rectangle x:Name="Red_1" Fill="#FFF82020" Height="250" Canvas.Left="264.25" Canvas.Top="264.25" Width="250" RenderTransformOrigin="0,0">
						<Rectangle.RenderTransform>
							<TransformGroup>
								<ScaleTransform/>
								<SkewTransform/>
								<RotateTransform/>
								<TranslateTransform/>
							</TransformGroup>
						</Rectangle.RenderTransform>
					</Rectangle>
					<Rectangle x:Name="Red_2" Fill="#FFF82020" Height="250" Canvas.Left="264.25" Canvas.Top="264.25" Width="250" RenderTransformOrigin="0,0">
						<Rectangle.RenderTransform>
							<TransformGroup>
								<ScaleTransform/>
								<SkewTransform/>
								<RotateTransform/>
								<TranslateTransform/>
							</TransformGroup>
						</Rectangle.RenderTransform>
					</Rectangle>
					<Rectangle x:Name="Red_3" Fill="#FFF82020" Height="250" Canvas.Left="264.25" Canvas.Top="264.25" Width="250" RenderTransformOrigin="0,0">
						<Rectangle.RenderTransform>
							<TransformGroup>
								<ScaleTransform/>
								<SkewTransform/>
								<RotateTransform/>
								<TranslateTransform/>
							</TransformGroup>
						</Rectangle.RenderTransform>
					</Rectangle>
				</Canvas>
			</Canvas>
		</Canvas>
        <Canvas x:Name="Fuel_Animation" Height="720" Canvas.Left="288" Width="960">
        	<Image x:Name="Fuel_Background" Height="187" Canvas.Left="634.335" Source="game:/media/cars/ACU_NSX_16/UI/Textures/ACU_NSX_16_Fuel_Bckgd.png" Stretch="Fill" Canvas.Top="357.664" Width="89"/>
        	<Rectangle x:Name="Fuel_Fill" Fill="#FFF4F4F5" Height="186.5" Canvas.Left="631.5" Canvas.Top="357.664" Width="100.5" RenderTransformOrigin="0.5,1">
        		<Rectangle.RenderTransform>
        			<TransformGroup>
        				<ScaleTransform ScaleY="0"/>
        				<SkewTransform/>
        				<RotateTransform/>
        				<TranslateTransform/>
        			</TransformGroup>
        		</Rectangle.RenderTransform>
        	</Rectangle>
        </Canvas>
        <Rectangle x:Name="Mask_Bottom" Fill="Black" Height="134" Canvas.Top="586" Width="1280"/>
        <Rectangle x:Name="Mask_Right" Fill="Black" Height="520" Canvas.Left="1024" Canvas.Top="104" Width="255.667"/>
		<Rectangle x:Name="Mask_Top" Fill="Black" Height="120" Width="1280"/>

        <Canvas x:Name="Tach" Canvas.Left="177.334" Canvas.Top="41.667" Height="638.666" Width="926.666">
        	<Image x:Name="Tach_Alpha" Height="475" Canvas.Left="74.666" Source="game:/media/cars/ACU_NSX_16/UI/Textures/ACU_NSX_16_tach_alpha.png" Stretch="Fill" Canvas.Top="73.333" Width="804"/>
        	<Image x:Name="Needle" Height="68" Canvas.Left="456.501" Source="game:/media/cars/ACU_NSX_16/UI/Textures/ACU_NSX_16_needle.png" Stretch="Fill" Canvas.Top="79.066" Width="11" RenderTransformOrigin="0.5,3.416">
        		<Image.RenderTransform>
        			<TransformGroup>
        				<ScaleTransform/>
        				<SkewTransform/>
        				<RotateTransform Angle="-179.832"/>
        				<TranslateTransform/>
        			</TransformGroup>
        		</Image.RenderTransform>
        	</Image>
        	<Image x:Name="Fuel_Needle" Height="9" Canvas.Left="736.666" Source="game:/media/cars/ACU_NSX_16/UI/Textures/ACU_NSX_16_fuel_needle.png" Stretch="Fill" Canvas.Top="493.333" Width="69" RenderTransformOrigin="0.5,0.5">
        		<Image.RenderTransform>
        			<TransformGroup>
        				<ScaleTransform/>
        				<SkewTransform/>
        				<RotateTransform/>
        				<TranslateTransform/>
        			</TransformGroup>
        		</Image.RenderTransform>
        	</Image>
        </Canvas>
		<Canvas x:Name="Text" Height="720" Width="1280">
			<local:FastTextBlock x:Name="Text_Trip_Odo" Canvas.Left="845" Canvas.Top="556" Text="{Binding TripMeter}" Width="120" FontSize="22.667" Style="{StaticResource TextBlockStyle}" FontFamily="DG1_Arial"/>
			<local:FastTextBlock x:Name="Text_Speed" Canvas.Left="473" Canvas.Top="197" Text="{Binding Speed}" Width="250" FontSize="80" Style="{StaticResource TextBlockStyle}" FontFamily="Moire" RenderTransformOrigin="0.5,0.5">
				<local:FastTextBlock.RenderTransform>
					<TransformGroup>
						<ScaleTransform/>
						<SkewTransform AngleX="-10"/>
						<RotateTransform/>
						<TranslateTransform/>
					</TransformGroup>
				</local:FastTextBlock.RenderTransform>
			</local:FastTextBlock>
			<local:FastTextBlock x:Name="Text_Gear" Canvas.Left="516" Canvas.Top="453.563" Text="{Binding Gear}" Width="250" FontSize="58.667" Style="{StaticResource TextBlockStyle}" FontFamily="Moire" RenderTransformOrigin="0.5,0.5" TextAlignment="Center" Foreground="#FFFB201C">
				<local:FastTextBlock.RenderTransform>
					<TransformGroup>
						<ScaleTransform/>
						<SkewTransform AngleX="-10"/>
						<RotateTransform/>
						<TranslateTransform/>
					</TransformGroup>
				</local:FastTextBlock.RenderTransform>
			</local:FastTextBlock>
			<local:FastTextBlock x:Name="Text_External_Temp" Canvas.Left="182.667" Canvas.Top="549" Text="{Binding ExternalTemp}" Width="120" FontSize="32" Style="{StaticResource TextBlockStyle}" FontFamily="DG1_Arial"/>
		</Canvas>
        <Rectangle x:Name="Start_Up_Mask" Fill="Black" Height="720" Stroke="Black" Width="1280" Canvas.Left="0" Canvas.Top="0" Opacity="0"/>
		
				<!-- Storyboard binding controllers -->
        <local:StoryboardController SeekPct="{Binding Tach}" Target="{StaticResource Shift Lights Progress}"/>
		<local:StoryboardController SeekPct="{Binding Tach}" Target="{StaticResource Tach}"/>
		<local:StoryboardController SeekPct="{Binding Fuel}" Target="{StaticResource Fuel Gauge}"/>
	</Canvas>
</Page>