<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.MIN_Convertible_18">
	
    <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="False" 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="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="Low_Fuel_Icon">
				<DiscreteObjectKeyFrame KeyTime="0" Value="{x:Static Visibility.Visible}"/>
				<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>
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)" Storyboard.TargetName="Fuel_Color">
				<EasingDoubleKeyFrame KeyTime="0" Value="0"/>
				<EasingDoubleKeyFrame KeyTime="0:0:1" Value="1"/>
			</DoubleAnimationUsingKeyFrames>
		</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="Black" Height="720" Width="1280" Canvas.Left="0" Canvas.Top="0"/>
        <Rectangle x:Name="Background_Center" Fill="Black" Height="134" Width="334" Canvas.Left="474" Canvas.Top="291" RenderTransformOrigin="0.5,0.5"/>
        <Canvas x:Name="Fuel_Animation" Height="720" Canvas.Left="0" Canvas.Top="0" Width="1280">
        	<Rectangle x:Name="Grey" Fill="#FF707070" Height="494" Canvas.Left="1031.168" Canvas.Top="92" Width="184.832"/>
        	<Rectangle x:Name="Fuel_Color" Fill="#FFB16A4D" Height="369.997" Canvas.Left="1048" Canvas.Top="167.333" Width="136" RenderTransformOrigin="0.5,1">
        		<Rectangle.RenderTransform>
        			<TransformGroup>
        				<ScaleTransform ScaleY="0"/>
        				<SkewTransform/>
        				<RotateTransform/>
        				<TranslateTransform/>
        			</TransformGroup>
        		</Rectangle.RenderTransform>
        	</Rectangle>
        	<Image x:Name="Alpha" Height="504" Canvas.Left="1028.5" Source="game:/media/cars/MIN_Convertible_18/UI/Textures/MIN_Convertible_18_Fuel_Alpha.png" Stretch="Fill" Canvas.Top="90" Width="196"/>
        	<Image x:Name="Fuel_Icon" Height="40" Canvas.Left="992" Source="game:/media/cars/MIN_Convertible_18/UI/Textures/MIN_Convertible_18_Fuel.png" Stretch="Fill" Canvas.Top="590" Width="56"/>
        	<Image x:Name="Low_Fuel_Icon" Height="40" Canvas.Left="992" Source="game:/media/cars/MIN_Convertible_18/UI/Textures/MIN_Convertible_18_LowFuel.png" Stretch="Fill" Canvas.Top="590" Width="56" Visibility="Hidden"/>
        </Canvas>
		<Canvas x:Name="Text" Height="720" Width="1280">
			<local:FastTextBlock x:Name="Text_Odometer" Canvas.Left="589" Canvas.Top="393" Text="{Binding Odometer}" Width="350" FontSize="26.667" Style="{StaticResource TextBlockStyle}" FontFamily="DG1_Arial" RenderTransformOrigin="0.5,0.5" Foreground="#FF699BF9" Opacity="0.75" TextAlignment="Left">
				<local:FastTextBlock.RenderTransform>
					<TransformGroup>
						<ScaleTransform ScaleX="0.9"/>
						<SkewTransform/>
						<RotateTransform/>
						<TranslateTransform/>
					</TransformGroup>
				</local:FastTextBlock.RenderTransform>
			</local:FastTextBlock>
			<Image x:Name="Graphics" Height="96" Canvas.Left="607" Source="game:/media/cars/MIN_Convertible_18/UI/Textures/MIN_Convertible_18_txt.png" Stretch="Fill" Canvas.Top="300" Width="192"/>
			<local:FastTextBlock x:Name="Text_TripMeter" Canvas.Left="469" Canvas.Top="393" Text="{Binding TripMeter}" Width="350" FontSize="26.667" Style="{StaticResource TextBlockStyle}" FontFamily="DG1_Arial" RenderTransformOrigin="0.5,0.5" Foreground="#FF699BF9" Opacity="0.75" TextAlignment="Right">
				<local:FastTextBlock.RenderTransform>
					<TransformGroup>
						<ScaleTransform ScaleX="0.9"/>
						<SkewTransform/>
						<RotateTransform/>
						<TranslateTransform/>
					</TransformGroup>
				</local:FastTextBlock.RenderTransform>
			</local:FastTextBlock>
			<local:FastTextBlock x:Name="Text_Gear" Canvas.Left="599" Canvas.Top="299" Text="{Binding Gear}" Width="100" FontSize="26.667" Style="{StaticResource TextBlockStyle}" FontFamily="DG1_Arial" RenderTransformOrigin="0.5,0.5" Foreground="#FF699BF9" Opacity="0.75" 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 Fuel}" Target="{StaticResource Fuel Gauge}"/>
		
	</Canvas>
</Page>