<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.FIA_500AbarthSS_10"
	DataContext="{Binding RelativeSource={x:Static RelativeSource.Self}}">
	
    <Page.Resources>
        <Style x:Key="TextBlockStyle" TargetType="{x:Type TextBlock}">
            <Setter Property="FontFamily" Value="DG5_QuartzMS"/>
            <Setter Property="Foreground" Value="#FFDF4F06"/>
            <Setter Property="TextWrapping" Value="NoWrap"/>
            <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:0:0.125" Value="{x:Static Visibility.Visible}"/>
			</ObjectAnimationUsingKeyFrames>
			<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Cell_2">
				<DiscreteObjectKeyFrame KeyTime="0:0:0.25" Value="{x:Static Visibility.Visible}"/>
			</ObjectAnimationUsingKeyFrames>
			<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Cell_3">
				<DiscreteObjectKeyFrame KeyTime="0:0:0.375" Value="{x:Static Visibility.Visible}"/>
			</ObjectAnimationUsingKeyFrames>
			<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Cell_4">
				<DiscreteObjectKeyFrame KeyTime="0:0:0.5" Value="{x:Static Visibility.Visible}"/>
			</ObjectAnimationUsingKeyFrames>
			<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Cell_5">
				<DiscreteObjectKeyFrame KeyTime="0:0:0.625" Value="{x:Static Visibility.Visible}"/>
			</ObjectAnimationUsingKeyFrames>
			<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Cell_6">
				<DiscreteObjectKeyFrame KeyTime="0:0:0.75" Value="{x:Static Visibility.Visible}"/>
			</ObjectAnimationUsingKeyFrames>
			<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Cell_7">
				<DiscreteObjectKeyFrame KeyTime="0:0:0.875" Value="{x:Static Visibility.Visible}"/>
			</ObjectAnimationUsingKeyFrames>
			<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Cell_8">
				<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="#FF2D2D2D" Width="1280" Height="720">
		<Rectangle Fill="Black" Height="280" Canvas.Left="496" Stroke="Black" Canvas.Top="224" Width="288"/>
		<Canvas x:Name="FuelGauge" Height="152" Canvas.Left="522" Canvas.Top="272" Width="50" RenderTransformOrigin="0.5,0.5">
			<Rectangle x:Name="Cell_1" Fill="#FFDF4F06" Height="22" Width="13" Canvas.Left="15" Canvas.Top="131" Visibility="Hidden" RenderTransformOrigin="0.5,0.5">
				<Rectangle.RenderTransform>
					<TransformGroup>
						<ScaleTransform/>
						<SkewTransform/>
						<RotateTransform Angle="-27"/>
						<TranslateTransform/>
					</TransformGroup>
				</Rectangle.RenderTransform>
			</Rectangle>
			<Rectangle x:Name="Cell_2" Fill="#FFDF4F06" Height="22" Width="14" Canvas.Left="6" Canvas.Top="112" Visibility="Hidden" RenderTransformOrigin="0.5,0.5">
				<Rectangle.RenderTransform>
					<TransformGroup>
						<ScaleTransform/>
						<SkewTransform/>
						<RotateTransform Angle="-15"/>
						<TranslateTransform/>
					</TransformGroup>
				</Rectangle.RenderTransform>
			</Rectangle>
			<Rectangle x:Name="Cell_3" Fill="#FFDF4F06" Height="22" Width="14" Canvas.Left="2" Canvas.Top="90" Visibility="Hidden" RenderTransformOrigin="0.5,0.5">
				<Rectangle.RenderTransform>
					<TransformGroup>
						<ScaleTransform/>
						<SkewTransform/>
						<RotateTransform Angle="-4"/>
						<TranslateTransform/>
					</TransformGroup>
				</Rectangle.RenderTransform>
			</Rectangle>
			<Rectangle x:Name="Cell_4" Fill="#FFDF4F06" Height="18" Width="13" Canvas.Left="2" Canvas.Top="72" Visibility="Hidden"/>
			<Rectangle x:Name="Cell_5" Fill="#FFDF4F06" Height="20" Width="14" Canvas.Left="4" Canvas.Top="53" Visibility="Hidden" RenderTransformOrigin="0.5,0.5">
				<Rectangle.RenderTransform>
					<TransformGroup>
						<ScaleTransform/>
						<SkewTransform/>
						<RotateTransform Angle="15"/>
						<TranslateTransform/>
					</TransformGroup>
				</Rectangle.RenderTransform>
			</Rectangle>
			<Rectangle x:Name="Cell_6" Fill="#FFDF4F06" Height="22" Width="14" Canvas.Left="10" Canvas.Top="33" Visibility="Hidden" RenderTransformOrigin="0.5,0.5">
				<Rectangle.RenderTransform>
					<TransformGroup>
						<ScaleTransform/>
						<SkewTransform/>
						<RotateTransform Angle="23"/>
						<TranslateTransform/>
					</TransformGroup>
				</Rectangle.RenderTransform>
			</Rectangle>
			<Rectangle x:Name="Cell_7" Fill="#FFDF4F06" Height="21" Width="14" Canvas.Left="20" Canvas.Top="15" Visibility="Hidden" RenderTransformOrigin="0.5,0.5">
				<Rectangle.RenderTransform>
					<TransformGroup>
						<ScaleTransform/>
						<SkewTransform/>
						<RotateTransform Angle="37"/>
						<TranslateTransform/>
					</TransformGroup>
				</Rectangle.RenderTransform>
			</Rectangle>
			<Rectangle x:Name="Cell_8" Fill="#FFDF4F06" Height="27" Width="14" Canvas.Left="30" Canvas.Top="0" Visibility="Hidden" RenderTransformOrigin="0.5,0.5">
				<Rectangle.RenderTransform>
					<TransformGroup>
						<ScaleTransform/>
						<SkewTransform/>
						<RotateTransform Angle="45"/>
						<TranslateTransform/>
					</TransformGroup>
				</Rectangle.RenderTransform>
			</Rectangle>
		</Canvas>
		<Rectangle Fill="#FFD94E04" Height="88" Canvas.Left="720" Stroke="Black" Canvas.Top="344" Width="40"/>
		<Image x:Name="BG_Merged" Height="256" Canvas.Left="512" Source="game:/media/cars/FIA_500AbarthSS_10/UI/Textures/FIAT_500_ABARTH_Bckgd.png" Stretch="Fill" Canvas.Top="232" Width="256"/>
		<Canvas x:Name="Text" Height="352" Width="264" Canvas.Left="496" Canvas.Top="195">
			<TextBlock x:Name="Text_Gear" TextAlignment="Center" Canvas.Left="48" Canvas.Top="169" Text="{Binding Gear}" Width="55.124" FontSize="32" Style="{StaticResource TextBlockStyle}" RenderTransformOrigin="0.5,0.5"/>
			<TextBlock x:Name="Text_Clock" Canvas.Left="59" Canvas.Top="94.5" Text="{Binding Time}" FontSize="42.667" Style="{StaticResource TextBlockStyle}" Width="144"/>
			<TextBlock x:Name="Text_External_Temp" Canvas.Left="80" Canvas.Top="214.5" Text="{Binding ExternalTemp}" FontSize="24" Style="{StaticResource TextBlockStyle}" Width="57" RenderTransformOrigin="0.5,0.5">
				<TextBlock.RenderTransform>
					<TransformGroup>
						<ScaleTransform ScaleX="0.9"/>
						<SkewTransform/>
						<RotateTransform/>
						<TranslateTransform/>
					</TransformGroup>
				</TextBlock.RenderTransform>
			</TextBlock>
			<TextBlock x:Name="Text_Odometer" Canvas.Left="80" Canvas.Top="174.5" Text="{Binding Odometer}" Width="135" FontSize="26.667" Style="{StaticResource TextBlockStyle}" RenderTransformOrigin="0.5,0.5" Height="32.083">
				<TextBlock.RenderTransform>
					<TransformGroup>
						<ScaleTransform ScaleX="0.9"/>
						<SkewTransform/>
						<RotateTransform/>
						<TranslateTransform/>
					</TransformGroup>
				</TextBlock.RenderTransform>
			</TextBlock>
		</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>