<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.MER_A45AMG_13"
	 >
	
    <Page.Resources>
        <Style x:Key="TextBlockStyle" TargetType="{x:Type local:FastTextBlock}">
            <Setter Property="FontFamily" Value="Moire"/>
            <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="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="Gear Analog">
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)" Storyboard.TargetName="Gear_Highlight">
				<EasingDoubleKeyFrame KeyTime="0" Value="0"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.5" Value="36.5"/>
				<EasingDoubleKeyFrame KeyTime="0:0:1" Value="73"/>
			</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>
        <Image x:Name="MFD_BG" Height="605" Canvas.Left="338" Source="game:/media/cars/MER_A45AMG_13/UI/Textures/MER_A45AMG_13_bckgrnd.png" Stretch="Fill" Canvas.Top="107" Width="605"/>
		<Canvas x:Name="Text" Height="720" Width="1280" Canvas.Top="49">
            <local:FastTextBlock x:Name="Text_Odometer" Canvas.Left="514.111" Canvas.Top="201.25" Text="{Binding Odometer}" Width="221.528" FontSize="46.667" 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_Trip_Odo" Canvas.Left="533.65" Canvas.Top="297.25" Text="{Binding TripMeter}" Width="165.35" FontSize="46.667" Style="{StaticResource TextBlockStyle}" FontFamily="DG1_Arial"  />
            <local:FastTextBlock x:Name="Text_Clock" Canvas.Left="706.75" Canvas.Top="571.749" Text="{Binding Time}" FontSize="48" Style="{StaticResource TextBlockStyle}" FontFamily="DG1_Arial"/>
            <local:FastTextBlock x:Name="Text_External_Temp" Canvas.Left="361" Canvas.Top="571.749" Text="{Binding ExternalTemp}" FontSize="48" Style="{StaticResource TextBlockStyle}" FontFamily="DG1_Arial" Width="126.5"/>
		</Canvas>
        <Canvas x:Name="Gear_Analog" Height="92" Width="538" Canvas.Left="372" Canvas.Top="8">
        	<Rectangle x:Name="Background" Fill="Black" Height="92" Width="538"/>
        	<Image x:Name="Gear_Background" Height="30" Canvas.Left="161" Source="game:/media/cars/MER_A45AMG_13/UI/Textures/MER_A45AMG_13_Gears.png" Stretch="Fill" Canvas.Top="33" Width="210"/>
        	<Image x:Name="Gear_Highlight" Height="38" Canvas.Left="190" Source="game:/media/cars/MER_A45AMG_13/UI/Textures/MER_A45AMG_13_Gear_Highlight.png" Stretch="Fill" Canvas.Top="27.5" Width="34" RenderTransformOrigin="0.5,0.5">
        		<Image.RenderTransform>
        			<TransformGroup>
        				<ScaleTransform/>
        				<SkewTransform/>
        				<RotateTransform/>
        				<TranslateTransform/>
        			</TransformGroup>
        		</Image.RenderTransform>
        	</Image>
        </Canvas>
        <Rectangle x:Name="Start_Up_Mask" Fill="Black" Height="668" Stroke="Black" Width="1186" Canvas.Left="58" Canvas.Top="52.5" Opacity="0"/>
		
				<!-- Storyboard binding controllers -->
		<local:StoryboardController SeekPct="{Binding AnalogGear}" Target="{StaticResource Gear Analog}"/>
	</Canvas>
</Page>