<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_Demon_18"
	 >
	
    <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="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="20" MinGear="-1" MaxGear="1" MaxRpm="10000"></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="Needle_Fuel">
				<EasingDoubleKeyFrame KeyTime="0" Value="63.048"/>
				<EasingDoubleKeyFrame KeyTime="0:0:1" Value="87.855"/>
			</DoubleAnimationUsingKeyFrames>
			<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Icon_Fuel_Low">
				<DiscreteObjectKeyFrame KeyTime="0" Value="{x:Static Visibility.Visible}"/>
				<DiscreteObjectKeyFrame KeyTime="0:0:0.067" Value="{x:Static Visibility.Hidden}"/>
			</ObjectAnimationUsingKeyFrames>
		</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">
			<BeginStoryboard Storyboard="{StaticResource Fuel Gauge}"/>
			<BeginStoryboard Storyboard="{StaticResource Gear Analog}"/>
		</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="Main_Graphics" Height="398" Canvas.Left="307" Source="game:/media/cars/DOD_Demon_18/UI/Textures/DOD_DemonFast8_17_graphics.PNG" Stretch="Fill" Canvas.Top="152.34" Width="668" Opacity="0.985" />
		<Image x:Name="Needle_Temperature" Height="32" Canvas.Left="149" Source="game:/media/cars/DOD_Demon_18/UI/Textures/DOD_ChargerSRTHellcat_15_Needle.png" Stretch="Fill" Canvas.Top="678" Width="6" RenderTransformOrigin="1,-6.636">
			<Image.RenderTransform>
				<TransformGroup>
					<ScaleTransform/>
					<SkewTransform/>
					<RotateTransform Angle="-72.441"/>
					<TranslateTransform X="66.21" Y="-75.486"/>
				</TransformGroup>
			</Image.RenderTransform>
		</Image>
		<Canvas x:Name="Fuel_Animation" Height="720" Canvas.Left="27" Canvas.Top="-10" Width="1280">
			<Image x:Name="Icon_Fuel_Low" Height="18" Canvas.Left="796" Source="game:/media/cars/DOD_Demon_18/UI/Textures/DOD_DemonFast8_17_fuel_low.PNG" Stretch="Fill" Canvas.Top="518.354" Width="18" Visibility="Hidden"/>
			<Image x:Name="Needle_Fuel" Height="32" Canvas.Left="1040.5" Source="game:/media/cars/DOD_Demon_18/UI/Textures/DOD_ChargerSRTHellcat_15_Needle.png" Stretch="Fill" Canvas.Top="624" Width="6" RenderTransformOrigin="0.5,-7">
				<Image.RenderTransform>
					<TransformGroup>
						<ScaleTransform/>
						<SkewTransform/>
						<RotateTransform Angle="63.048"/>
						<TranslateTransform X="5.984" Y="2.336"/>
					</TransformGroup>
				</Image.RenderTransform>
			</Image>
		</Canvas>
		<Canvas x:Name="Analog_Gear" Height="217" Canvas.Left="704" Canvas.Top="220" Width="251">
			<Image x:Name="Shift_R" Height="24" Source="game:/media/cars/DOD_Demon_18/UI/Textures/DOD_ChargerSRTHellcat_15_Shift_R.png" Stretch="Fill" Width="31" Canvas.Left="120.331" Canvas.Top="69.667"/>
			<Image x:Name="Shift_N" Height="26" Source="game:/media/cars/DOD_Demon_18/UI/Textures/DOD_ChargerSRTHellcat_15_Shift_N.png" Stretch="Fill" Width="34" Canvas.Left="107.001" Canvas.Top="98.333" Visibility="Hidden"/>
			<Image x:Name="Shift_D" Height="26" Canvas.Left="102.666" Source="game:/media/cars/DOD_Demon_18/UI/Textures/DOD_ChargerSRTHellcat_15_Shift_D.png" Stretch="Fill" Canvas.Top="127.334" Width="32" Visibility="Hidden"/>
		</Canvas>
		<Canvas x:Name="Text" Height="720" Width="1280" Canvas.Left="27" Canvas.Top="-10">
			<local:FastTextBlock x:Name="Text_TripMeter" Canvas.Left="494.722" Canvas.Top="517" Text="{Binding TripMeter}" Width="119.76" FontSize="24" Style="{StaticResource TextBlockStyle}" FontFamily="DG1_Arial"   RenderTransformOrigin="0.5,0.5">
				<local:FastTextBlock.RenderTransform>
					<TransformGroup>
						<ScaleTransform ScaleX="0.9"/>
						<SkewTransform/>
						<RotateTransform/>
						<TranslateTransform/>
					</TransformGroup>
				</local:FastTextBlock.RenderTransform>
			</local:FastTextBlock>
			<local:FastTextBlock x:Name="Text_Temperature" Canvas.Left="724.722" Canvas.Top="200" Text="{Binding ExternalTemp}" Width="119.76" FontSize="32" Style="{StaticResource TextBlockStyle}" FontFamily="DG1_Arial"   RenderTransformOrigin="0.5,0.5"/>
			<local:FastTextBlock x:Name="Text_Speed" Canvas.Left="365" Canvas.Top="290" Text="{Binding Speed}" Width="500" FontSize="101.333" Style="{StaticResource TextBlockStyle}" FontFamily="Moire"   RenderTransformOrigin="0.5,0.5" TextAlignment="Center">
				<local:FastTextBlock.RenderTransform>
					<TransformGroup>
						<ScaleTransform/>
						<SkewTransform AngleX="-15"/>
						<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 Fuel}" Target="{StaticResource Fuel Gauge}"/>
	</Canvas>
</Page>