<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.VAU_CorsaVXR_16"
	DataContext="{Binding RelativeSource={x:Static RelativeSource.Self}}">
	
    <Page.Resources>
        <Style x:Key="TextBlockStyle" TargetType="{x:Type TextBlock}">
            <Setter Property="FontFamily" Value="DG1_Arial"/>
            <Setter Property="Foreground" Value="#FFff2C3D"/>
            <Setter Property="TextWrapping" Value="NoWrap"/>
            <Setter Property="TextAlignment" Value="Right"/>
        </Style>
		
		<local:DigitalGaugeConfig x:Key="Config" HasClock="False" HasExternalTemp="True" UseDegreesF="True" UseMPH="True" UsePsi="False" MaxBoost="13" MinBoost="1" 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="Fill_01">
				<DiscreteObjectKeyFrame KeyTime="0" Value="{x:Static Visibility.Hidden}"/>
				<DiscreteObjectKeyFrame KeyTime="0:0:0.124" Value="{x:Static Visibility.Visible}"/>
			</ObjectAnimationUsingKeyFrames>
			<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Fill_02">
				<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="Fill_03">
				<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="Fill_04">
				<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="Fill_05">
				<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="Fill_06">
				<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="Fill_07">
				<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="Fill_08">
				<DiscreteObjectKeyFrame KeyTime="0" Value="{x:Static Visibility.Hidden}"/>
				<DiscreteObjectKeyFrame KeyTime="0:0:1" Value="{x:Static Visibility.Visible}"/>
			</ObjectAnimationUsingKeyFrames>
			<ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(Shape.Fill).(SolidColorBrush.Color)" Storyboard.TargetName="Fill_01">
				<EasingColorKeyFrame KeyTime="0:0:0.124" Value="#FFFE0000"/>
				<EasingColorKeyFrame KeyTime="0:0:0.249" Value="sc#1, 0.9911021, 0, 0"/>
				<EasingColorKeyFrame KeyTime="0:0:0.25" Value="#FFFEFEFE"/>
			</ColorAnimationUsingKeyFrames>
		</Storyboard>
	</Page.Resources>
	<Page.Triggers>
		<EventTrigger RoutedEvent="FrameworkElement.Loaded">
			<BeginStoryboard Storyboard="{StaticResource Fuel Gauge}"/>
		</EventTrigger>
	</Page.Triggers>
	  

	<Canvas x:Name="LayoutRoot" Background="#FF2D2D2D" Width="1280" Height="720">
		<Rectangle x:Name="Background_Center" Fill="Black" Height="368" Canvas.Left="381.414" Canvas.Top="232" Width="494.172"/>
		<Image x:Name="Graphics_MFD" Height="335" Canvas.Left="400.5" Source="game:/media/cars/VAU_CorsaVXR_16/UI/Textures/VAU_CorsaVXR_16_graphics.png" Stretch="Fill" Canvas.Top="248" Width="452"/>
		<Canvas x:Name="Fuel_Gauge" Height="181.5" Canvas.Left="272" Canvas.Top="16" Width="752">
			<Rectangle x:Name="Null_Color" Fill="#FF363636" Height="64" Canvas.Left="8" Stroke="Black" Canvas.Top="64" Width="712"/>
			<Rectangle x:Name="Fill_01" Fill="#FFFE0000" Height="24" Canvas.Left="24" Canvas.Top="80" Width="72" Visibility="Hidden"/>
			<Rectangle x:Name="Fill_02" Fill="White" Height="24" Canvas.Left="112" Canvas.Top="80" Width="72" Visibility="Hidden"/>
			<Rectangle x:Name="Fill_03" Fill="White" Height="24" Canvas.Left="200" Canvas.Top="80" Width="72" Visibility="Hidden"/>
			<Rectangle x:Name="Fill_04" Fill="White" Height="24" Canvas.Left="288" Canvas.Top="80" Width="72" Visibility="Hidden"/>
			<Rectangle x:Name="Fill_05" Fill="White" Height="24" Canvas.Left="376" Canvas.Top="80" Width="72" Visibility="Hidden"/>
			<Rectangle x:Name="Fill_06" Fill="White" Height="24" Canvas.Left="464" Canvas.Top="80" Width="72" Visibility="Hidden"/>
			<Rectangle x:Name="Fill_07" Fill="White" Height="24" Canvas.Left="552" Canvas.Top="80" Width="72" Visibility="Hidden"/>
			<Rectangle x:Name="Fill_08" Fill="White" Height="24" Canvas.Left="640" Canvas.Top="80" Width="72" Visibility="Hidden"/>
		</Canvas>
		<Canvas x:Name="Text" Height="352" Width="264" Canvas.Left="496" Canvas.Top="195">
			<TextBlock x:Name="Text_Speed" Canvas.Left="6" Canvas.Top="166.406" Text="{Binding Speed}" FontSize="66.667" Style="{StaticResource TextBlockStyle}" Width="250" RenderTransformOrigin="0.5,0.5" Foreground="White" FontFamily="DG1_Arial" TextAlignment="Center">
				<TextBlock.RenderTransform>
					<TransformGroup>
						<ScaleTransform ScaleY="1.05"/>
						<SkewTransform/>
						<RotateTransform/>
						<TranslateTransform/>
					</TransformGroup>
				</TextBlock.RenderTransform>
			</TextBlock>
			<TextBlock x:Name="Text_TripMeter" Canvas.Left="-150" Canvas.Top="337" Text="{Binding TripMeter}" Width="300" FontSize="34.667" Style="{StaticResource TextBlockStyle}" RenderTransformOrigin="0.5,0.5" FontFamily="DG1_Arial" Foreground="White">
				<TextBlock.RenderTransform>
					<TransformGroup>
						<ScaleTransform ScaleY="1.1"/>
						<SkewTransform/>
						<RotateTransform/>
						<TranslateTransform/>
					</TransformGroup>
				</TextBlock.RenderTransform>
			</TextBlock>
		</Canvas>
		<Rectangle x:Name="Start_Up_Mask" Fill="Black" Height="720" Stroke="Black" Width="1280" Opacity="0" Canvas.Left="0" Canvas.Top="0"/>
		
        <!-- Storyboard binding controllers -->
		<local:StoryboardController SeekPct="{Binding Fuel}" Target="{StaticResource Fuel Gauge}"/>
	</Canvas>
</Page>