<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.MIT_LancerEvoXGSR_08"
	 >
	
    <Page.Resources>
        <Style x:Key="TextBlockStyle" TargetType="{x:Type local:FastTextBlock}">
            <Setter Property="FontFamily" Value="DG4_PF_Rhonda"/>
            <Setter Property="Foreground" Value="#FFED2414"/>
             
            <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="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" MinGear="-1" MaxGear="6" MaxRpm="10000"></local:DigitalGaugeConfig>
        
		<Storyboard x:Key="Gear Analog">
			<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Gear_R">
				<DiscreteObjectKeyFrame KeyTime="0" Value="{x:Static Visibility.Visible}"/>
				<DiscreteObjectKeyFrame KeyTime="0:0:0.071" Value="{x:Static Visibility.Hidden}"/>
			</ObjectAnimationUsingKeyFrames>
			<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Gear_N">
				<DiscreteObjectKeyFrame KeyTime="0:0:0.071" Value="{x:Static Visibility.Visible}"/>
				<DiscreteObjectKeyFrame KeyTime="0:0:0.214" Value="{x:Static Visibility.Hidden}"/>
			</ObjectAnimationUsingKeyFrames>
			<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Gear_1">
				<DiscreteObjectKeyFrame KeyTime="0:0:0.214" Value="{x:Static Visibility.Visible}"/>
				<DiscreteObjectKeyFrame KeyTime="0:0:0.357" Value="{x:Static Visibility.Hidden}"/>
			</ObjectAnimationUsingKeyFrames>
			<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Gear_2">
				<DiscreteObjectKeyFrame KeyTime="0:0:0.357" Value="{x:Static Visibility.Visible}"/>
				<DiscreteObjectKeyFrame KeyTime="0:0:0.5" Value="{x:Static Visibility.Hidden}"/>
			</ObjectAnimationUsingKeyFrames>
			<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Gear_3">
				<DiscreteObjectKeyFrame KeyTime="0:0:0.5" Value="{x:Static Visibility.Visible}"/>
				<DiscreteObjectKeyFrame KeyTime="0:0:0.643" Value="{x:Static Visibility.Hidden}"/>
			</ObjectAnimationUsingKeyFrames>
			<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Gear_4">
				<DiscreteObjectKeyFrame KeyTime="0:0:0.643" Value="{x:Static Visibility.Visible}"/>
				<DiscreteObjectKeyFrame KeyTime="0:0:0.786" Value="{x:Static Visibility.Hidden}"/>
			</ObjectAnimationUsingKeyFrames>
			<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Gear_5">
				<DiscreteObjectKeyFrame KeyTime="0:0:0.786" Value="{x:Static Visibility.Visible}"/>
				<DiscreteObjectKeyFrame KeyTime="0:0:0.929" Value="{x:Static Visibility.Hidden}"/>
			</ObjectAnimationUsingKeyFrames>
			<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Gear_6">
				<DiscreteObjectKeyFrame KeyTime="0:0:0.929" Value="{x:Static Visibility.Visible}"/>
				<DiscreteObjectKeyFrame KeyTime="0:0:1" Value="{x:Static Visibility.Visible}"/>
			</ObjectAnimationUsingKeyFrames>
		</Storyboard>
		<Storyboard x:Key="Fuel Gauge">
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)" Storyboard.TargetName="Fuel_Indicator">
				<EasingDoubleKeyFrame KeyTime="0" Value="0.01"/>
				<EasingDoubleKeyFrame KeyTime="0:0:1" Value="1"/>
			</DoubleAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)" Storyboard.TargetName="Fuel_Indicator">
				<EasingDoubleKeyFrame KeyTime="0" Value="33.562"/>
				<EasingDoubleKeyFrame KeyTime="0:0:1" Value="0"/>
			</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>
			<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Gear_N">
				<DiscreteObjectKeyFrame KeyTime="0:0:1" Value="{x:Static Visibility.Hidden}"/>
			</ObjectAnimationUsingKeyFrames>
		</Storyboard>
    </Page.Resources>
	
    <local:EventFire.FzTriggers>
    <local:EventFireTrigger Event="StartUp" Storyboard="{StaticResource Start Up Animation}"/>
    </local:EventFire.FzTriggers>


	<Page.Triggers>
		<EventTrigger RoutedEvent="FrameworkElement.Loaded">
			<BeginStoryboard Storyboard="{StaticResource Fuel Gauge}"/>
		</EventTrigger>
	</Page.Triggers>
	  

	<Canvas x:Name="LayoutRoot" Background="#FD262626" Width="1280" Height="720">
		<Image x:Name="Bckgd" Height="256" Canvas.Left="512.333" Source="game:/media/cars/MIT_LancerEvoXGSR_08/UI/Textures/MIT_LancerEvoXGSR_Bckgd.png" Stretch="Fill" Canvas.Top="232.666" Width="256"/>
        <Rectangle x:Name="Fuel_Indicator" Fill="#FFEB2413" Height="68" Canvas.Left="696" Canvas.Top="399" Width="21" RenderTransformOrigin="0.5,0.5">
        	<Rectangle.RenderTransform>
        		<TransformGroup>
        			<ScaleTransform/>
        			<SkewTransform/>
        			<RotateTransform/>
        			<TranslateTransform/>
        		</TransformGroup>
        	</Rectangle.RenderTransform>
        </Rectangle>
		<Canvas x:Name="Text" Height="720" Width="1280" >
            <local:FastTextBlock x:Name="Text_External_Temp" Canvas.Left="601" Canvas.Top="236" Text="{Binding ExternalTemp}" FontSize="20" Style="{StaticResource TextBlockStyle}" FontFamily="DG4_PF_Ronda_Seven" RenderTransformOrigin="0.5,0.5" Foreground="#FFEB2413" Width="50"/>
            <local:FastTextBlock x:Name="Text_Trip_Odo" Canvas.Left="601" Canvas.Top="288" Text="{Binding TripMeter}" Width="87.016" FontSize="24" Style="{StaticResource TextBlockStyle}" FontFamily="DG4_PF_Ronda_Seven"   RenderTransformOrigin="0.5,0.5" Foreground="#FFEB2413"/>
            <local:FastTextBlock x:Name="Text_Odometer" Canvas.Left="560" Canvas.Top="330" Text="{Binding Odometer}" Width="129" FontSize="24" Style="{StaticResource TextBlockStyle}" FontFamily="DG4_PF_Ronda_Seven"   Foreground="#FFEB2413" RenderTransformOrigin="0.5,0.5" Height="40.033"/>
		</Canvas>
        <Canvas x:Name="Gear_Analog" Height="64" Width="64" Canvas.Left="566.314" Canvas.Top="392">
        	<Image x:Name="Gear_R" Height="64" Canvas.Left="8" Source="game:/media/cars/MIT_LancerEvoXGSR_08/UI/Textures/MIT_LancerEvoXGSR_Gear_R.png" Stretch="Fill" Width="64" Panel.ZIndex="-1"/>
        	<Image x:Name="Gear_N" Height="64" Canvas.Left="8" Source="game:/media/cars/MIT_LancerEvoXGSR_08/UI/Textures/MIT_LancerEvoXGSR_Gear_N.png" Stretch="Fill" Width="64" Panel.ZIndex="-1" Visibility="Hidden"/>
        	<Image x:Name="Gear_1" Height="64" Canvas.Left="8" Source="game:/media/cars/MIT_LancerEvoXGSR_08/UI/Textures/MIT_LancerEvoXGSR_Gear_1.png" Stretch="Fill" Width="64" Panel.ZIndex="-1" Visibility="Hidden"/>
        	<Image x:Name="Gear_2" Height="64" Canvas.Left="8" Source="game:/media/cars/MIT_LancerEvoXGSR_08/UI/Textures/MIT_LancerEvoXGSR_Gear_2.png" Stretch="Fill" Width="64" Panel.ZIndex="-1" Visibility="Hidden"/>
        	<Image x:Name="Gear_3" Height="64" Canvas.Left="8" Source="game:/media/cars/MIT_LancerEvoXGSR_08/UI/Textures/MIT_LancerEvoXGSR_Gear_3.png" Stretch="Fill" Width="64" Panel.ZIndex="-1" Visibility="Hidden"/>
        	<Image x:Name="Gear_4" Height="64" Canvas.Left="8" Source="game:/media/cars/MIT_LancerEvoXGSR_08/UI/Textures/MIT_LancerEvoXGSR_Gear_4.png" Stretch="Fill" Width="64" Panel.ZIndex="-1" Visibility="Hidden"/>
        	<Image x:Name="Gear_5" Height="64" Canvas.Left="8" Source="game:/media/cars/MIT_LancerEvoXGSR_08/UI/Textures/MIT_LancerEvoXGSR_Gear_5.png" Stretch="Fill" Width="64" Panel.ZIndex="-1" Visibility="Hidden"/>
        	<Image x:Name="Gear_6" Height="64" Canvas.Left="8" Source="game:/media/cars/MIT_LancerEvoXGSR_08/UI/Textures/MIT_LancerEvoXGSR_Gear_6.png" Stretch="Fill" Width="64" Panel.ZIndex="-1" Visibility="Hidden"/>
        </Canvas>
        <Rectangle x:Name="Start_Up_Mask" Fill="Black" Height="668" Stroke="Black" Width="1185.998" Canvas.Left="59.752" Canvas.Top="54.812" Opacity="0"/>

        <!-- Storyboard binding controllers -->
		<local:StoryboardController SeekPct="{Binding Fuel}" Target="{StaticResource Fuel Gauge}"/>
		<local:StoryboardController SeekPct="{Binding StartUp}" Target="{StaticResource Start Up Animation}"/>
		<local:StoryboardController SeekPct="{Binding AnalogGear}" Target="{StaticResource Gear Analog}"/>
	</Canvas>
</Page>