<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 TextBlock}">
            <Setter Property="FontFamily" Value="Moire"/>
            <Setter Property="Foreground" Value="White"/>
            <Setter Property="TextWrapping" Value="Wrap"/>
            <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="False" 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="-117.043"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.896" Value="119.19725600000001"/>
				<EasingDoubleKeyFrame KeyTime="0:0:1" Value="146.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="Fuel Gauge">
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)" Storyboard.TargetName="Fuel_Fill">
				<EasingDoubleKeyFrame KeyTime="0" Value="56.37"/>
				<EasingDoubleKeyFrame KeyTime="0:0:1" Value="1.349"/>
			</DoubleAnimationUsingKeyFrames>
		</Storyboard>
	</Page.Resources>
	<Page.Triggers>
		<EventTrigger RoutedEvent="FrameworkElement.Loaded">
			<BeginStoryboard Storyboard="{StaticResource Fuel Gauge}"/>
		</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="Fuel_Animation" Height="720" Canvas.Left="288" Width="960">
        	<Rectangle x:Name="Fuel_Fill" Fill="#FFF4F4F5" Height="304" Canvas.Left="352" Canvas.Top="352" Width="315.692" RenderTransformOrigin="0,0">
        		<Rectangle.RenderTransform>
        			<TransformGroup>
        				<ScaleTransform/>
        				<SkewTransform/>
        				<RotateTransform Angle="56.37"/>
        				<TranslateTransform/>
        			</TransformGroup>
        		</Rectangle.RenderTransform>
        	</Rectangle>
        </Canvas>
        <Rectangle x:Name="Mask_1" Fill="Black" Height="112" Canvas.Top="608" Width="1280"/>
        <Rectangle x:Name="Mask_2" Fill="Black" Height="520" Canvas.Left="984" Canvas.Top="104" Width="295.667"/>

        <Canvas x:Name="Tach" Canvas.Left="177.334" Canvas.Top="41.667" Height="638.666" Width="926.666">
        	<Image x:Name="Alpha_Graphics" Height="507" Canvas.Left="117.67" Source="game:/media/cars/ACU_NSX_16/UI/Textures/ACU_NSX_16_tach_alpha.png" Stretch="Fill" Canvas.Top="63.335" Width="690"/>
        	<Image x:Name="Needle" Height="68" Canvas.Left="457.501" Source="game:/media/cars/ACU_NSX_16/UI/Textures/ACU_NSX_16_needle.png" Stretch="Fill" Canvas.Top="79.566" Width="11" RenderTransformOrigin="0.5,3.416">
        		<Image.RenderTransform>
        			<TransformGroup>
        				<ScaleTransform/>
        				<SkewTransform/>
        				<RotateTransform Angle="-117.043"/>
        				<TranslateTransform/>
        			</TransformGroup>
        		</Image.RenderTransform>
        	</Image>
        </Canvas>
		<Canvas x:Name="Text" Height="720" Width="1280">
			<TextBlock x:Name="Text_Trip_Odo" Canvas.Left="877" Canvas.Top="556" Text="{Binding TripMeter}" Width="120" FontSize="22.667" Style="{StaticResource TextBlockStyle}" FontFamily="DG1_Arial"/>
			<TextBlock 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">
				<TextBlock.RenderTransform>
					<TransformGroup>
						<ScaleTransform/>
						<SkewTransform AngleX="-10"/>
						<RotateTransform/>
						<TranslateTransform/>
					</TransformGroup>
				</TextBlock.RenderTransform>
			</TextBlock>
			<TextBlock 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">
				<TextBlock.RenderTransform>
					<TransformGroup>
						<ScaleTransform/>
						<SkewTransform AngleX="-10"/>
						<RotateTransform/>
						<TranslateTransform/>
					</TransformGroup>
				</TextBlock.RenderTransform>
			</TextBlock>
			<Image x:Name="Graphics_F" Height="17" Canvas.Left="272.667" Source="game:/media/cars/ACU_NSX_16/UI/Textures/ACU_NSX_16_txt_F.png" Stretch="Fill" Canvas.Top="563.729" Width="19"/>
			<Image x:Name="Graphics_Miles" Height="17" Canvas.Left="1005.002" Source="game:/media/cars/ACU_NSX_16/UI/Textures/ACU_NSX_16_txt_miles.png" Stretch="Fill" Canvas.Top="561.728" Width="50"/>
			<TextBlock x:Name="Text_External_Temp" Canvas.Left="148.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 Tach}"/>
		<local:StoryboardController SeekPct="{Binding Fuel}" Target="{StaticResource Fuel Gauge}"/>
	</Canvas>
</Page>