<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"
    xmlns:ed="http://schemas.microsoft.com/expression/2010/drawing"
    mc:Ignorable="d"
	x:Class="DigitalGauge.LR_Defender_20"
	 >
	
    <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="True" MaxBoost="25" MinBoost="0" MaxSpeed="67" 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="27.3" MinGear="-1" MaxGear="7" MaxRpm="7000"/>
		<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="Tach_Animation">
				<EasingDoubleKeyFrame KeyTime="0" Value="45.191"/>
				<EasingDoubleKeyFrame KeyTime="0:0:1" Value="314.863"/>
			</DoubleAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(ed:Arc.EndAngle)" Storyboard.TargetName="TacBar1">
				<EasingDoubleKeyFrame KeyTime="0" Value="86"/>
				<EasingDoubleKeyFrame KeyTime="0:0:1" Value="355"/>
			</DoubleAnimationUsingKeyFrames>
		</Storyboard>
		<Storyboard x:Key="Fuel Gauge">
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)" Storyboard.TargetName="Red">
				<EasingDoubleKeyFrame KeyTime="0" Value="29.673"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.1" Value="24.056"/>
				<EasingDoubleKeyFrame KeyTime="0:0:1" Value="23.872"/>
			</DoubleAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)" Storyboard.TargetName="Arrow">
				<EasingDoubleKeyFrame KeyTime="0" Value="29.269"/>
				<EasingDoubleKeyFrame KeyTime="0:0:1" Value="-29.274"/>
			</DoubleAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)" Storyboard.TargetName="White">
				<EasingDoubleKeyFrame KeyTime="0" Value="32.017"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.1" Value="23.914"/>
				<EasingDoubleKeyFrame KeyTime="0:0:1" Value="-30.058"/>
			</DoubleAnimationUsingKeyFrames>
		</Storyboard>
		<Storyboard x:Key="Speedo Analog">
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)" Storyboard.TargetName="Speed_Animation">
				<EasingDoubleKeyFrame KeyTime="0" Value="44.866"/>
				<EasingDoubleKeyFrame KeyTime="0:0:1" Value="314.841"/>
			</DoubleAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(ed:Arc.EndAngle)" Storyboard.TargetName="SpeedBar">
				<EasingDoubleKeyFrame KeyTime="0" Value="85"/>
				<EasingDoubleKeyFrame KeyTime="0:0:1.005" Value="355"/>
			</DoubleAnimationUsingKeyFrames>
		</Storyboard>
	</Page.Resources>
	<Page.Triggers>
		<EventTrigger RoutedEvent="FrameworkElement.Loaded">
			<BeginStoryboard Storyboard="{StaticResource Tach}"/>
			<BeginStoryboard Storyboard="{StaticResource Fuel Gauge}"/>
			<BeginStoryboard Storyboard="{StaticResource Speedo 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>
		<Canvas Height="720" Canvas.Top="-203" Width="1280" RenderTransformOrigin="0.5,0.5" Canvas.Left="1">
			<Canvas.RenderTransform>
				<TransformGroup>
					<ScaleTransform ScaleX="0.8" ScaleY="0.8"/>
					<SkewTransform/>
					<RotateTransform/>
					<TranslateTransform/>
				</TransformGroup>
			</Canvas.RenderTransform>
			<Image x:Name="Graphics_Background" Height="319.333" Canvas.Left="139.334" Source="game:/media/cars/LR_Defender_20/UI/Textures/LR_Defender_20_Background.png" Stretch="Fill" Canvas.Top="256.667" Width="988"/>
			<Canvas x:Name="Temp_Bars" Height="348" Canvas.Left="794" Width="348" Canvas.Top="242">
				<Rectangle x:Name="White1" Fill="White" Height="158" Canvas.Left="17.322" Canvas.Top="175.823" Width="158" RenderTransformOrigin="1,0">
					<Rectangle.RenderTransform>
						<TransformGroup>
							<ScaleTransform/>
							<SkewTransform/>
							<RotateTransform Angle="0.664"/>
							<TranslateTransform/>
						</TransformGroup>
					</Rectangle.RenderTransform>
				</Rectangle>
				<Rectangle x:Name="Blue" Fill="#FF3FC3DB" Height="158" Canvas.Left="17.322" Canvas.Top="175.823" Width="158" RenderTransformOrigin="1,0">
					<Rectangle.RenderTransform>
						<TransformGroup>
							<ScaleTransform/>
							<SkewTransform/>
							<RotateTransform Angle="27.999"/>
							<TranslateTransform/>
						</TransformGroup>
					</Rectangle.RenderTransform>
				</Rectangle>
				<Rectangle x:Name="Red1" Fill="#FFEF0A0B" Height="158" Canvas.Left="167.013" Canvas.Top="175.823" Width="8.309" RenderTransformOrigin="1,0">
					<Rectangle.RenderTransform>
						<TransformGroup>
							<ScaleTransform/>
							<SkewTransform/>
							<RotateTransform Angle="-30.615"/>
							<TranslateTransform/>
						</TransformGroup>
					</Rectangle.RenderTransform>
				</Rectangle>
			</Canvas>
			<Canvas x:Name="Fuel_Bars" Height="348" Canvas.Left="130" Width="348" Canvas.Top="242">
				<Rectangle x:Name="White" Fill="White" Height="158" Canvas.Left="17.322" Canvas.Top="175.823" Width="158" RenderTransformOrigin="1,0">
					<Rectangle.RenderTransform>
						<TransformGroup>
							<ScaleTransform/>
							<SkewTransform/>
							<RotateTransform Angle="-30.058"/>
							<TranslateTransform/>
						</TransformGroup>
					</Rectangle.RenderTransform>
				</Rectangle>
				<Rectangle x:Name="Red" Fill="#FFC40A19" Height="158" Canvas.Left="17.322" Canvas.Top="175.823" Width="158" RenderTransformOrigin="1,0">
					<Rectangle.RenderTransform>
						<TransformGroup>
							<ScaleTransform/>
							<SkewTransform/>
							<RotateTransform Angle="23.96"/>
							<TranslateTransform/>
						</TransformGroup>
					</Rectangle.RenderTransform>
				</Rectangle>
			</Canvas>
			<Image x:Name="Graphics_Background_Copy1" Height="319.333" Canvas.Left="394.001" Source="Textures/LR_Defender_20_Background.png" Stretch="Fill" Canvas.Top="256.667" Width="488"/>
			<Image x:Name="Graphics_Background_Copy2" Height="319.333" Canvas.Left="1052.001" Source="Textures/LR_Defender_20_Background.png" Stretch="Fill" Canvas.Top="256.667" Width="132"/>
			<Image x:Name="Graphics_Background_Copy" Height="319.333" Canvas.Left="139.334" Source="Textures/LR_Defender_20_Background.png" Stretch="Fill" Canvas.Top="256.667" Width="78"/>
			<Canvas x:Name="GaugeBars" Height="348" Canvas.Left="130" Canvas.Top="242" Width="348">
				<ed:Arc x:Name="SpeedBar" ArcThickness="1" ArcThicknessUnit="Percent" EndAngle="85" Fill="White" Height="348" Stretch="None" Stroke="Black" StrokeThickness="0" StartAngle="79" Width="348" RenderTransformOrigin="0.5,0.5">
					<ed:Arc.RenderTransform>
						<TransformGroup>
							<ScaleTransform/>
							<SkewTransform/>
							<RotateTransform Angle="140"/>
							<TranslateTransform/>
						</TransformGroup>
					</ed:Arc.RenderTransform>
				</ed:Arc>
			</Canvas>
			<Canvas x:Name="TachometerBar" Height="348" Canvas.Left="794" Canvas.Top="242" Width="348">
				<ed:Arc x:Name="TacBar1" ArcThickness="1" ArcThicknessUnit="Percent" EndAngle="81" Fill="White" Height="348" Stretch="None" Stroke="Black" StrokeThickness="0" StartAngle="79" Width="348" RenderTransformOrigin="0.5,0.5">
					<ed:Arc.RenderTransform>
						<TransformGroup>
							<ScaleTransform/>
							<SkewTransform/>
							<RotateTransform Angle="140"/>
							<TranslateTransform/>
						</TransformGroup>
					</ed:Arc.RenderTransform>
				</ed:Arc>
			</Canvas>
			<Image x:Name="Graphics_Main" Height="506" Canvas.Left="73.996" Source="game:/media/cars/LR_Defender_20/UI/Textures/LR_Defender_20_MainGrapics.png" Stretch="Fill" Width="1132" Canvas.Top="163"/>
			<Canvas x:Name="Tach_Animation" Height="348" Canvas.Left="794" Canvas.Top="242" Width="348" RenderTransformOrigin="0.5,0.5">
				<Canvas.RenderTransform>
					<TransformGroup>
						<ScaleTransform/>
						<SkewTransform/>
						<RotateTransform Angle="90"/>
						<TranslateTransform/>
					</TransformGroup>
				</Canvas.RenderTransform>
				<Image x:Name="Tach_Needle" Height="64" Canvas.Left="166" Source="game:/media/cars/LR_Defender_20/UI/Textures/LR_Defender_20_Needle.png" Stretch="Fill" Canvas.Top="265" Width="16"/>
			</Canvas>
			<Canvas x:Name="Speed_Animation" Height="348" Canvas.Left="130" Canvas.Top="242" Width="348" RenderTransformOrigin="0.5,0.5">
				<Canvas.RenderTransform>
					<TransformGroup>
						<ScaleTransform/>
						<SkewTransform/>
						<RotateTransform Angle="90"/>
						<TranslateTransform/>
					</TransformGroup>
				</Canvas.RenderTransform>
				<Image x:Name="Speed_Needle" Height="64" Canvas.Left="166.188" Source="game:/media/cars/LR_Defender_20/UI/Textures/LR_Defender_20_Needle.png" Stretch="Fill" Canvas.Top="265.25" Width="16"/>
			</Canvas>
			<Canvas x:Name="Temp_Animation" Height="348" Canvas.Left="794" Canvas.Top="242" Width="348">
				<Image x:Name="Arrow1" Height="16" Canvas.Left="166.338" Source="Textures/LR_Defender_20_FuelArrow.png" Stretch="Fill" Canvas.Top="309.667" Width="16" RenderTransformOrigin="0.5,-8.375">
					<Image.RenderTransform>
						<TransformGroup>
							<ScaleTransform/>
							<SkewTransform/>
							<RotateTransform/>
							<TranslateTransform/>
						</TransformGroup>
					</Image.RenderTransform>
				</Image>
			</Canvas>
			<Canvas x:Name="Fuel_2nd_Animation" Height="348" Canvas.Left="130" Canvas.Top="242" Width="348">
				<Image x:Name="Arrow" Height="16" Canvas.Left="166.338" Source="game:/media/cars/LR_Defender_20/UI/Textures/LR_Defender_20_FuelArrow.png" Stretch="Fill" Canvas.Top="309.667" Width="16" RenderTransformOrigin="0.5,-8.375">
					<Image.RenderTransform>
						<TransformGroup>
							<ScaleTransform/>
							<SkewTransform/>
							<RotateTransform/>
							<TranslateTransform/>
						</TransformGroup>
					</Image.RenderTransform>
				</Image>
			</Canvas>
			<Canvas x:Name="Text" Height="720" Width="1280">
				<local:FastTextBlock x:Name="Text_Gear" Canvas.Left="900.334" Canvas.Top="385.072" Text="{Binding Gear}" FontSize="54.667" Style="{StaticResource TextBlockStyle}" FontFamily="DG1_Arial" Width="136" Foreground="White" RenderTransformOrigin="0.5,0.5" TextAlignment="Center">
					<local:FastTextBlock.RenderTransform>
						<TransformGroup>
							<ScaleTransform ScaleX="0.75"/>
							<SkewTransform/>
							<RotateTransform/>
							<TranslateTransform/>
						</TransformGroup>
					</local:FastTextBlock.RenderTransform>
				</local:FastTextBlock>
				<local:FastTextBlock x:Name="Text_Speed" Canvas.Left="204" Canvas.Top="383.738" Text="{Binding Speed}" FontSize="54.667" Style="{StaticResource TextBlockStyle}" FontFamily="Moire" Width="200" Foreground="White" RenderTransformOrigin="0.5,0.5" TextAlignment="Center">
					<local:FastTextBlock.RenderTransform>
						<TransformGroup>
							<ScaleTransform ScaleX="0.75"/>
							<SkewTransform/>
							<RotateTransform/>
							<TranslateTransform/>
						</TransformGroup>
					</local:FastTextBlock.RenderTransform>
				</local:FastTextBlock>
				<local:FastTextBlock x:Name="Text_Clock" Canvas.Left="1056.75" Canvas.Top="597.469" Text="{Binding Time}" FontSize="20" Style="{StaticResource TextBlockStyle}" FontFamily="DG1_Arial" Width="98" Foreground="White" RenderTransformOrigin="0.5,0.5" TextAlignment="Right"/>
				<local:FastTextBlock x:Name="Text_Tripmeter" Canvas.Left="442.001" Canvas.Top="222.469" Text="{Binding TripMeter}" FontSize="20" Style="{StaticResource TextBlockStyle}" FontFamily="DG1_Arial" Width="200" Foreground="White" RenderTransformOrigin="0.5,0.5" TextAlignment="Right"/>
				<local:FastTextBlock x:Name="Text_Temp" Canvas.Left="83.126" Canvas.Top="597.469" Text="{Binding ExternalTemp}" FontSize="20" Style="{StaticResource TextBlockStyle}" FontFamily="DG1_Arial" Width="50" Foreground="White" RenderTransformOrigin="0.5,0.5" TextAlignment="Right"/>
			</Canvas>
		</Canvas>
		<Image Height="121" Canvas.Left="300" Source="game:/media/cars/LR_Defender_20/UI/Textures/LR_Defender_20_Logo.png" Stretch="Fill" Canvas.Top="505" Width="196.548"/>
		<Image Height="128" Canvas.Left="984" Source="game:/media/cars/LR_Defender_20/UI/Textures/LR_Defender_20_Seats.png" Stretch="Fill" Canvas.Top="505" Width="148.271"/>
		<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 Fuel}" Target="{StaticResource Fuel Gauge}"/>
		<local:StoryboardController SeekPct="{Binding AnalogSpeed}" Target="{StaticResource Speedo Analog}"/>
	</Canvas>
</Page>