<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.CAD_CTSVSedan_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="False" UseDegreesF="True" UseMPH="True" UsePsi="True" MinBoost="0" MaxBoost="20" MaxSpeed="90.82" 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="19" MinGear="-1" MaxGear="1" MaxRpm="8000.0"></local:DigitalGaugeConfig>
        
		<Storyboard x:Key="Tach">
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)" Storyboard.TargetName="Needle">
				<EasingDoubleKeyFrame KeyTime="0" Value="0"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.125" Value="35.587"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.25" Value="72.125"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.375" Value="107.806"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.5" Value="143.917"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.625" Value="180"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.751" Value="225.71"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.874" Value="270"/>
				<EasingDoubleKeyFrame KeyTime="0:0:1" Value="270"/>
			</DoubleAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)" Storyboard.TargetName="Tach_Fill_01">
				<EasingDoubleKeyFrame KeyTime="0" Value="-90"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.125" Value="-55.101"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.25" Value="-17.477"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.309" Value="0"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.375" Value="17.413"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.5" Value="53.768"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.625" Value="90"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.751" Value="135.102"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.874" Value="180"/>
				<EasingDoubleKeyFrame KeyTime="0:0:1" Value="180"/>
			</DoubleAnimationUsingKeyFrames>
			<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Tach_Fill_02">
				<DiscreteObjectKeyFrame KeyTime="0" Value="{x:Static Visibility.Hidden}"/>
				<DiscreteObjectKeyFrame KeyTime="0:0:0.309" Value="{x:Static Visibility.Visible}"/>
				<DiscreteObjectKeyFrame KeyTime="0:0:0.874" Value="{x:Static Visibility.Visible}"/>
				<DiscreteObjectKeyFrame KeyTime="0:0:1" Value="{x:Static Visibility.Visible}"/>
			</ObjectAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)" Storyboard.TargetName="Tach_Fill_02">
				<EasingDoubleKeyFrame KeyTime="0:0:0.309" Value="-90"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.375" Value="-72.492"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.5" Value="-36.205"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.625" Value="0"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.751" Value="45.154"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.874" Value="90"/>
				<EasingDoubleKeyFrame KeyTime="0:0:1" Value="90"/>
			</DoubleAnimationUsingKeyFrames>
			<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Tach_Fill_03">
				<DiscreteObjectKeyFrame KeyTime="0" Value="{x:Static Visibility.Hidden}"/>
				<DiscreteObjectKeyFrame KeyTime="0:0:0.625" Value="{x:Static Visibility.Visible}"/>
				<DiscreteObjectKeyFrame KeyTime="0:0:0.874" Value="{x:Static Visibility.Visible}"/>
				<DiscreteObjectKeyFrame KeyTime="0:0:1" Value="{x:Static Visibility.Visible}"/>
			</ObjectAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)" Storyboard.TargetName="Tach_Fill_03">
				<EasingDoubleKeyFrame KeyTime="0:0:0.625" Value="-90"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.751" Value="-44.835"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.874" Value="0"/>
				<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_Needle">
				<EasingDoubleKeyFrame KeyTime="0" Value="180"/>
				<EasingDoubleKeyFrame KeyTime="0:0:1" Value="134.441"/>
			</DoubleAnimationUsingKeyFrames>
			<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Empty_Icon">
				<DiscreteObjectKeyFrame KeyTime="0" Value="{x:Static Visibility.Visible}"/>
				<DiscreteObjectKeyFrame KeyTime="0:0:0.116" Value="{x:Static Visibility.Visible}"/>
				<DiscreteObjectKeyFrame KeyTime="0:0:0.132" Value="{x:Static Visibility.Hidden}"/>
			</ObjectAnimationUsingKeyFrames>
		</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:0.1" Value="1"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.2" Value="0"/>
			</DoubleAnimationUsingKeyFrames>
			<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Start_Up_Mask">
				<DiscreteObjectKeyFrame KeyTime="0:0:0.2" Value="{x:Static Visibility.Visible}"/>
				<DiscreteObjectKeyFrame KeyTime="0:0:0.8" Value="{x:Static Visibility.Hidden}"/>
			</ObjectAnimationUsingKeyFrames>
		</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)[2].(RotateTransform.Angle)" Storyboard.TargetName="Boost_Outside">
				<EasingDoubleKeyFrame KeyTime="0" Value="-179.026"/>
				<EasingDoubleKeyFrame KeyTime="0:0:1" Value="-132.934"/>
			</DoubleAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)" Storyboard.TargetName="Boost_Inside">
				<EasingDoubleKeyFrame KeyTime="0" Value="180"/>
				<EasingDoubleKeyFrame KeyTime="0:0:1" Value="360"/>
			</DoubleAnimationUsingKeyFrames>
		</Storyboard>
	</Page.Resources>
	<Page.Triggers>
		<EventTrigger RoutedEvent="FrameworkElement.Loaded">
			<BeginStoryboard Storyboard="{StaticResource Gear Analog}"/>
			<BeginStoryboard Storyboard="{StaticResource Boost Analog}"/>
		</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_Black" Fill="Black" Height="720" Stroke="Black" Width="1280" Canvas.Left="0" Canvas.Top="0" />
		<Canvas x:Name="Tach_Animation" Height="564" Canvas.Left="357.999" Canvas.Top="78.005" Width="564" RenderTransformOrigin="0.5,0.5">
			<Canvas.RenderTransform>
				<TransformGroup>
					<ScaleTransform/>
					<SkewTransform/>
					<RotateTransform/>
					<TranslateTransform/>
				</TransformGroup>
			</Canvas.RenderTransform>
			<Image x:Name="Background" Height="260" Canvas.Left="152.001" Source="game:/media/cars/CAD_CTSVSedan_16/UI/Textures/CAD_CTSVSedan_16_Tach_bckgd.png" Stretch="Fill" Canvas.Top="151.995" Width="260"/>
			<Image x:Name="Tach_Fill_01" Height="129" Canvas.Left="153.001" Source="game:/media/cars/CAD_CTSVSedan_16/UI/Textures/CAD_CTSVSedan_16_tach_fill.png" Stretch="Fill" Canvas.Top="281.995" Width="129" RenderTransformOrigin="1,0">
				<Image.RenderTransform>
					<TransformGroup>
						<ScaleTransform/>
						<SkewTransform/>
						<RotateTransform Angle="-90"/>
						<TranslateTransform/>
					</TransformGroup>
				</Image.RenderTransform>
			</Image>
			<Image x:Name="Tach_Fill_02" Height="129" Canvas.Left="153.001" Source="game:/media/cars/CAD_CTSVSedan_16/UI/Textures/CAD_CTSVSedan_16_tach_fill.png" Stretch="Fill" Canvas.Top="281.995" Width="129" RenderTransformOrigin="1,0" Visibility="Hidden">
				<Image.RenderTransform>
					<TransformGroup>
						<ScaleTransform/>
						<SkewTransform/>
						<RotateTransform Angle="-90"/>
						<TranslateTransform/>
					</TransformGroup>
				</Image.RenderTransform>
			</Image>
			<Image x:Name="Tach_Fill_03" Height="129" Canvas.Left="153.001" Source="game:/media/cars/CAD_CTSVSedan_16/UI/Textures/CAD_CTSVSedan_16_tach_fill.png" Stretch="Fill" Canvas.Top="281.995" Width="129" RenderTransformOrigin="1,0" Visibility="Hidden">
				<Image.RenderTransform>
					<TransformGroup>
						<ScaleTransform/>
						<SkewTransform/>
						<RotateTransform Angle="-90"/>
						<TranslateTransform/>
					</TransformGroup>
				</Image.RenderTransform>
			</Image>
			<Image x:Name="Alpha" Height="324" Canvas.Left="120" Source="game:/media/cars/CAD_CTSVSedan_16/UI/Textures/CAD_CTSVSedan_16_alpha_tach.png" Stretch="Fill" Canvas.Top="119.994" Width="330"/>
			<Image x:Name="Needle" Height="163" Canvas.Left="273.501" Source="game:/media/cars/CAD_CTSVSedan_16/UI/Textures/CAD_CTSVSedan_16_Tach_Needle.png" Stretch="Fill" Canvas.Top="262.495" Width="17" RenderTransformOrigin="0.5,0.12">
				<Image.RenderTransform>
					<TransformGroup>
						<ScaleTransform/>
						<SkewTransform/>
						<RotateTransform/>
						<TranslateTransform/>
					</TransformGroup>
				</Image.RenderTransform>
			</Image>
			<Image x:Name="Flag_Icon" Height="30" Canvas.Left="432" Source="game:/media/cars/CAD_CTSVSedan_16/UI/Textures/CAD_CTSVSedan_16_flag_icon.png" Stretch="Fill" Canvas.Top="121.995" Width="33" RenderTransformOrigin="0.5,0.5">
				<Image.RenderTransform>
					<TransformGroup>
						<ScaleTransform ScaleX="0.9" ScaleY="0.9"/>
						<SkewTransform/>
						<RotateTransform/>
						<TranslateTransform/>
					</TransformGroup>
				</Image.RenderTransform>
			</Image>
		</Canvas>
		<Canvas x:Name="Fuel_Animation" Height="393" Canvas.Left="739.667" Canvas.Top="163.336" Width="383">
			<Image x:Name="Graphics_Fuel" Height="292" Canvas.Left="146.995" Source="game:/media/cars/CAD_CTSVSedan_16/UI/Textures/CAD_CTSVSedan_16_graphics_fuel.png" Stretch="Fill" Canvas.Top="45.994" Width="152"/>
			<Image x:Name="Empty_Icon" Height="22" Canvas.Left="151" Source="game:/media/cars/CAD_CTSVSedan_16/UI/Textures/CAD_CTSVSedan_16_Fuel_Empty.png" Stretch="Fill" Canvas.Top="307.997" Width="27" Visibility="Hidden"/>
			<Image x:Name="Fuel_Needle" Height="46" Canvas.Left="194.333" Source="game:/media/cars/CAD_CTSVSedan_16/UI/Textures/CAD_CTSVSedan_16_Fuel_Needle.png" Stretch="Fill" Canvas.Top="51.164" Width="6" RenderTransformOrigin="0.5,3.2">
				<Image.RenderTransform>
					<TransformGroup>
						<ScaleTransform/>
						<SkewTransform/>
						<RotateTransform Angle="180"/>
						<TranslateTransform X="-6" Y="-7.636"/>
					</TransformGroup>
				</Image.RenderTransform>
			</Image>
			<Image x:Name="Water_Temp_Needle" Height="46" Canvas.Left="188.333" Source="game:/media/cars/CAD_CTSVSedan_16/UI/Textures/CAD_CTSVSedan_16_Fuel_Needle.png" Stretch="Fill" Canvas.Top="44.664" Width="6" RenderTransformOrigin="0.5,3.18">
				<Image.RenderTransform>
					<TransformGroup>
						<ScaleTransform/>
						<SkewTransform/>
						<RotateTransform Angle="28.768"/>
						<TranslateTransform/>
					</TransformGroup>
				</Image.RenderTransform>
			</Image>
		</Canvas>
		<Canvas x:Name="Gear_Animation" Height="104.336" Canvas.Left="704" Canvas.Top="456" Width="152">
			<Image x:Name="Gear_R" Height="17" Canvas.Left="40.993" Source="game:/media/cars/CAD_CTSVSedan_16/UI/Textures/CAD_CTSVSedan_16_txt_Gear_R.png" Stretch="Fill" Canvas.Top="47.001" Width="14"/>
			<Image x:Name="Gear_N" Height="17" Canvas.Left="54.996" Source="game:/media/cars/CAD_CTSVSedan_16/UI/Textures/CAD_CTSVSedan_16_txt_Gear_N.png" Stretch="Fill" Canvas.Top="47.001" Width="16" Visibility="Hidden"/>
			<Image x:Name="Gear_D" Height="17" Canvas.Left="70.981" Source="game:/media/cars/CAD_CTSVSedan_16/UI/Textures/CAD_CTSVSedan_16_txt_Gear_D.png" Stretch="Fill" Canvas.Top="47.001" Width="15" Visibility="Hidden"/>
		</Canvas>
		<Canvas x:Name="Boost_Animation" Height="397" Canvas.Left="188.667" Canvas.Top="156.002" Width="321.999">
			<Image x:Name="Boost_Graphics" Height="292" Canvas.Left="52.333" Source="game:/media/cars/CAD_CTSVSedan_16/UI/Textures/CAD_CTSVSedan_16_graphics_turbo.png" Stretch="Fill" Canvas.Top="52.998" Width="152"/>
			<Image x:Name="Oil_Needle" Height="46" Canvas.Left="157.333" Source="game:/media/cars/CAD_CTSVSedan_16/UI/Textures/CAD_CTSVSedan_16_Fuel_Needle.png" Stretch="Fill" Canvas.Top="51.498" Width="6" RenderTransformOrigin="1,3.195">
				<Image.RenderTransform>
					<TransformGroup>
						<ScaleTransform/>
						<SkewTransform/>
						<RotateTransform Angle="-19.433"/>
						<TranslateTransform/>
					</TransformGroup>
				</Image.RenderTransform>
			</Image>
			<Image x:Name="Boost_Outside" Height="46" Canvas.Left="153.833" Source="game:/media/cars/CAD_CTSVSedan_16/UI/Textures/CAD_CTSVSedan_16_Fuel_Needle.png" Stretch="Fill" Canvas.Top="51.498" Width="6" RenderTransformOrigin="1,3.195">
				<Image.RenderTransform>
					<TransformGroup>
						<ScaleTransform/>
						<SkewTransform/>
						<RotateTransform Angle="-179.026"/>
						<TranslateTransform/>
					</TransformGroup>
				</Image.RenderTransform>
			</Image>
			<Image x:Name="Boost_Inside" Height="96" Canvas.Left="150.833" Source="game:/media/cars/CAD_CTSVSedan_16/UI/Textures/CAD_CTSVSedan_16_Turbo_Needle.png" Stretch="Fill" Canvas.Top="167.498" Width="6" RenderTransformOrigin="0.5,1">
				<Image.RenderTransform>
					<TransformGroup>
						<ScaleTransform ScaleY="0.93"/>
						<SkewTransform/>
						<RotateTransform Angle="180"/>
						<TranslateTransform X="6" Y="-65.403"/>
					</TransformGroup>
				</Image.RenderTransform>
			</Image>
			<Image x:Name="Fluid_Needle" Height="96" Canvas.Left="739.833" Source="game:/media/cars/CAD_CTSVSedan_16/UI/Textures/CAD_CTSVSedan_16_Turbo_Needle.png" Stretch="Fill" Canvas.Top="102.498" Width="6" RenderTransformOrigin="0.5,1">
				<Image.RenderTransform>
					<TransformGroup>
						<ScaleTransform ScaleY="0.93"/>
						<SkewTransform/>
						<RotateTransform Angle="103.601"/>
						<TranslateTransform/>
					</TransformGroup>
				</Image.RenderTransform>
			</Image>
		</Canvas>
		<Canvas x:Name="Text" Height="720" Width="1280">
			<TextBlock x:Name="Text_Speed" Canvas.Left="607" Canvas.Top="383.373" Text="{Binding Speed}" Width="200" FontSize="37.333" Style="{StaticResource TextBlockStyle}" TextAlignment="Center" RenderTransformOrigin="0.5,0.5" Foreground="Black">
				<TextBlock.RenderTransform>
					<TransformGroup>
						<ScaleTransform/>
						<SkewTransform AngleX="-10"/>
						<RotateTransform/>
						<TranslateTransform/>
					</TransformGroup>
				</TextBlock.RenderTransform>
			</TextBlock>
			<TextBlock x:Name="Text_Trip_Odo" Canvas.Left="416.663" Canvas.Top="497.408" Text="{Binding TripMeter}" Width="100" FontSize="21.333" Style="{StaticResource TextBlockStyle}"/>
			<Image x:Name="Boost_Text" Height="191" Canvas.Left="254.999" Source="game:/media/cars/CAD_CTSVSedan_16/UI/Textures/CAD_CTSVSedan_16_text_turbo.png" Stretch="Fill" Canvas.Top="291" Width="107"/>
			<Image x:Name="Fuel_Text" Height="200" Canvas.Left="910.003" Source="game:/media/cars/CAD_CTSVSedan_16/UI/Textures/CAD_CTSVSedan_16_text_fuel.png" Stretch="Fill" Canvas.Top="286.001" Width="120"/>
			<Image x:Name="Text_Tach" Height="251" Canvas.Left="517" Source="game:/media/cars/CAD_CTSVSedan_16/UI/Textures/CAD_CTSVSedan_16_Tach_txt.png" Stretch="Fill" Canvas.Top="233.001" Width="253"/>
		</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 BoostAnim}" Target="{StaticResource Boost Analog}"/>
		<local:StoryboardController SeekPct="{Binding AnalogGear}" Target="{StaticResource Gear Analog}"/>
		<local:StoryboardController SeekPct="{Binding Fuel}" Target="{StaticResource Fuel Gauge}"/>
	</Canvas>
</Page>