<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.FER_575_02"
	 >
	
    <Page.Resources>
        <Style x:Key="TextBlockStyle" TargetType="{x:Type local:FastTextBlock}">
            <Setter Property="FontFamily" Value="DG2_LCD"/>
            <Setter Property="Foreground" Value="#FF8AC90D"/>
             
            <Setter Property="TextAlignment" Value="Right"/>
        </Style>
		
		<local:DigitalGaugeConfig x:Key="Config" HasClock="True" HasExternalTemp="True" UseDegreesF="False" UseMPH="False" UsePsi="False" MaxBoost="0" MinBoost="0" MaxSpeed="00" 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" 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>
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.Width)" Storyboard.TargetName="Start_Up_Mask">
				<EasingDoubleKeyFrame KeyTime="0" Value="1280"/>
				<EasingDoubleKeyFrame KeyTime="0:0:1" Value="1280"/>
			</DoubleAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.Height)" Storyboard.TargetName="Start_Up_Mask">
				<EasingDoubleKeyFrame KeyTime="0" Value="720"/>
				<EasingDoubleKeyFrame KeyTime="0:0:1" Value="720"/>
			</DoubleAnimationUsingKeyFrames>
		</Storyboard>
		<Storyboard x:Key="Fuel Gauge">
			<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Cell_1">
				<DiscreteObjectKeyFrame KeyTime="0" Value="{x:Static Visibility.Visible}"/>
			</ObjectAnimationUsingKeyFrames>
			<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Cell_2">
				<DiscreteObjectKeyFrame KeyTime="0" Value="{x:Static Visibility.Hidden}"/>
				<DiscreteObjectKeyFrame KeyTime="0:0:0.125" Value="{x:Static Visibility.Visible}"/>
			</ObjectAnimationUsingKeyFrames>
			<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Cell_3">
				<DiscreteObjectKeyFrame KeyTime="0" Value="{x:Static Visibility.Hidden}"/>
				<DiscreteObjectKeyFrame KeyTime="0:0:0.25" Value="{x:Static Visibility.Visible}"/>
			</ObjectAnimationUsingKeyFrames>
			<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Cell_4">
				<DiscreteObjectKeyFrame KeyTime="0" Value="{x:Static Visibility.Hidden}"/>
				<DiscreteObjectKeyFrame KeyTime="0:0:0.375" Value="{x:Static Visibility.Visible}"/>
			</ObjectAnimationUsingKeyFrames>
			<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Cell_5">
				<DiscreteObjectKeyFrame KeyTime="0" Value="{x:Static Visibility.Hidden}"/>
				<DiscreteObjectKeyFrame KeyTime="0:0:0.5" Value="{x:Static Visibility.Visible}"/>
			</ObjectAnimationUsingKeyFrames>
			<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Cell_6">
				<DiscreteObjectKeyFrame KeyTime="0" Value="{x:Static Visibility.Hidden}"/>
				<DiscreteObjectKeyFrame KeyTime="0:0:0.625" Value="{x:Static Visibility.Visible}"/>
			</ObjectAnimationUsingKeyFrames>
			<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Cell_7">
				<DiscreteObjectKeyFrame KeyTime="0" Value="{x:Static Visibility.Hidden}"/>
				<DiscreteObjectKeyFrame KeyTime="0:0:0.75" Value="{x:Static Visibility.Visible}"/>
			</ObjectAnimationUsingKeyFrames>
			<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Cell_8">
				<DiscreteObjectKeyFrame KeyTime="0" Value="{x:Static Visibility.Hidden}"/>
				<DiscreteObjectKeyFrame KeyTime="0:0:0.875" Value="{x:Static Visibility.Visible}"/>
			</ObjectAnimationUsingKeyFrames>
			<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Cell_9">
				<DiscreteObjectKeyFrame KeyTime="0" Value="{x:Static Visibility.Hidden}"/>
				<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="#FF1C1C1C" Width="1280" Height="720">
		<Image x:Name="BG_Merged" Height="512" Canvas.Left="640" Source="game:/media/cars/FER_575_02/UI/Textures/FER_575_02_BGmerged.png" Stretch="Fill" Canvas.Top="177" Width="640"/>
		<Canvas x:Name="FuelGauge" Height="84" Canvas.Left="1128" Canvas.Top="540" Width="104" RenderTransformOrigin="0.5,0.5">
			<Rectangle x:Name="Cell_1" Fill="#FF8AC90D" Height="84" Width="7" Canvas.Left="0" Canvas.Top="0"/>
			<Rectangle x:Name="Cell_2" Fill="#FF8AC90D" Height="84" Width="7" Canvas.Left="12" Canvas.Top="0"/>
			<Rectangle x:Name="Cell_3" Fill="#FF8AC90D" Height="84" Width="7" Canvas.Left="24" Canvas.Top="0"/>
			<Rectangle x:Name="Cell_4" Fill="#FF8AC90D" Height="84" Width="7" Canvas.Left="36" Canvas.Top="0"/>
			<Rectangle x:Name="Cell_5" Fill="#FF8AC90D" Height="84" Width="7" Canvas.Left="48" Canvas.Top="0"/>
			<Rectangle x:Name="Cell_6" Fill="#FF8AC90D" Height="84" Width="7" Canvas.Left="60" Canvas.Top="0"/>
			<Rectangle x:Name="Cell_7" Fill="#FF8AC90D" Height="84" Width="7" Canvas.Left="72" Canvas.Top="0"/>
			<Rectangle x:Name="Cell_8" Fill="#FF8AC90D" Height="84" Width="7" Canvas.Left="84" Canvas.Top="0"/>
			<Rectangle x:Name="Cell_9" Fill="#FF8AC90D" Height="84" Width="7" Canvas.Left="96" Canvas.Top="0"/>
		</Canvas>
		<Image x:Name="FuelGaugeMask" Height="54" Canvas.Left="1127" Source="game:/media/cars/FER_575_02/UI/Textures/FER_575_02_FuelGaugeMask.png" Stretch="Fill" Canvas.Top="538" Width="104"/>
		<Canvas x:Name="Text" Height="311" Width="512" Canvas.Left="640" Canvas.Top="177">
			<local:FastTextBlock x:Name="Text_Clock" Canvas.Left="37" Canvas.Top="244" Text="{Binding Time}" FontSize="26.667" Style="{StaticResource TextBlockStyle}" Width="120" FontFamily="DG4_PF_Ronda_Seven" Foreground="#FFD2A15C"/>
			<local:FastTextBlock x:Name="Text_Odometer" Canvas.Left="392" Canvas.Top="111" Text="{Binding Odometer}" Width="108" FontSize="26.667" Style="{StaticResource TextBlockStyle}" RenderTransformOrigin="0.5,0.5"/>
			<local:FastTextBlock x:Name="Text_Gear" TextAlignment="Center" Text="{Binding Gear}" Width="56" FontSize="48" Style="{StaticResource TextBlockStyle}" RenderTransformOrigin="0.5,0.5" Canvas.Top="8" Canvas.Left="0" Foreground="#FFF75E25"/>
		</Canvas>
		<Rectangle x:Name="Start_Up_Mask" Fill="Black" Height="720" Stroke="Black" Width="1280" Opacity="0"/>
		
        <!-- Storyboard binding controllers -->
		<local:StoryboardController SeekPct="{Binding Fuel}" Target="{StaticResource Fuel Gauge}"/>
	</Canvas>
</Page>