<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.JAG_IPACE_18">
	
    <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="True" HasExternalTemp="True" UseDegreesF="False" UseMPH="True" UsePsi="True" MaxBoost="13" MinBoost="1" MaxSpeed="62.6" 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="25.0" MinGear="-1" MaxGear="1" MaxRpm="16000"></local:DigitalGaugeConfig>
		<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="32.363"/>
				<EasingDoubleKeyFrame KeyTime="0:0:1" Value="-31.583"/>
			</DoubleAnimationUsingKeyFrames>
		</Storyboard>
		<Storyboard x:Key="Speedo Analog">
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)" Storyboard.TargetName="Needle_Speed">
				<EasingDoubleKeyFrame KeyTime="0" Value="47.892"/>
				<EasingDoubleKeyFrame KeyTime="0:0:1" Value="311.191"/>
			</DoubleAnimationUsingKeyFrames>
		</Storyboard>
		<Storyboard x:Key="Gear Analog">
			<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Shift_R">
				<DiscreteObjectKeyFrame KeyTime="0" Value="{x:Static Visibility.Visible}"/>
				<DiscreteObjectKeyFrame KeyTime="0:0:0.5" Value="{x:Static Visibility.Hidden}"/>
			</ObjectAnimationUsingKeyFrames>
			<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Shift_N">
				<DiscreteObjectKeyFrame KeyTime="0" Value="{x:Static Visibility.Hidden}"/>
				<DiscreteObjectKeyFrame KeyTime="0:0:0.5" Value="{x:Static Visibility.Visible}"/>
				<DiscreteObjectKeyFrame KeyTime="0:0:1" Value="{x:Static Visibility.Hidden}"/>
			</ObjectAnimationUsingKeyFrames>
			<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Shift_D">
				<DiscreteObjectKeyFrame KeyTime="0" Value="{x:Static Visibility.Hidden}"/>
				<DiscreteObjectKeyFrame KeyTime="0:0:1" Value="{x:Static Visibility.Visible}"/>
			</ObjectAnimationUsingKeyFrames>
		</Storyboard>
	</Page.Resources>
	<Page.Triggers>
		<EventTrigger RoutedEvent="FrameworkElement.Loaded" SourceName="LayoutRoot">
			<BeginStoryboard Storyboard="{StaticResource Fuel Gauge}"/>
			<BeginStoryboard Storyboard="{StaticResource Speedo Analog}"/>
			<BeginStoryboard Storyboard="{StaticResource Gear Analog}"/>
		</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="Background_Black" Fill="Black" Height="720" Width="1280" Canvas.Left="0" Canvas.Top="0"/>
		<Rectangle x:Name="Background_Grey" Fill="Black" Height="600" Canvas.Top="7" Width="1280"/>
		<Canvas x:Name="Fuel_Animation" Height="105" Canvas.Left="902.667" Canvas.Top="607" Width="302.666">
			<Image x:Name="Background" Height="65" Canvas.Left="-48.669" Source="game:/media/cars/JAG_IPACE_18/UI/Textures/JAG_IPACE_18_Fuel_Bckgd.png" Stretch="Fill" Canvas.Top="-276.337" Width="156"/>
			<Image x:Name="Fuel_Fill" Height="147" Canvas.Left="-116.917" Source="game:/media/cars/JAG_IPACE_18/UI/Textures/JAG_IPACE_18_Fuel_Fill.png" Stretch="Fill" Canvas.Top="-358.5" Width="147" RenderTransformOrigin="1,0">
				<Image.RenderTransform>
					<TransformGroup>
						<ScaleTransform/>
						<SkewTransform/>
						<RotateTransform Angle="32.363"/>
						<TranslateTransform/>
					</TransformGroup>
				</Image.RenderTransform>
			</Image>
		</Canvas>
		<Image x:Name="CenterStack_Logo" Height="71" Canvas.Left="561.062" Source="game:/media/cars/JAG_IPACE_18/UI/Textures/JAG_IPACE_18_Logo.png" Stretch="Fill" Canvas.Top="546" Width="158"/>
		<Image x:Name="Graphics_Main" Height="348" Canvas.Left="181.996" Source="game:/media/cars/JAG_IPACE_18/UI/Textures/JAG_IPACE_18_Graphics_Main.png" Stretch="Fill" Canvas.Top="64" Width="916"/>
		<Canvas x:Name="Speedo" Height="720" Canvas.Left="0" Canvas.Top="0" Width="1280">
			<Image x:Name="Needle_Speed" Height="59" Canvas.Left="333.25" Source="game:/media/cars/JAG_IPACE_18/UI/Textures/JAG_IPACE_18_Needle.png" Stretch="Fill" Canvas.Top="341.75" Width="30" RenderTransformOrigin="0.5,-1.585">
				<Image.RenderTransform>
					<TransformGroup>
						<ScaleTransform/>
						<SkewTransform/>
						<RotateTransform Angle="47.892"/>
						<TranslateTransform/>
					</TransformGroup>
				</Image.RenderTransform>
			</Image>
		</Canvas>
		<Canvas x:Name="Tach" Height="720" Canvas.Left="0" Canvas.Top="0" Width="1280">
			<Image x:Name="Needle_Tach" Height="59" Canvas.Left="917.418" Source="game:/media/cars/JAG_IPACE_18/UI/Textures/JAG_IPACE_18_Needle.png" Stretch="Fill" Canvas.Top="341.75" Width="30" RenderTransformOrigin="0.5,-1.585">
				<Image.RenderTransform>
					<TransformGroup>
						<ScaleTransform/>
						<SkewTransform/>
						<RotateTransform Angle="180"/>
						<TranslateTransform/>
					</TransformGroup>
				</Image.RenderTransform>
			</Image>
		</Canvas>
		<Canvas x:Name="Shift_Animation" Height="288" Canvas.Left="203" Canvas.Top="103" Width="288">
			<Image x:Name="Shift_R" Height="35" Canvas.Left="129.339" Source="game:/media/cars/JAG_IPACE_18/UI/Textures/JAG_IPACE_18_Shift_R.png" Stretch="Fill" Canvas.Top="61.097" Width="32"/>
			<Image x:Name="Shift_N" Height="35" Canvas.Left="130.671" Source="game:/media/cars/JAG_IPACE_18/UI/Textures/JAG_IPACE_18_Shift_N.png" Stretch="Fill" Canvas.Top="61.097" Width="28" Visibility="Hidden"/>
			<Image x:Name="Shift_D" Height="35" Canvas.Left="130.336" Source="game:/media/cars/JAG_IPACE_18/UI/Textures/JAG_IPACE_18_Shift_D.png" Stretch="Fill" Canvas.Top="61.097" Width="30" Visibility="Hidden"/>
		</Canvas>
		<Canvas x:Name="Text" Height="720" Width="1280">
			<local:FastTextBlock x:Name="Text_Clock" Canvas.Left="370.5" Canvas.Top="83.662" Text="{Binding Time}" FontSize="21.333" Style="{StaticResource TextBlockStyle}" Width="120" FontFamily="DG1_Arial" Foreground="White" RenderTransformOrigin="0.5,0.5" TextAlignment="Right"/>
			<local:FastTextBlock x:Name="Text_Speed" Canvas.Left="248.25" Canvas.Top="219" Text="{Binding Speed}" FontSize="56" Style="{StaticResource TextBlockStyle}" Width="200" FontFamily="DG1_Arial" Foreground="White" RenderTransformOrigin="0.5,0.5" TextAlignment="Center"/>
			<local:FastTextBlock x:Name="Text_ExternalTemp" Canvas.Left="672.333" Canvas.Top="83.662" Text="{Binding ExternalTemp}" FontSize="21.333" Style="{StaticResource TextBlockStyle}" Width="120" FontFamily="DG1_Arial" Foreground="White" RenderTransformOrigin="0.5,0.5" TextAlignment="Right"/>
			<local:FastTextBlock x:Name="Text_TripOdo" Canvas.Left="714.5" Canvas.Top="383.63" Text="{Binding TripMeter}" FontSize="21.333" Style="{StaticResource TextBlockStyle}" Width="120" FontFamily="DG1_Arial" Foreground="White" RenderTransformOrigin="0.5,0.5" TextAlignment="Right"/>
			<local:FastTextBlock x:Name="Text_Odometer" Canvas.Left="407.326" Canvas.Top="383.63" Text="{Binding Odometer}" FontSize="21.333" Style="{StaticResource TextBlockStyle}" Width="120" FontFamily="DG1_Arial" Foreground="White" RenderTransformOrigin="0.5,0.5" TextAlignment="Right"/>
			<Image x:Name="Glyph_C" Height="13" Canvas.Left="795.996" Source="game:/media/cars/JAG_IPACE_18/UI/Textures/JAG_IPACE_18_txt_temp.png" Stretch="Fill" Canvas.Top="91.666" Width="17" RenderTransformOrigin="0.5,0.5">
				<Image.RenderTransform>
					<TransformGroup>
						<ScaleTransform ScaleX="1.2" ScaleY="1.2"/>
						<SkewTransform/>
						<RotateTransform/>
						<TranslateTransform/>
					</TransformGroup>
				</Image.RenderTransform>
			</Image>
		</Canvas>
        <Rectangle x:Name="Start_Up_Mask" Fill="Black" Height="720" Stroke="Black" Width="1280" Opacity="0"/>
		
				<!-- Storyboard binding controllers -->
		<local:StoryboardController SeekPct="{Binding AnalogGear}" Target="{StaticResource Gear Analog}"/>
		<local:StoryboardController SeekPct="{Binding Fuel}" Target="{StaticResource Fuel Gauge}"/>
		<local:StoryboardController SeekPct="{Binding AnalogSpeed}" Target="{StaticResource Speedo Analog}"/>
	
		
	</Canvas>
</Page>