<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.POL_RZR1000RE_15"
	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="False" UseDegreesF="False" UseMPH="True" UsePsi="False" MaxBoost="13" MinBoost="1" MaxSpeed="00" HasAbsLight="False" HasStmLight="False" HasTcsLight="False" HasGAccelX="False" HasGAccelY="False" HasShiftLights="False" HasTextTach="True" HasLapPlaceInfo="False" HasTextBoost="False" HasTextGAccel="False" HasTextOdometer="True" HasTextFuel="False" MaxFuel="9.5" MaxGear="8" MaxRpm="10500"></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">
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)" Storyboard.TargetName="Fuel_Color">
				<EasingDoubleKeyFrame KeyTime="0" Value="1"/>
				<EasingDoubleKeyFrame KeyTime="0:0:1" Value="53.774"/>
			</DoubleAnimationUsingKeyFrames>
		</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_Dark" Fill="#FF191919" Height="440" Canvas.Left="296" Canvas.Top="129" Width="656"/>
		<Canvas x:Name="Battery_Gauge" Height="27" Canvas.Left="690" Canvas.Top="461" Width="126" RenderTransformOrigin="0.5,0.5">
			<Rectangle x:Name="Color" Fill="#FF357FF7" Height="120" Width="118" Canvas.Left="53" Canvas.Top="-98"/>
		</Canvas>
		<Canvas x:Name="FuelGauge" Height="315" Canvas.Left="320" Canvas.Top="232" Width="264" RenderTransformOrigin="0.5,0.5">
			<Rectangle x:Name="Fuel_Color" Fill="#FF357FF7" Height="3.335" Canvas.Left="56" Canvas.Top="248" Width="152" RenderTransformOrigin="0.5,1">
				<Rectangle.RenderTransform>
					<TransformGroup>
						<ScaleTransform/>
						<SkewTransform/>
						<RotateTransform/>
						<TranslateTransform/>
					</TransformGroup>
				</Rectangle.RenderTransform>
			</Rectangle>
		</Canvas>
		<Image x:Name="Graphics" Height="286" Canvas.Left="376" Source="game:/media/cars/POL_RZR1000RE_15/UI/Textures/POL_RZR1000_15_graphics.png" Stretch="Fill" Canvas.Top="202" Width="500"/>
		<Canvas x:Name="Text" Height="352" Width="264" Canvas.Left="496" Canvas.Top="195">
			<TextBlock x:Name="Text_Speedo_Shadow" Canvas.Left="-71.843" Canvas.Top="52.035" Text="{Binding Speed}" FontSize="133.333" Style="{StaticResource TextBlockStyle}" Width="360" Foreground="Black" FontFamily="Moire" RenderTransformOrigin="0.5,0.5">
				<TextBlock.RenderTransform>
					<TransformGroup>
						<ScaleTransform ScaleY="0.9"/>
						<SkewTransform AngleX="-12"/>
						<RotateTransform/>
						<TranslateTransform/>
					</TransformGroup>
				</TextBlock.RenderTransform>
			</TextBlock>
			<TextBlock x:Name="Text_Speedo" Canvas.Left="-73.844" Canvas.Top="48.706" Text="{Binding Speed}" FontSize="133.333" Style="{StaticResource TextBlockStyle}" Width="360" Foreground="White" FontFamily="Moire" RenderTransformOrigin="0.5,0.5">
				<TextBlock.RenderTransform>
					<TransformGroup>
						<ScaleTransform ScaleY="0.9"/>
						<SkewTransform AngleX="-12"/>
						<RotateTransform/>
						<TranslateTransform/>
					</TransformGroup>
				</TextBlock.RenderTransform>
			</TextBlock>
			<TextBlock x:Name="Text_Odometer" Canvas.Left="55.867" Canvas.Top="265.068" Text="{Binding Odometer}" Width="112.017" FontSize="17.333" Style="{StaticResource TextBlockStyle}" RenderTransformOrigin="0.5,0.5" Foreground="White"/>
			<TextBlock x:Name="Text_Volt_Null" Canvas.Left="174.723" Canvas.Top="264.901" Text="12.5" Width="77.94" FontSize="17.333" Style="{StaticResource TextBlockStyle}" RenderTransformOrigin="0.5,0.5" Foreground="White"/>
			<TextBlock x:Name="Text_Tach_Shadow" Canvas.Left="-133.999" Canvas.Top="189.556" Text="{Binding TachText}" FontSize="58.667" Style="{StaticResource TextBlockStyle}" Width="360" Foreground="Black" FontFamily="Moire" RenderTransformOrigin="0.5,0.5">
				<TextBlock.RenderTransform>
					<TransformGroup>
						<ScaleTransform ScaleY="0.9"/>
						<SkewTransform AngleX="-12"/>
						<RotateTransform/>
						<TranslateTransform/>
					</TransformGroup>
				</TextBlock.RenderTransform>
			</TextBlock>
			<TextBlock x:Name="Text_Tach" Canvas.Left="-136" Canvas.Top="187.558" Text="{Binding TachText}" FontSize="58.667" Style="{StaticResource TextBlockStyle}" Width="360" Foreground="White" FontFamily="Moire" RenderTransformOrigin="0.5,0.5">
				<TextBlock.RenderTransform>
					<TransformGroup>
						<ScaleTransform ScaleY="0.9"/>
						<SkewTransform AngleX="-12"/>
						<RotateTransform/>
						<TranslateTransform/>
					</TransformGroup>
				</TextBlock.RenderTransform>
			</TextBlock>
			<TextBlock x:Name="Text_Null" Canvas.Left="-76.633" Canvas.Top="265.568" Text="50" Width="112.017" FontSize="17.333" Style="{StaticResource TextBlockStyle}" RenderTransformOrigin="0.5,0.5" Foreground="White"/>
			<TextBlock x:Name="Text_Gear" Canvas.Left="263.5" Canvas.Top="222.016" Text="{Binding Gear}" FontSize="58.667" Style="{StaticResource TextBlockStyle}" Width="150" Foreground="White" FontFamily="Moire" RenderTransformOrigin="0.5,0.5" TextAlignment="Center">
				<TextBlock.RenderTransform>
					<TransformGroup>
						<ScaleTransform ScaleY="0.9"/>
						<SkewTransform AngleX="-12"/>
						<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>