<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.MAS_GranTurismoS_10"
	DataContext="{Binding RelativeSource={x:Static RelativeSource.Self}}">
	
    <Page.Resources>
        <Style x:Key="TextBlockStyle" TargetType="{x:Type TextBlock}">
            <Setter Property="FontFamily" Value="DG1_Arial"/>
            <Setter Property="Foreground" Value="White"/>
            <Setter Property="TextWrapping" Value="NoWrap"/>
            <Setter Property="TextAlignment" Value="Right"/>
        </Style>
		
		<local:DigitalGaugeConfig x:Key="Config" HasClock="False" HasExternalTemp="True" UseDegreesF="False" UseMPH="False" UsePsi="False" MaxBoost="13" MinBoost="1" MaxSpeed="99" 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="Tach">
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)" Storyboard.TargetName="Fill_Green_L">
				<EasingDoubleKeyFrame KeyTime="0" Value="0"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.1" Value="9"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.2" Value="18"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.3" Value="27"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.4" Value="36"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.5" Value="45"/>
			</DoubleAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)" Storyboard.TargetName="Fill_Green_R">
				<EasingDoubleKeyFrame KeyTime="0" Value="-90"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.1" Value="-99"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.2" Value="-108"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.3" Value="-117"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.4" Value="-126"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.5" Value="-135"/>
			</DoubleAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="Fill_Yellow_L">
				<EasingDoubleKeyFrame KeyTime="0" Value="0"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.494" Value="0"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.5" Value="1"/>
			</DoubleAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)" Storyboard.TargetName="Fill_Yellow_L">
				<EasingDoubleKeyFrame KeyTime="0" Value="0"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.494" Value="43.47"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.5" Value="45"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.6" Value="54"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.7" Value="62.267"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.8" Value="71.381"/>
			</DoubleAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="Fill_Yellow_R">
				<EasingDoubleKeyFrame KeyTime="0" Value="0"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.495" Value="0"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.5" Value="1"/>
			</DoubleAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)" Storyboard.TargetName="Fill_Yellow_R">
				<EasingDoubleKeyFrame KeyTime="0" Value="-90"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.495" Value="-134.617"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.5" Value="-134.617"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.6" Value="-144"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.7" Value="-153.185"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.8" Value="-161.822"/>
			</DoubleAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="Fill_Red_L">
				<EasingDoubleKeyFrame KeyTime="0" Value="0"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.794" Value="0"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.8" Value="1"/>
			</DoubleAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="Fill_Red_R">
				<EasingDoubleKeyFrame KeyTime="0" Value="0"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.794" Value="0"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.8" Value="1"/>
			</DoubleAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)" Storyboard.TargetName="Fill_Red_L">
				<EasingDoubleKeyFrame KeyTime="0" Value="0"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.794" Value="71.306"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.8" Value="71.306"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.9" Value="80.46"/>
				<EasingDoubleKeyFrame KeyTime="0:0:1" Value="90"/>
			</DoubleAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)" Storyboard.TargetName="Fill_Red_R">
				<EasingDoubleKeyFrame KeyTime="0" Value="-90"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.794" Value="-161.727"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.8" Value="-161.727"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.9" Value="-171.187"/>
				<EasingDoubleKeyFrame KeyTime="0:0:1" Value="-180"/>
			</DoubleAnimationUsingKeyFrames>
		</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>
	</Page.Resources>	  

	<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="BG" Fill="Black" Height="300" Canvas.Left="490" Canvas.Top="210" Width="300"/>
        <Canvas x:Name="Tach_Animation" Height="300" Canvas.Left="490" Canvas.Top="210" Width="300">
        	<Image x:Name="Fill_Red_L" Height="128" Canvas.Left="23.333" Source="game:/media/cars/MAS_GranTurismoS_10/UI/Textures/MAS_GranTurismoS_10_Dial_Red.png" Stretch="Fill" Canvas.Top="150.165" Width="128" RenderTransformOrigin="1,0">
        		<Image.RenderTransform>
        			<TransformGroup>
        				<ScaleTransform/>
        				<SkewTransform/>
        				<RotateTransform/>
        				<TranslateTransform/>
        			</TransformGroup>
        		</Image.RenderTransform>
        	</Image>
        	<Image x:Name="Fill_Red_R" Height="128" Canvas.Left="23.141" Source="game:/media/cars/MAS_GranTurismoS_10/UI/Textures/MAS_GranTurismoS_10_Dial_Red.png" Stretch="Fill" Canvas.Top="150.165" Width="128" RenderTransformOrigin="1,0">
        		<Image.RenderTransform>
        			<TransformGroup>
        				<ScaleTransform/>
        				<SkewTransform/>
        				<RotateTransform Angle="-90"/>
        				<TranslateTransform/>
        			</TransformGroup>
        		</Image.RenderTransform>
        	</Image>
        	<Image x:Name="Fill_Yellow_L" Height="128" Canvas.Left="23.333" Source="game:/media/cars/MAS_GranTurismoS_10/UI/Textures/MAS_GranTurismoS_10_Dial_Yellow.png" Stretch="Fill" Canvas.Top="150.165" Width="128" RenderTransformOrigin="1,0">
        		<Image.RenderTransform>
        			<TransformGroup>
        				<ScaleTransform/>
        				<SkewTransform/>
        				<RotateTransform/>
        				<TranslateTransform/>
        			</TransformGroup>
        		</Image.RenderTransform>
        	</Image>
        	<Image x:Name="Fill_Yellow_R" Height="128" Canvas.Left="23.141" Source="game:/media/cars/MAS_GranTurismoS_10/UI/Textures/MAS_GranTurismoS_10_Dial_Yellow.png" Stretch="Fill" Canvas.Top="150.165" Width="128" RenderTransformOrigin="1,0">
        		<Image.RenderTransform>
        			<TransformGroup>
        				<ScaleTransform/>
        				<SkewTransform/>
        				<RotateTransform Angle="-90"/>
        				<TranslateTransform/>
        			</TransformGroup>
        		</Image.RenderTransform>
        	</Image>
        	<Image x:Name="Fill_Green_L" Height="128" Canvas.Left="23.333" Source="game:/media/cars/MAS_GranTurismoS_10/UI/Textures/MAS_GranTurismoS_10_Dial_Green.png" Stretch="Fill" Canvas.Top="150.165" Width="128" RenderTransformOrigin="1,0">
        		<Image.RenderTransform>
        			<TransformGroup>
        				<ScaleTransform/>
        				<SkewTransform/>
        				<RotateTransform/>
        				<TranslateTransform/>
        			</TransformGroup>
        		</Image.RenderTransform>
        	</Image>
        	<Image x:Name="Fill_Green_R" Height="128" Canvas.Left="23.141" Source="game:/media/cars/MAS_GranTurismoS_10/UI/Textures/MAS_GranTurismoS_10_Dial_Green.png" Stretch="Fill" Canvas.Top="150.165" Width="128" RenderTransformOrigin="1,0">
        		<Image.RenderTransform>
        			<TransformGroup>
        				<ScaleTransform/>
        				<SkewTransform/>
        				<RotateTransform Angle="-90"/>
        				<TranslateTransform/>
        			</TransformGroup>
        		</Image.RenderTransform>
        	</Image>
        </Canvas>
        <Image x:Name="Bkgd" Height="256" Canvas.Left="512.341" Source="game:/media/cars/MAS_GranTurismoS_10/UI/Textures/MAS_GranTurismoS_10_Bkgd.png" Stretch="Fill" Canvas.Top="232.674" Width="256"/>
		<Canvas x:Name="Text"
		Height="720" Width="1280">
			<TextBlock x:Name="Text_Clock" Canvas.Left="555" Canvas.Top="229" Width="75" FontSize="25.333" TextAlignment="Center" Style="{StaticResource TextBlockStyle}" Text="{Binding Time}" Height="27.597" RenderTransformOrigin="0.5,0.5">
				<TextBlock.RenderTransform>
					<TransformGroup>
						<ScaleTransform ScaleX="0.95"/>
						<SkewTransform/>
						<RotateTransform/>
						<TranslateTransform/>
					</TransformGroup>
				</TextBlock.RenderTransform>
			</TextBlock>
			<TextBlock x:Name="Text_External_Temp" Canvas.Left="644" Canvas.Top="228" Width="63.333" FontSize="25.333" Style="{StaticResource TextBlockStyle}" Text="{Binding ExternalTemp}" Height="27.597" RenderTransformOrigin="0.5,0.5">
				<TextBlock.RenderTransform>
					<TransformGroup>
						<ScaleTransform ScaleX="0.95"/>
						<SkewTransform/>
						<RotateTransform/>
						<TranslateTransform/>
					</TransformGroup>
				</TextBlock.RenderTransform>
			</TextBlock>
			<TextBlock x:Name="Text_Gear" Canvas.Left="572.332" Canvas.Top="303.833" Width="136.269" FontSize="68" TextAlignment="Center" Style="{StaticResource TextBlockStyle}" Text="{Binding Gear}" RenderTransformOrigin="0.5,0.5" Foreground="#FF00E34A"/>
			<TextBlock x:Name="Text_Odometer" Canvas.Left="518" Canvas.Top="458" Width="118" FontSize="21.333" Style="{StaticResource TextBlockStyle}" Text="{Binding Odometer}" Height="27.597" RenderTransformOrigin="0.5,0.5"/>
			<TextBlock x:Name="Text_Speed" Canvas.Left="647" Canvas.Top="456" Width="80" FontSize="24" Style="{StaticResource TextBlockStyle}" Text="{Binding Speed}" Height="27.5966666666667" RenderTransformOrigin="0.5,0.5">
				<TextBlock.RenderTransform>
					<TransformGroup>
						<ScaleTransform ScaleX="0.95"/>
						<SkewTransform/>
						<RotateTransform/>
						<TranslateTransform/>
					</TransformGroup>
				</TextBlock.RenderTransform>
			</TextBlock>
		</Canvas>
        <Rectangle x:Name="Start_Up_Mask" Fill="Black" Height="668" Stroke="Black" Width="1186" Canvas.Left="57.688" Canvas.Top="52.875" Opacity="0"/>

        <!-- Storyboard binding controllers -->
        <local:StoryboardController SeekPct="{Binding Tach}" Target="{StaticResource Tach}"/>
	</Canvas>
</Page>