<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.EAE_Speedster_12">
	
    <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="False" UseDegreesF="True" UseMPH="True" 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="False" HasTextFuel="False" MaxFuel="15" MaxGear="8" MaxRpm="10000"></local:DigitalGaugeConfig>
		<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="Fuel Gauge">
			<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Fuel_ON">
				<DiscreteObjectKeyFrame KeyTime="0:0:0.1" Value="{x:Static Visibility.Visible}"/>
				<DiscreteObjectKeyFrame KeyTime="0:0:0.105" Value="{x:Static Visibility.Hidden}"/>
				<DiscreteObjectKeyFrame KeyTime="0:0:1" Value="{x:Static Visibility.Hidden}"/>
			</ObjectAnimationUsingKeyFrames>
			<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Fuel_OFF">
				<DiscreteObjectKeyFrame KeyTime="0" Value="{x:Static Visibility.Hidden}"/>
				<DiscreteObjectKeyFrame KeyTime="0:0:0.105" Value="{x:Static Visibility.Visible}"/>
				<DiscreteObjectKeyFrame KeyTime="0:0:1" Value="{x:Static Visibility.Visible}"/>
			</ObjectAnimationUsingKeyFrames>
		</Storyboard>
	</Page.Resources>
	<Page.Triggers>
		<EventTrigger RoutedEvent="FrameworkElement.Loaded">
			<BeginStoryboard Storyboard="{StaticResource Fuel Gauge}"/>
		</EventTrigger>
	</Page.Triggers>
	  

	<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_Grey" Fill="#FF3B3B3B" Height="720" Width="1280" Canvas.Left="0" Canvas.Top="0"/>
        <Rectangle x:Name="Background_Clock" Fill="#FF240E10" Height="125" Width="448" Canvas.Left="416" Canvas.Top="152.5"/>
        <Rectangle x:Name="Background_Fuel" Fill="Black" Height="80.96" Width="96" Canvas.Left="592" Canvas.Top="455.52" RenderTransformOrigin="0.5,0.5">
        	<Rectangle.RenderTransform>
        		<TransformGroup>
        			<ScaleTransform ScaleY="-1"/>
        			<SkewTransform/>
        			<RotateTransform/>
        			<TranslateTransform/>
        		</TransformGroup>
        	</Rectangle.RenderTransform>
        </Rectangle>
        <Canvas x:Name="Fuel_Light" Height="200" Canvas.Left="540" Canvas.Top="397" Width="200">
        	<Image x:Name="Fuel_ON" Height="50" Canvas.Left="76" Source="game:/media/cars/EAE_Speedster_12/UI/Textures/CAT_R500_13_Yellow_ON.png" Stretch="Fill" Canvas.Top="75" Width="50"/>
        	<Image x:Name="Fuel_OFF" Height="50" Canvas.Left="76" Source="Textures/CAT_R500_13_Yellow_ON.png" Stretch="Fill" Canvas.Top="75" Width="50" Opacity="0.4" Visibility="Hidden"/>
        </Canvas>
		<Canvas x:Name="Text" Height="720" Width="1280">
			<local:FastTextBlock x:Name="Text_Clock" Canvas.Left="336" Canvas.Top="178" Text="{Binding Time}" Width="400" FontSize="77.333" Style="{StaticResource TextBlockStyle}" Foreground="#FFFB2E19" FontFamily="DG2_LCD"/>
		</Canvas>
        <Rectangle x:Name="Start_Up_Mask" Fill="Black" Height="720" Stroke="Black" Width="1280" Canvas.Left="0" Canvas.Top="0" Opacity="0"/>
		
		<local:StoryboardController SeekPct="{Binding Fuel}" Target="{StaticResource Fuel Gauge}"/>
	</Canvas>
</Page>