<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="ForzaUI.MER_ProjectEAT_17">
	
    <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" HasTachMem="False" HasClock="True" HasExternalTemp="True" UseDegreesF="False" UseMPH="True" UsePsi="True" MinBoost="0" MaxBoost="0" MaxSpeed="71.58" 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="17.4" MinGear="-1" MaxGear="1" MaxRpm="6000.0"></local:DigitalGaugeConfig>
        
		<Storyboard x:Key="Tach">
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)" Storyboard.TargetName="Tach_Needle">
				<EasingDoubleKeyFrame KeyTime="0" Value="-127.606"/>
				<EasingDoubleKeyFrame KeyTime="0:0:1" Value="127.169"/>
			</DoubleAnimationUsingKeyFrames>
		</Storyboard>
		<Storyboard x:Key="Fuel Gauge">
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)" Storyboard.TargetName="Fill_Color">
				<EasingDoubleKeyFrame KeyTime="0" Value="117.107"/>
				<EasingDoubleKeyFrame KeyTime="0:0:1" Value="62.987"/>
			</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>
		<Storyboard x:Key="Gear Analog">
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)" Storyboard.TargetName="Shift_Hilight">
				<EasingDoubleKeyFrame KeyTime="0" Value="0"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.5" Value="26"/>
				<EasingDoubleKeyFrame KeyTime="0:0:1" Value="52"/>
			</DoubleAnimationUsingKeyFrames>
		</Storyboard>
		<Storyboard x:Key="Speedo Analog">
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)" Storyboard.TargetName="Speed_Needle">
				<EasingDoubleKeyFrame KeyTime="0" Value="-130.857"/>
				<EasingDoubleKeyFrame KeyTime="0:0:1" Value="130.297"/>
			</DoubleAnimationUsingKeyFrames>
		</Storyboard>
	</Page.Resources>
	<Page.Triggers>
		<EventTrigger RoutedEvent="FrameworkElement.Loaded">
			<BeginStoryboard Storyboard="{StaticResource Gear Analog}"/>
			<BeginStoryboard Storyboard="{StaticResource Speedo Analog}"/>
		</EventTrigger>
	</Page.Triggers>
	
		<local:EventFire.FzTriggers>
        <local:EventFireTrigger Event="StartUp" Storyboard="{StaticResource Start Up Animation}"/>
    </local:EventFire.FzTriggers>
 
	<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="Background_Black" Fill="Black" Height="720" Stroke="Black" Width="1280" Canvas.Left="0" Canvas.Top="0" />
        <Canvas x:Name="Fuel_Animation" Height="720" Canvas.Top="-124" Width="1280" Canvas.Left="0">
        	<Rectangle x:Name="Fill_Color" Fill="Gainsboro" Height="200" Canvas.Left="282.001" Canvas.Top="365.332" Width="200" RenderTransformOrigin="0,0">
        		<Rectangle.RenderTransform>
        			<TransformGroup>
        				<ScaleTransform/>
        				<SkewTransform/>
        				<RotateTransform Angle="117.107"/>
        				<TranslateTransform/>
        			</TransformGroup>
        		</Rectangle.RenderTransform>
        	</Rectangle>
        </Canvas>
		<Image x:Name="Graphics_Main" Height="433" Canvas.Left="73.333" Source="game:/media/cars/MER_ProjectEAT_17/UI/Textures/MER_ProjectEAT_17_Graphics.png" Stretch="Fill" Canvas.Top="20.33" Width="1134"/>
		<Rectangle x:Name="Mask_Left" Fill="Black" Height="433" Stroke="Black" Canvas.Top="20.33" Width="69.333" Canvas.Left="5"/>
		<Rectangle x:Name="Mask_Bottom" Fill="Black" Height="142.67" Canvas.Left="4" Stroke="Black" Canvas.Top="452.33" Width="660"/>
		<Canvas x:Name="Tach_Animation" Height="720" Canvas.Left="0" Canvas.Top="-124" Width="1280">
			<Image x:Name="Tach_Needle" Height="210" Canvas.Left="976.25" Source="game:/media/cars/MER_ProjectEAT_17/UI/Textures/MER_ProjectEAT_17_Needle.png" Stretch="Fill" Canvas.Top="183.332" Width="44" RenderTransformOrigin="0.5,0.867">
				<Image.RenderTransform>
					<TransformGroup>
						<ScaleTransform/>
						<SkewTransform/>
						<RotateTransform Angle="-127.606"/>
						<TranslateTransform/>
					</TransformGroup>
				</Image.RenderTransform>
			</Image>
		</Canvas>
        <Canvas x:Name="Speed_Animation" Height="720" Canvas.Left="0" Canvas.Top="-124" Width="1280">
        	<Image x:Name="Speed_Needle" Height="210" Canvas.Left="260.337" Source="game:/media/cars/MER_ProjectEAT_17/UI/Textures/MER_ProjectEAT_17_Needle.png" Stretch="Fill" Canvas.Top="183.332" Width="44" RenderTransformOrigin="0.5,0.867">
        		<Image.RenderTransform>
        			<TransformGroup>
        				<ScaleTransform/>
        				<SkewTransform/>
        				<RotateTransform Angle="-130.857"/>
        				<TranslateTransform/>
        			</TransformGroup>
        		</Image.RenderTransform>
        	</Image>
        </Canvas>
		<Canvas x:Name="Gear_Animation" Height="720" Canvas.Left="0" Canvas.Top="-124" Width="1280">
			<Image x:Name="Shift_Hilight" Height="28" Canvas.Left="267" Source="game:/media/cars/MER_ProjectEAT_17/UI/Textures/MER_ProjectEAT_17_Shift_Hilight.png" Stretch="Fill" Canvas.Top="396.5" Width="30" RenderTransformOrigin="0.5,0.5">
				<Image.RenderTransform>
					<TransformGroup>
						<ScaleTransform/>
						<SkewTransform/>
						<RotateTransform/>
						<TranslateTransform/>
					</TransformGroup>
				</Image.RenderTransform>
			</Image>
		</Canvas>
		<Canvas x:Name="Logo" Height="720" Canvas.Top="0" Width="1280" Canvas.Left="0">
			<Image x:Name="Logo_Art" Height="98" Canvas.Left="312" Source="game:/media/cars/MER_ProjectEAT_17/UI/Textures/MER_ProjectEAT_17_Logo.png" Stretch="Fill" Canvas.Top="532" Width="658"/>
		</Canvas>
		<Canvas x:Name="Text" Height="720" Width="1280" Canvas.Top="-124">
			<local:FastTextBlock x:Name="Text_Temperature" Canvas.Left="371.331" Canvas.Top="147.993" Text="{Binding ExternalTemp}" Width="100" FontSize="24" Style="{StaticResource TextBlockStyle}" RenderTransformOrigin="0.5,0.5" Foreground="White" FontFamily="DG1_Arial"/>
			<local:FastTextBlock x:Name="Text_Time" Canvas.Left="716" Canvas.Top="147.993" Text="{Binding Time}" Width="120" FontSize="24" Style="{StaticResource TextBlockStyle}" RenderTransformOrigin="0.5,0.5" Foreground="White" FontFamily="DG1_Arial"/>
			<local:FastTextBlock x:Name="Text_Odometer" Canvas.Left="555.625" Canvas.Top="374.403" Text="{Binding Odometer}" Width="150" FontSize="24" Style="{StaticResource TextBlockStyle}" RenderTransformOrigin="0.5,0.5" Foreground="White" FontFamily="DG1_Arial" TextAlignment="Center"/>
			<local:FastTextBlock x:Name="Text_TripMeter" Canvas.Left="556.004" Canvas.Top="301.203" Text="{Binding TripMeter}" Width="150" FontSize="32" Style="{StaticResource TextBlockStyle}" RenderTransformOrigin="0.5,0.5" Foreground="White" FontFamily="DG1_Arial" TextAlignment="Center"/>
		</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 AnalogSpeed}" Target="{StaticResource Speedo Analog}"/>
        <local:StoryboardController SeekPct="{Binding Tach}" Target="{StaticResource Tach}"/>
		<local:StoryboardController SeekPct="{Binding AnalogGear}" Target="{StaticResource Gear Analog}"/>
		<local:StoryboardController SeekPct="{Binding Fuel}" Target="{StaticResource Fuel Gauge}"/>
	</Canvas>
</Page>