<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.FER_488GTB_16"
	 >
	
    <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="True" HasExternalTemp="True" UseDegreesF="False" UseMPH="False" UsePsi="False" MaxBoost="13" MinBoost="1" MaxSpeed="103" 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" MaxGear="8" 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>
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.Width)" Storyboard.TargetName="Start_Up_Mask">
				<EasingDoubleKeyFrame KeyTime="0" Value="1280"/>
				<EasingDoubleKeyFrame KeyTime="0:0:1" Value="1280"/>
			</DoubleAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.Height)" Storyboard.TargetName="Start_Up_Mask">
				<EasingDoubleKeyFrame KeyTime="0" Value="720"/>
				<EasingDoubleKeyFrame KeyTime="0:0:1" Value="720"/>
			</DoubleAnimationUsingKeyFrames>
		</Storyboard>
		<Storyboard x:Key="Speedo Analog">
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)" Storyboard.TargetName="Speedo_Needle">
				<EasingDoubleKeyFrame KeyTime="0" Value="-136"/>
				<EasingDoubleKeyFrame KeyTime="0:0:1" Value="99"/>
			</DoubleAnimationUsingKeyFrames>
		</Storyboard>
		<Storyboard x:Key="Fuel Gauge">
			<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Cell_1">
				<DiscreteObjectKeyFrame KeyTime="0:0:0.1" Value="{x:Static Visibility.Visible}"/>
			</ObjectAnimationUsingKeyFrames>
			<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Cell_2">
				<DiscreteObjectKeyFrame KeyTime="0:0:0.2" Value="{x:Static Visibility.Visible}"/>
			</ObjectAnimationUsingKeyFrames>
			<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Cell_3">
				<DiscreteObjectKeyFrame KeyTime="0:0:0.3" Value="{x:Static Visibility.Visible}"/>
			</ObjectAnimationUsingKeyFrames>
			<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Cell_4">
				<DiscreteObjectKeyFrame KeyTime="0:0:0.4" Value="{x:Static Visibility.Visible}"/>
			</ObjectAnimationUsingKeyFrames>
			<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Cell_5">
				<DiscreteObjectKeyFrame KeyTime="0:0:0.5" Value="{x:Static Visibility.Visible}"/>
			</ObjectAnimationUsingKeyFrames>
			<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Cell_6">
				<DiscreteObjectKeyFrame KeyTime="0:0:0.6" Value="{x:Static Visibility.Visible}"/>
			</ObjectAnimationUsingKeyFrames>
			<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Cell_7">
				<DiscreteObjectKeyFrame KeyTime="0:0:0.7" Value="{x:Static Visibility.Visible}"/>
			</ObjectAnimationUsingKeyFrames>
			<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Cell_8">
				<DiscreteObjectKeyFrame KeyTime="0:0:0.8" Value="{x:Static Visibility.Visible}"/>
			</ObjectAnimationUsingKeyFrames>
			<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Cell_9">
				<DiscreteObjectKeyFrame KeyTime="0:0:0.9" Value="{x:Static Visibility.Visible}"/>
			</ObjectAnimationUsingKeyFrames>
		</Storyboard>
	</Page.Resources>
	<Page.Triggers>
		<EventTrigger RoutedEvent="FrameworkElement.Loaded">
			<BeginStoryboard Storyboard="{StaticResource Speedo Analog}"/>
			<BeginStoryboard Storyboard="{StaticResource Fuel Gauge}"/>
		</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>
		<Canvas x:Name="Background" Height="720" Width="1280">
			<Rectangle x:Name="Background_Full" Fill="Black" Height="720" Canvas.Left="0" Canvas.Top="0" Width="1280"/>
		</Canvas>
		<Canvas x:Name="Large_Gauges" Height="230" Width="294" Canvas.Left="104" Canvas.Top="244.95" Background="Black">
			<Rectangle x:Name="TopYellow" Fill="#FFF3E02C" Height="20" Canvas.Left="0" Canvas.Top="28" Width="294"/>
			<Image x:Name="Race_Text" Height="31.737" Canvas.Left="85.667" Source="game:/media/cars/FER_488GTB_16/UI/Textures/FER_488GTB_16_Race_Text.png" Stretch="Fill" Canvas.Top="21.598" Width="253.902" RenderTransformOrigin="0.5,0.5"/>
			<Rectangle x:Name="Grey" Fill="#FF0E1420" Height="29" Canvas.Left="0" Canvas.Top="183" Width="294"/>
			<Image x:Name="km_Text" Height="16" Canvas.Left="164.5" Source="game:/media/cars/FER_488GTB_16/UI/Textures/FER_488GTB_16_km_Text.png" Stretch="Fill" Canvas.Top="181.45" Width="128"/>
			<Image x:Name="MFD_Gauges_Lg" Height="127.2" Stretch="Fill" Canvas.Top="54" Width="254.8" Panel.ZIndex="-2" Source="game:/media/cars/FER_488GTB_16/UI/Textures/FER_488GTB_16_MFD_Gauges_Lg.png" Canvas.Left="19.5"/>
			<Image x:Name="OilPressure_Needle" Height="81" Canvas.Left="69.926" Source="game:/media/cars/FER_488GTB_16/UI/Textures/FER_488GTB_16_Gauge_Needle.png" Stretch="Fill" Canvas.Top="99.479" Width="20.245" RenderTransformOrigin="0.484,0.276">
				<Image.RenderTransform>
					<TransformGroup>
						<ScaleTransform ScaleY="-1" ScaleX="-1"/>
						<SkewTransform AngleY="0" AngleX="0"/>
						<RotateTransform Angle="35"/>
						<TranslateTransform/>
					</TransformGroup>
				</Image.RenderTransform>
			</Image>
			<Image x:Name="Battery_Needle" Height="81" Canvas.Left="205.499" Source="game:/media/cars/FER_488GTB_16/UI/Textures/FER_488GTB_16_Gauge_Needle.png" Stretch="Fill" Canvas.Top="98.999" Width="20.25" RenderTransformOrigin="0.484,0.276">
				<Image.RenderTransform>
					<TransformGroup>
						<ScaleTransform ScaleY="-1" ScaleX="-1"/>
						<SkewTransform AngleY="0" AngleX="0"/>
						<RotateTransform Angle="41"/>
						<TranslateTransform/>
					</TransformGroup>
				</Image.RenderTransform>
			</Image>
			<Canvas x:Name="FuelGauge" Height="14.333" Canvas.Left="35.25" Canvas.Top="186.369" Width="81.333">
				<Rectangle x:Name="Cell_1" Fill="#FFFF8A0C" Height="14" Width="7" Canvas.Left="0" Canvas.Top="0" Visibility="Hidden"/>
				<Rectangle x:Name="Cell_2" Fill="#FFFF8A0C" Height="14" Width="7" Canvas.Left="9.327" Canvas.Top="0" Visibility="Hidden"/>
				<Rectangle x:Name="Cell_3" Fill="#FFFF8A0C" Height="14" Width="7" Canvas.Left="18.492" Canvas.Top="0" Visibility="Hidden"/>
				<Rectangle x:Name="Cell_4" Fill="#FFFF8A0C" Height="14" Width="7" Canvas.Left="27.657" Canvas.Top="0" Visibility="Hidden"/>
				<Rectangle x:Name="Cell_5" Fill="#FFFF8A0C" Height="14" Width="7" Canvas.Left="36.822" Canvas.Top="0" Visibility="Hidden"/>
				<Rectangle x:Name="Cell_6" Fill="#FFFF8A0C" Height="14" Width="7" Canvas.Left="45.987" Canvas.Top="0" Visibility="Hidden"/>
				<Rectangle x:Name="Cell_7" Fill="#FFFF8A0C" Height="14" Width="7" Canvas.Left="55.152" Canvas.Top="0" Visibility="Hidden"/>
				<Rectangle x:Name="Cell_8" Fill="#FFFF8A0C" Height="14" Width="7" Canvas.Left="64.317" Canvas.Top="0" Visibility="Hidden"/>
				<Rectangle x:Name="Cell_9" Fill="#FFFF8A0C" Height="14" Width="7" Canvas.Left="73.484" Canvas.Top="0" Visibility="Hidden"/>
			</Canvas>
			<Image x:Name="MFD_Fuel" Height="35.55" Canvas.Left="-9.513" Source="game:/media/cars/FER_488GTB_16/UI/Textures/FER_488GTB_16_Fuel.png" Stretch="Fill" Canvas.Top="181.2" Width="146.263"/>
			<local:FastTextBlock x:Name="Text_Clock" Canvas.Left="-33.264" Canvas.Top="25.695" Text="{Binding Time}" FontSize="18.667" Style="{StaticResource TextBlockStyle}" Foreground="Black" Width="100"/>
			<local:FastTextBlock x:Name="Text_External_Temp" Canvas.Left="202.835" Canvas.Top="25.691" Text="{Binding ExternalTemp}" FontSize="18.667" Style="{StaticResource TextBlockStyle}" Foreground="Black" Width="52.09" ToolTip=" "/>
			<local:FastTextBlock x:Name="Text_Odometer" Canvas.Left="118.333" Canvas.Top="193.033" Text="{Binding Odometer}" Width="98.333" FontSize="16" Style="{StaticResource TextBlockStyle}" Foreground="#FFF0F0F8"/>
			<local:FastTextBlock x:Name="Text_Speedo_Small" Canvas.Left="184.967" Canvas.Top="193.033" Text="{Binding Speed}" Width="98.333" FontSize="16" Style="{StaticResource TextBlockStyle}" Foreground="#FFF0F0F8"/>
		</Canvas>
		<Canvas x:Name="Panel_Center" Height="150" Canvas.Left="566" Canvas.Top="285" Width="150" Background="Black">
			<Image Width="30.375" Canvas.Top="74.375" Stretch="Fill" Source="game:/media/cars/FER_488GTB_16/UI/Textures/FER_488GTB_16_Gear_arrow.png" x:Name="Gear_arrow" Canvas.Left="28.5" Height="30.375"/>
			<Image Width="66.687" Canvas.Top="100.562" Stretch="Fill" Source="game:/media/cars/FER_488GTB_16/UI/Textures/FER_488GTB_16_Gear_auto.png" x:Name="Gear_auto" Canvas.Left="31.313" Height="16.672"/>
			<local:FastTextBlock x:Name="Text_Gear" TextAlignment="Center" Canvas.Left="53" Canvas.Top="50" Text="{Binding Gear}" Width="55.124" FontSize="48" Style="{StaticResource TextBlockStyle}" Foreground="#FFFFD701" FontFamily="Moire" RenderTransformOrigin="0.5,0.5">
				<local:FastTextBlock.RenderTransform>
					<TransformGroup>
						<ScaleTransform ScaleX="1.2"/>
						<SkewTransform/>
						<RotateTransform/>
						<TranslateTransform/>
					</TransformGroup>
				</local:FastTextBlock.RenderTransform>
			</local:FastTextBlock>
		</Canvas>
		<Canvas Width="256" Canvas.Top="232" x:Name="Speedo_Analog" Canvas.Left="904" Height="256">
			<Rectangle x:Name="BG_Speedo" Fill="Black" Height="256" Canvas.Left="-48" Canvas.Top="1" Width="349.875" RenderTransformOrigin="0.5,0.5">
				<Rectangle.RenderTransform>
					<TransformGroup>
						<ScaleTransform/>
						<SkewTransform/>
						<RotateTransform/>
						<TranslateTransform/>
					</TransformGroup>
				</Rectangle.RenderTransform>
			</Rectangle>
			<Image x:Name="SPEEDO_GRAPHIC" Height="256" Canvas.Left="-1" Source="game:/media/cars/FER_488GTB_16/UI/Textures/FER_488GTB_16_Speedo.png" Stretch="Fill" Canvas.Top="1" Width="256"/>
			<local:FastTextBlock x:Name="Text_Speed" Canvas.Left="107" Canvas.Top="184" Text="{Binding Speed}" Width="74.25" FontSize="37.333" Style="{StaticResource TextBlockStyle}" FontFamily="DG1_Arial" RenderTransformOrigin="0.5,0.5" Foreground="White">
				<local:FastTextBlock.RenderTransform>
					<TransformGroup>
						<ScaleTransform ScaleX="1.5"/>
						<SkewTransform/>
						<RotateTransform/>
						<TranslateTransform/>
					</TransformGroup>
				</local:FastTextBlock.RenderTransform>
			</local:FastTextBlock>
			<Image x:Name="Speedo_Needle" Height="128" Canvas.Left="112" Source="game:/media/cars/FER_488GTB_16/UI/Textures/FER_488GTB_16_Gauge_Needle.png" Stretch="Fill" Canvas.Top="112" Width="32" RenderTransformOrigin="0.484,0.276">
				<Image.RenderTransform>
					<TransformGroup>
						<ScaleTransform	ScaleY="-1" ScaleX="-1"/>
						<SkewTransform AngleY="0" AngleX="0"/>
						<RotateTransform Angle="-136"/>
						<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 Fuel}" Target="{StaticResource Fuel Gauge}"/>
		<local:StoryboardController SeekPct="{Binding AnalogSpeed}" Target="{StaticResource Speedo Analog}"/>
	</Canvas>
</Page>