<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.ALF_8C_08"
	 >
	
    <Page.Resources>
        <Style x:Key="TextBlockStyle" TargetType="{x:Type local:FastTextBlock}">
            <Setter Property="FontFamily" Value="DG1_Arial"/>
            <Setter Property="Foreground" Value="#FFff2C3D"/>
             
            <Setter Property="TextAlignment" Value="Right"/>
        </Style>
		
		<local:DigitalGaugeConfig x:Key="Config" HasClock="True" HasExternalTemp="True" UseDegreesF="False" UseMPH="False" 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="Cell_1">
				<DiscreteObjectKeyFrame KeyTime="0:0:0.063" Value="{x:Static Visibility.Visible}"/>
			</ObjectAnimationUsingKeyFrames>
			<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Cell_2">
				<DiscreteObjectKeyFrame KeyTime="0:0:0.188" Value="{x:Static Visibility.Visible}"/>
			</ObjectAnimationUsingKeyFrames>
			<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Cell_3">
				<DiscreteObjectKeyFrame KeyTime="0:0:0.313" Value="{x:Static Visibility.Visible}"/>
			</ObjectAnimationUsingKeyFrames>
			<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Cell_4">
				<DiscreteObjectKeyFrame KeyTime="0:0:0.438" Value="{x:Static Visibility.Visible}"/>
			</ObjectAnimationUsingKeyFrames>
			<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Cell_5">
				<DiscreteObjectKeyFrame KeyTime="0:0:0.563" Value="{x:Static Visibility.Visible}"/>
			</ObjectAnimationUsingKeyFrames>
			<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Cell_6">
				<DiscreteObjectKeyFrame KeyTime="0:0:0.688" Value="{x:Static Visibility.Visible}"/>
			</ObjectAnimationUsingKeyFrames>
			<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Cell_7">
				<DiscreteObjectKeyFrame KeyTime="0:0:0.813" Value="{x:Static Visibility.Visible}"/>
			</ObjectAnimationUsingKeyFrames>
			<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Cell_8">
				<DiscreteObjectKeyFrame KeyTime="0:0:0.938" Value="{x:Static Visibility.Visible}"/>
				<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">
		<Image x:Name="BGmerged" Height="512" Canvas.Left="432" Source="game:/media/cars/ALF_8C_08/UI/Textures/ALF_8C_08_BGmerged.png" Stretch="Fill" Canvas.Top="112" Width="384"/>
		<Canvas x:Name="Oil_Temp_Gauge" Height="27" Canvas.Left="582.8" Canvas.Top="255" Width="126" RenderTransformOrigin="0.5,0.5">
			<Rectangle x:Name="Cell_9" Fill="#FFff2C3D" Height="27" Width="14" Canvas.Left="0" Canvas.Top="0"/>
			<Rectangle x:Name="Cell_10" Fill="#FFff2C3D" Height="27" Width="14" Canvas.Left="16" Canvas.Top="0"/>
			<Rectangle x:Name="Cell_11" Fill="#FFff2C3D" Height="27" Width="14" Canvas.Left="32" Canvas.Top="0"/>
			<Rectangle x:Name="Cell_12" Fill="#FFff2C3D" Height="27" Width="14" Canvas.Left="48" Canvas.Top="0"/>
			<Rectangle x:Name="Cell_13" Fill="#FFff2C3D" Height="27" Width="14" Canvas.Left="64" Canvas.Top="0" Visibility="Hidden"/>
			<Rectangle x:Name="Cell_14" Fill="#FFff2C3D" Height="27" Width="14" Canvas.Left="80" Canvas.Top="0" Visibility="Hidden"/>
			<Rectangle x:Name="Cell_15" Fill="#FFff2C3D" Height="27" Width="14" Canvas.Left="96" Canvas.Top="0" Visibility="Hidden"/>
			<Rectangle x:Name="Cell_16" Fill="#FFff2C3D" Height="27" Width="14" Canvas.Left="112" Canvas.Top="0" Visibility="Hidden"/>
		</Canvas>
		<Canvas x:Name="Water_Temp_Gauge" Height="27" Canvas.Left="582.8" Canvas.Top="318" Width="126" RenderTransformOrigin="0.5,0.5">
			<Rectangle x:Name="Cell_17" Fill="#FFff2C3D" Height="27" Width="14" Canvas.Left="0" Canvas.Top="0"/>
			<Rectangle x:Name="Cell_18" Fill="#FFff2C3D" Height="27" Width="14" Canvas.Left="16" Canvas.Top="0"/>
			<Rectangle x:Name="Cell_19" Fill="#FFff2C3D" Height="27" Width="14" Canvas.Left="32" Canvas.Top="0"/>
			<Rectangle x:Name="Cell_20" Fill="#FFff2C3D" Height="27" Width="14" Canvas.Left="48" Canvas.Top="0" Visibility="Hidden"/>
			<Rectangle x:Name="Cell_21" Fill="#FFff2C3D" Height="27" Width="14" Canvas.Left="64" Canvas.Top="0" Visibility="Hidden"/>
			<Rectangle x:Name="Cell_22" Fill="#FFff2C3D" Height="27" Width="14" Canvas.Left="80" Canvas.Top="0" Visibility="Hidden"/>
			<Rectangle x:Name="Cell_23" Fill="#FFff2C3D" Height="27" Width="14" Canvas.Left="96" Canvas.Top="0" Visibility="Hidden"/>
			<Rectangle x:Name="Cell_24" Fill="#FFff2C3D" Height="27" Width="14" Canvas.Left="112" Canvas.Top="0" Visibility="Hidden"/>
		</Canvas>
		<Canvas x:Name="FuelGauge" Height="27" Canvas.Left="582.8" Canvas.Top="380" Width="126" RenderTransformOrigin="0.5,0.5">
			<Rectangle x:Name="Cell_1" Fill="#FFff2C3D" Height="27" Width="14" Canvas.Left="0" Canvas.Top="0" Visibility="Hidden"/>
			<Rectangle x:Name="Cell_2" Fill="#FFff2C3D" Height="27" Width="14" Canvas.Left="16" Canvas.Top="0" Visibility="Hidden"/>
			<Rectangle x:Name="Cell_3" Fill="#FFff2C3D" Height="27" Width="14" Canvas.Left="32" Canvas.Top="0" Visibility="Hidden"/>
			<Rectangle x:Name="Cell_4" Fill="#FFff2C3D" Height="27" Width="14" Canvas.Left="48" Canvas.Top="0" Visibility="Hidden"/>
			<Rectangle x:Name="Cell_5" Fill="#FFff2C3D" Height="27" Width="14" Canvas.Left="64" Canvas.Top="0" Visibility="Hidden"/>
			<Rectangle x:Name="Cell_6" Fill="#FFff2C3D" Height="27" Width="14" Canvas.Left="80" Canvas.Top="0" Visibility="Hidden"/>
			<Rectangle x:Name="Cell_7" Fill="#FFff2C3D" Height="27" Width="14" Canvas.Left="96" Canvas.Top="0" Visibility="Hidden"/>
			<Rectangle x:Name="Cell_8" Fill="#FFff2C3D" Height="27" Width="14" Canvas.Left="112" Canvas.Top="0" Visibility="Hidden"/>
		</Canvas>
		<Canvas x:Name="Text" Height="352" Width="264" Canvas.Left="496" Canvas.Top="195">
			<local:FastTextBlock x:Name="Text_Clock" Canvas.Left="27" Canvas.Top="13" Text="{Binding Time}" FontSize="26.667" Style="{StaticResource TextBlockStyle}" Width="78.95"/>
			<local:FastTextBlock x:Name="Text_External_Temp" Canvas.Left="129" Canvas.Top="5" Text="{Binding ExternalTemp}" FontSize="32" Style="{StaticResource TextBlockStyle}" Width="78" RenderTransformOrigin="0.5,0.5" Height="36.797">
				<local:FastTextBlock.RenderTransform>
					<TransformGroup>
						<ScaleTransform ScaleX="0.9"/>
						<SkewTransform/>
						<RotateTransform/>
						<TranslateTransform/>
					</TransformGroup>
				</local:FastTextBlock.RenderTransform>
			</local:FastTextBlock>
			<local:FastTextBlock x:Name="Text_Odometer" Canvas.Left="71" Canvas.Top="290" Text="{Binding Odometer}" Width="112.017" FontSize="26.667" Style="{StaticResource TextBlockStyle}" RenderTransformOrigin="0.5,0.5">
				<local:FastTextBlock.RenderTransform>
					<TransformGroup>
						<ScaleTransform ScaleX="0.9"/>
						<SkewTransform/>
						<RotateTransform/>
						<TranslateTransform/>
					</TransformGroup>
				</local:FastTextBlock.RenderTransform>
			</local:FastTextBlock>
			<local:FastTextBlock x:Name="Text_Trip_Odo" Canvas.Left="100" Canvas.Top="249" Text="{Binding TripMeter}" Width="77.94" FontSize="26.667" Style="{StaticResource TextBlockStyle}" RenderTransformOrigin="0.5,0.5">
				<local:FastTextBlock.RenderTransform>
					<TransformGroup>
						<ScaleTransform ScaleX="0.95"/>
						<SkewTransform/>
						<RotateTransform/>
						<TranslateTransform/>
					</TransformGroup>
				</local:FastTextBlock.RenderTransform>
			</local:FastTextBlock>
			<local:FastTextBlock x:Name="Text_Gear" TextAlignment="Center" Canvas.Left="184" Canvas.Top="251" Text="{Binding Gear}" Width="55.124" FontSize="72" Style="{StaticResource TextBlockStyle}" RenderTransformOrigin="0.5,0.5">
				<local:FastTextBlock.RenderTransform>
					<TransformGroup>
						<ScaleTransform ScaleY="0.9"/>
						<SkewTransform/>
						<RotateTransform/>
						<TranslateTransform/>
					</TransformGroup>
				</local:FastTextBlock.RenderTransform>
			</local:FastTextBlock>
		</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>