<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.FER_360Challenge_03">
	
    <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="True" HasTextFuel="False" MaxFuel="20" MaxGear="8" MaxRpm="10000"></local:DigitalGaugeConfig>
		<Storyboard x:Key="Fuel Gauge">
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)" Storyboard.TargetName="Fuel_Fill">
				<EasingDoubleKeyFrame KeyTime="0" Value="1"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.1" Value="1.533"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.2" Value="2.129"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.3" Value="2.631"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.4" Value="3.227"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.5" Value="3.823"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.6" Value="4.356"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.7" Value="4.921"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.8" Value="5.517"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.9" Value="6.05"/>
			</DoubleAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)" Storyboard.TargetName="Fuel_Fill">
				<EasingDoubleKeyFrame KeyTime="0" Value="0"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.1" Value="5.667"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.2" Value="12"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.3" Value="17.333"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.4" Value="23.666"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.5" Value="29.999"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.6" Value="35.666"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.7" Value="41.666"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.8" Value="47.999"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.9" Value="53.666"/>
			</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>
        <Rectangle x:Name="Background_Grey" Fill="#FF393939" Height="720" Width="1280" Canvas.Left="0" Canvas.Top="0"/>
        <Rectangle x:Name="Background_Gear_Black" Fill="Black" Height="128" Canvas.Left="598" Canvas.Top="240" Width="98"/>
        <Rectangle x:Name="Background_Odometer" Fill="Black" Height="50" Width="180" Canvas.Left="980" Canvas.Top="352"/>
        <Rectangle x:Name="Background_Clock" Fill="#FF70353B" Height="128" Width="128" Canvas.Left="669" Canvas.Top="442"/>
        <Image x:Name="Background_Gear" Height="128" Canvas.Left="617" Source="game:/media/cars/FER_360Challenge_03/UI/Textures/FER_360Challenge_03_GearBckgd.png" Stretch="Fill" Canvas.Top="240" Width="64"/>
        <Canvas x:Name="Fuel" Canvas.Left="1072.999" Canvas.Top="587.666" Height="150" Width="200">
            <Rectangle x:Name="Background_Fuel" Fill="Black" Height="96.5" Canvas.Left="22" Canvas.Top="27" Width="149"/>
            <Rectangle x:Name="Fuel_Fill" Fill="#FF8AC90D" Height="96.5" Canvas.Left="22" Canvas.Top="27" Width="21.25" RenderTransformOrigin="0.5,0.5">
            	<Rectangle.RenderTransform>
            		<TransformGroup>
            			<ScaleTransform/>
            			<SkewTransform/>
            			<RotateTransform/>
            			<TranslateTransform/>
            		</TransformGroup>
            	</Rectangle.RenderTransform>
            </Rectangle>
            <Rectangle x:Name="Graphics_Fuel" Height="110" Canvas.Left="17.329" Canvas.Top="19.664" Width="160">
            	<Rectangle.OpacityMask>
            		<ImageBrush ImageSource="game:/media/cars/FER_360Challenge_03/UI/Textures/FER_360Challenge_03_FuelGraphics.png"/>
            	</Rectangle.OpacityMask>
            	<Rectangle.Fill>
            		<ImageBrush ImageSource="game:/media/cars/FER_360Challenge_03/UI/Textures/FER_360Challenge_03_FuelGraphics.png"/>
            	</Rectangle.Fill>
            </Rectangle>
		</Canvas>
		<Canvas x:Name="Text" Height="720" Width="1280">
            <local:FastTextBlock x:Name="Text_Clock" Canvas.Left="652.164" Canvas.Top="509.5" Text="{Binding Time}" FontSize="24" Style="{StaticResource TextBlockStyle}" Width="110" FontFamily="DG4_PF_Ronda_Seven" Foreground="#FFD29E64"/>
            <local:FastTextBlock x:Name="Text_Gear" Canvas.Left="601.192" Canvas.Top="273.209" Text="{Binding Gear}" Width="60" FontSize="42.667" Style="{StaticResource TextBlockStyle}" Foreground="#FFEE091E" FontFamily="DG2_LCD"/>
            <local:FastTextBlock x:Name="Text_Odometer" Canvas.Left="979.192" Canvas.Top="366.5" Text="{Binding Odometer}" Width="140" FontSize="26.667" Style="{StaticResource TextBlockStyle}" FontFamily="DG2_LCD" Foreground="#FF8ED308"/>
		</Canvas>
        <Image x:Name="Text_Race_baked" Height="32" Canvas.Left="688" Source="game:/media/cars/FER_360Challenge_03/UI/Textures/FER_360Challenge_03_txt_Race.png" Stretch="Fill" Canvas.Top="471.5" Width="90"/>
        <Rectangle x:Name="Start_Up_Mask" Fill="Black" Height="668" Stroke="Black" Width="1186" Canvas.Left="58" Canvas.Top="53" Opacity="0"/>
		
								<!-- Storyboard binding controllers -->
		<local:StoryboardController SeekPct="{Binding Fuel}" Target="{StaticResource Fuel Gauge}"/>
	</Canvas>
</Page>