<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.ALF_Giulia_HE_16">
	
    <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="True" UseDegreesF="False" UseMPH="False" 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.3" 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">
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)" Storyboard.TargetName="Fill">
				<EasingDoubleKeyFrame KeyTime="0" Value="0"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.125" Value="0.125"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.25" Value="0.24"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.375" Value="0.375"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.5" Value="0.5"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.625" Value="0.625"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.75" Value="0.75"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.875" Value="0.875"/>
				<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="Temp_Fill" Fill="White" Height="94.5" Canvas.Left="8" Canvas.Top="496" Width="104"/>
		<Image x:Name="Temperature_Graphics" Height="249" Source="game:/media/cars/ALF_Giulia_HE_16/UI/Textures/ALF_Giulia_16_Temperature.png" Stretch="Fill" Canvas.Top="360" Width="145"/>
        <Canvas x:Name="Fuel_Animation" Height="428" Canvas.Left="1019.333" Canvas.Top="237.333" Width="260.667">
        	<Rectangle x:Name="Fill" Fill="White" Height="152" Canvas.Left="132.667" Canvas.Top="180.167" Width="112" RenderTransformOrigin="0.5,1">
        		<Rectangle.RenderTransform>
        			<TransformGroup>
        				<ScaleTransform ScaleY="0"/>
        				<SkewTransform/>
        				<RotateTransform/>
        				<TranslateTransform/>
        			</TransformGroup>
        		</Rectangle.RenderTransform>
        	</Rectangle>
        </Canvas>
		<Image x:Name="Fuel_Graphics" Height="249" Canvas.Left="1135" Source="game:/media/cars/ALF_Giulia_HE_16/UI/Textures/ALF_Giulia_16_Fuel.png" Stretch="Fill" Canvas.Top="360" Width="145"/>
		<Image x:Name="Graphics_Main" Height="245" Canvas.Left="486" Source="game:/media/cars/ALF_Giulia_HE_16/UI/Textures/ALF_Giulia_16_Dash_Graphics.png" Stretch="Fill" Canvas.Top="254" Width="328"/>
		<Canvas x:Name="Text" Height="720" Width="1280">
			<local:FastTextBlock x:Name="Text_External_Temp" Canvas.Left="642.5" Canvas.Top="246.5" Text="{Binding ExternalTemp}" FontSize="24" Style="{StaticResource TextBlockStyle}" Width="150" RenderTransformOrigin="0.5,0.5" Foreground="White" FontFamily="DG1_Arial"/>
			<local:FastTextBlock x:Name="Text_Clock" Canvas.Left="404" Canvas.Top="246.5" Text="{Binding Time}" FontSize="24" Style="{StaticResource TextBlockStyle}" Width="120" RenderTransformOrigin="0.5,0.5" FontFamily="DG1_Arial" Foreground="White"/>
			<local:FastTextBlock x:Name="Text_Speed" Canvas.Left="517.5" Canvas.Top="342" Text="{Binding Speed}" Width="250" FontSize="66.667" Style="{StaticResource TextBlockStyle}" Foreground="White" FontFamily="Moire" RenderTransformOrigin="0.5,0.5" TextAlignment="Center">
				<local:FastTextBlock.RenderTransform>
					<TransformGroup>
						<ScaleTransform ScaleX="1.2"/>
						<SkewTransform AngleX="-10"/>
						<RotateTransform/>
						<TranslateTransform/>
					</TransformGroup>
				</local:FastTextBlock.RenderTransform>
			</local:FastTextBlock>
			<local:FastTextBlock x:Name="Text_Gear" Canvas.Left="543" Canvas.Top="193.07" Text="{Binding Gear}" FontSize="40" Style="{StaticResource TextBlockStyle}" Width="50" RenderTransformOrigin="0.5,0.5" FontFamily="DG1_Arial" Foreground="White" 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>