<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="DigitalGauge.DOD_DurangoHellcat_21"
	 >
	
    <Page.Resources>
        <Style x:Key="TextBlockStyle" TargetType="{x:Type local:FastTextBlock}">
            <Setter Property="FontFamily" Value="DG1_Arial"/>
            <Setter Property="Foreground" Value="White"/>
             
            <Setter Property="TextAlignment" Value="Right"/>
        </Style>
		
		<local:DigitalGaugeConfig x:Key="Config" HasClock="False" HasExternalTemp="False" 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="False" HasTextFuel="False" MaxFuel="20" MinGear="-1" MaxGear="1" MaxRpm="7000"></local:DigitalGaugeConfig>
        
		<Storyboard x:Key="Gear Analog">
			<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_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_D">
				<DiscreteObjectKeyFrame KeyTime="0" Value="{x:Static Visibility.Hidden}"/>
				<DiscreteObjectKeyFrame KeyTime="0:0:1" Value="{x:Static Visibility.Visible}"/>
			</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:1" Value="0"/>
			</DoubleAnimationUsingKeyFrames>
		</Storyboard>
		<Storyboard x:Key="Tach">
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)" Storyboard.TargetName="Needle">
				<EasingDoubleKeyFrame KeyTime="0" Value="-115.562"/>
				<EasingDoubleKeyFrame KeyTime="0:0:1" Value="90"/>
			</DoubleAnimationUsingKeyFrames>
		</Storyboard>
	</Page.Resources>
	<Page.Triggers>
		<EventTrigger RoutedEvent="FrameworkElement.Loaded">
			<BeginStoryboard Storyboard="{StaticResource Tach}"/>
		</EventTrigger>
	</Page.Triggers>
	  

	<Canvas x:Name="LayoutRoot" Background="Black" Width="1280" Height="720">
		<VisualStateManager.VisualStateGroups>
			<VisualStateGroup x:Name="NightDaySplit">
				<VisualState x:Name="Day"/>
				<VisualState x:Name="Night"/>
			</VisualStateGroup>
		</VisualStateManager.VisualStateGroups>
		<Image x:Name="Graphics_Center" Height="326" Canvas.Left="428" Source="game:/media/cars/DOD_DurangoHellcat_21/UI/Textures/DOD_DurangoHellcat_21_Graphic_Center.PNG" Stretch="Fill" Canvas.Top="146" Width="450"/>
		<Image x:Name="Graphics_L" Height="190" Canvas.Left="279.5" Source="game:/media/cars/DOD_DurangoHellcat_21/UI/Textures/DOD_DurangoHellcat_21_Graphic_L.PNG" Stretch="Fill" Canvas.Top="268" Width="50"/>
		<Image x:Name="Graphics_R" Height="104" Canvas.Left="971" Source="game:/media/cars/DOD_DurangoHellcat_21/UI/Textures/DOD_DurangoHellcat_21_Graphic_R.PNG" Stretch="Fill" Canvas.Top="267" Width="40"/>
        <Rectangle x:Name="Mask" Fill="Black" Height="32" Canvas.Left="630" Canvas.Top="352" Width="32"/>
        <Canvas x:Name="Gear_Analog" Height="448" Width="311" Canvas.Left="819.5" Canvas.Top="136">
        	<Image x:Name="Gear_D" Height="28" Canvas.Left="164.5" Source="game:/media/cars/DOD_DurangoHellcat_21/UI/Textures/DOD_DurangoHellcat_21_Gear_D.PNG" Stretch="Fill" Canvas.Top="211" Width="30" Visibility="Hidden"/>
        	<Image x:Name="Gear_N" Height="28" Canvas.Left="162.5" Source="game:/media/cars/DOD_DurangoHellcat_21/UI/Textures/DOD_DurangoHellcat_21_Gear_N.PNG" Stretch="Fill" Canvas.Top="181" Width="30" Visibility="Hidden"/>
        	<Image x:Name="Gear_R" Height="28" Canvas.Left="154.5" Source="game:/media/cars/DOD_DurangoHellcat_21/UI/Textures/DOD_DurangoHellcat_21_Gear_R.PNG" Stretch="Fill" Canvas.Top="155" Width="30"/>
        </Canvas>
        <Canvas x:Name="Tach_Animation" Height="558" Canvas.Left="374" Canvas.Top="92" Width="558">
        	<Image x:Name="Needle" Height="86" Canvas.Left="205" Source="game:/media/cars/DOD_DurangoHellcat_21/UI/Textures/DOD_DurangoHellcat_21_Needle.PNG" Stretch="Fill" Canvas.Top="68.5" Width="148" RenderTransformOrigin="0.5,2.45">
        		<Image.RenderTransform>
        			<TransformGroup>
        				<ScaleTransform/>
        				<SkewTransform/>
        				<RotateTransform Angle="-115.562"/>
        				<TranslateTransform/>
        			</TransformGroup>
        		</Image.RenderTransform>
        	</Image>
        </Canvas>
		<Canvas x:Name="Text" Height="720" Width="1280">
			<local:FastTextBlock x:Name="Text_Speed" Canvas.Left="416" Canvas.Top="288" Text="{Binding Speed}" FontSize="64" Style="{StaticResource TextBlockStyle}" FontFamily="Moire" Width="300" Foreground="White" RenderTransformOrigin="0.5,0.5">
				<local:FastTextBlock.RenderTransform>
					<TransformGroup>
						<ScaleTransform ScaleX="1.2"/>
						<SkewTransform AngleX="-10"/>
						<RotateTransform/>
						<TranslateTransform/>
					</TransformGroup>
				</local:FastTextBlock.RenderTransform>
			</local:FastTextBlock>
		</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 Tach}" Target="{StaticResource Tach}"/>
	</Canvas>
</Page>