<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.NIS_Titan_HE_17">
	
    <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="True" UseDegreesF="True" UseMPH="True" UsePsi="True" MaxBoost="22" MinBoost="0" MaxSpeed="120" HasAbsLight="False" HasStmLight="False" HasTcsLight="False" HasGAccelX="False" HasGAccelY="False" HasShiftLights="False" HasTextTach="True" HasLapPlaceInfo="True" HasTextBoost="False" HasTextGAccel="False" HasTextOdometer="True" HasTextFuel="False" MaxFuel="20" MinGear="-1" MaxGear="1" MaxRpm="7500"></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="Gear Analog">
			<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Gear_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="Gear_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="Gear_D">
				<DiscreteObjectKeyFrame KeyTime="0" Value="{x:Static Visibility.Hidden}"/>
				<DiscreteObjectKeyFrame KeyTime="0:0:1" Value="{x:Static Visibility.Visible}"/>
			</ObjectAnimationUsingKeyFrames>
		</Storyboard>
		<Storyboard x:Key="Boost Analog">
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)" Storyboard.TargetName="Boost_Cap">
				<EasingDoubleKeyFrame KeyTime="0" Value="0"/>
				<EasingDoubleKeyFrame KeyTime="0:0:1" Value="90.375"/>
			</DoubleAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)" Storyboard.TargetName="Boost_Fill">
				<EasingDoubleKeyFrame KeyTime="0" Value="1"/>
				<EasingDoubleKeyFrame KeyTime="0:0:1" Value="41.473"/>
			</DoubleAnimationUsingKeyFrames>
		</Storyboard>
	</Page.Resources>
	<Page.Triggers>
		<EventTrigger RoutedEvent="FrameworkElement.Loaded">
			<BeginStoryboard Storyboard="{StaticResource Gear Analog}"/>
			<BeginStoryboard Storyboard="{StaticResource Boost 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="Neutral_Background" Fill="Black" Height="720" Width="1280" Canvas.Top="0"/>
		<Image x:Name="MFD_Graphics" Height="362" Canvas.Left="520" Source="game:/media/cars/NIS_Titan_HE_17/UI/Textures/NIS_Titan_17_graphics.png" Stretch="Fill" Canvas.Top="160" Width="236"/>
		<Canvas x:Name="Text" Height="720" Width="1280">
			<local:FastTextBlock x:Name="Text_Temperature" Canvas.Left="384" Canvas.Top="489.403" Text="{Binding ExternalTemp}" Width="180" FontSize="29.333" Style="{StaticResource TextBlockStyle}" FontFamily="DG1_Arial" RenderTransformOrigin="0.5,0.5" Foreground="White"/>
			<local:FastTextBlock x:Name="Text_Odometer" Canvas.Left="427.332" Canvas.Top="153.665" Text="{Binding TripMeter}" Width="300" FontSize="29.333" Style="{StaticResource TextBlockStyle}" RenderTransformOrigin="0.5,0.5" FontFamily="DG1_Arial" Foreground="White"/>
			<Canvas x:Name="PRND_Animation" Height="424.127" Canvas.Left="360" Canvas.Top="215.873" Width="552">
				<Image x:Name="Gear_N" Height="36" Canvas.Left="243.683" Source="game:/media/cars/NIS_Titan_HE_17/UI/Textures/NIS_Titan_17_gear_N.png" Stretch="Fill" Canvas.Top="274.795" Width="85" Visibility="Hidden"/>
				<Image x:Name="Gear_D" Height="36" Canvas.Left="243.683" Source="game:/media/cars/NIS_Titan_HE_17/UI/Textures/NIS_Titan_17_gear_D.png" Stretch="Fill" Canvas.Top="274.795" Width="85" Visibility="Hidden"/>
				<Image x:Name="Gear_R" Height="36" Canvas.Left="243.683" Source="game:/media/cars/NIS_Titan_HE_17/UI/Textures/NIS_Titan_17_gear_R.png" Stretch="Fill" Canvas.Top="274.795" Width="85"/>
			</Canvas>
		</Canvas>
		<Canvas x:Name="Boost_Animation" Height="96" Canvas.Left="488" Canvas.Top="336" Width="288">
			<Image x:Name="Boost_Fill" Height="15" Canvas.Left="101.683" Source="game:/media/cars/NIS_Titan_HE_17/UI/Textures/NIS_Titan_17_Boost_Fill.png" Stretch="Fill" Canvas.Top="48" Width="2.232" RenderTransformOrigin="0,0.5">
				<Image.RenderTransform>
					<TransformGroup>
						<ScaleTransform/>
						<SkewTransform/>
						<RotateTransform/>
						<TranslateTransform/>
					</TransformGroup>
				</Image.RenderTransform>
			</Image>
			<Image x:Name="Boost_Cap" Height="15" Canvas.Left="103.915" Source="game:/media/cars/NIS_Titan_HE_17/UI/Textures/NIS_Titan_17_Boost_Cap.png" Stretch="Fill" Canvas.Top="48" Width="7" RenderTransformOrigin="0.5,0.5">
				<Image.RenderTransform>
					<TransformGroup>
						<ScaleTransform/>
						<SkewTransform/>
						<RotateTransform/>
						<TranslateTransform/>
					</TransformGroup>
				</Image.RenderTransform>
			</Image>
		</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 AnalogGear}" Target="{StaticResource Gear Analog}"/>
	    <local:StoryboardController SeekPct="{Binding BoostAnim}" Target="{StaticResource Boost Analog}"/>
	</Canvas>
</Page>