<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.CAT_R500_13">
	
    <Page.Resources>
        <Style x:Key="TextBlockStyle" TargetType="{x:Type TextBlock}">
            <Setter Property="FontFamily" Value="Moire"/>
            <Setter Property="Foreground" Value="White"/>
            <Setter Property="TextWrapping" Value="Wrap"/>
            <Setter Property="TextAlignment" Value="Right"/>
        </Style>
		
		<local:DigitalGaugeConfig x:Key="Config" HasClock="False" HasExternalTemp="False" UseDegreesF="True" UseMPH="True" UsePsi="True" MaxBoost="13" MinBoost="1" MaxSpeed="120" HasAbsLight="True" HasStmLight="True" HasTcsLight="True" HasGAccelX="True" HasGAccelY="True" HasShiftLights="True" HasTextTach="True" HasLapPlaceInfo="True" HasTextBoost="True" HasTextGAccel="True" HasTextOdometer="True" HasTextFuel="True" 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>
		</Storyboard>
		<Storyboard x:Key="Shift Lights Progress">
			<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Yellow_ON_01">
				<DiscreteObjectKeyFrame KeyTime="0" Value="{x:Static Visibility.Hidden}"/>
				<DiscreteObjectKeyFrame KeyTime="0:0:0.64" Value="{x:Static Visibility.Visible}"/>
				<DiscreteObjectKeyFrame KeyTime="0:0:0.86" Value="{x:Static Visibility.Hidden}"/>
			</ObjectAnimationUsingKeyFrames>
			<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Yellow__ON_02">
				<DiscreteObjectKeyFrame KeyTime="0" Value="{x:Static Visibility.Hidden}"/>
				<DiscreteObjectKeyFrame KeyTime="0:0:0.7" Value="{x:Static Visibility.Visible}"/>
				<DiscreteObjectKeyFrame KeyTime="0:0:0.86" Value="{x:Static Visibility.Hidden}"/>
			</ObjectAnimationUsingKeyFrames>
			<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Yellow_ON_03">
				<DiscreteObjectKeyFrame KeyTime="0" Value="{x:Static Visibility.Hidden}"/>
				<DiscreteObjectKeyFrame KeyTime="0:0:0.74" Value="{x:Static Visibility.Visible}"/>
				<DiscreteObjectKeyFrame KeyTime="0:0:0.86" Value="{x:Static Visibility.Hidden}"/>
			</ObjectAnimationUsingKeyFrames>
			<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Red__ON_01">
				<DiscreteObjectKeyFrame KeyTime="0" Value="{x:Static Visibility.Hidden}"/>
				<DiscreteObjectKeyFrame KeyTime="0:0:0.78" Value="{x:Static Visibility.Visible}"/>
				<DiscreteObjectKeyFrame KeyTime="0:0:0.86" Value="{x:Static Visibility.Hidden}"/>
			</ObjectAnimationUsingKeyFrames>
			<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Red_ON_02">
				<DiscreteObjectKeyFrame KeyTime="0" Value="{x:Static Visibility.Hidden}"/>
				<DiscreteObjectKeyFrame KeyTime="0:0:0.84" Value="{x:Static Visibility.Visible}"/>
				<DiscreteObjectKeyFrame KeyTime="0:0:0.86" Value="{x:Static Visibility.Hidden}"/>
			</ObjectAnimationUsingKeyFrames>
			<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="FLASHING">
				<DiscreteObjectKeyFrame KeyTime="0" Value="{x:Static Visibility.Hidden}"/>
				<DiscreteObjectKeyFrame KeyTime="0:0:0.86" Value="{x:Static Visibility.Visible}"/>
			</ObjectAnimationUsingKeyFrames>
		</Storyboard>
		<Storyboard x:Key="Shift Lights Flash" RepeatBehavior="Forever">
			<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Yellow_FLASH_01">
				<DiscreteObjectKeyFrame KeyTime="0" Value="{x:Static Visibility.Visible}"/>
				<DiscreteObjectKeyFrame KeyTime="0:0:0.25" Value="{x:Static Visibility.Hidden}"/>
				<DiscreteObjectKeyFrame KeyTime="0:0:0.5" Value="{x:Static Visibility.Hidden}"/>
			</ObjectAnimationUsingKeyFrames>
			<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Yellow__FLASH_02">
				<DiscreteObjectKeyFrame KeyTime="0" Value="{x:Static Visibility.Visible}"/>
				<DiscreteObjectKeyFrame KeyTime="0:0:0.25" Value="{x:Static Visibility.Hidden}"/>
				<DiscreteObjectKeyFrame KeyTime="0:0:0.5" Value="{x:Static Visibility.Hidden}"/>
			</ObjectAnimationUsingKeyFrames>
			<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Yellow_FLASH_03">
				<DiscreteObjectKeyFrame KeyTime="0" Value="{x:Static Visibility.Visible}"/>
				<DiscreteObjectKeyFrame KeyTime="0:0:0.25" Value="{x:Static Visibility.Hidden}"/>
				<DiscreteObjectKeyFrame KeyTime="0:0:0.5" Value="{x:Static Visibility.Hidden}"/>
			</ObjectAnimationUsingKeyFrames>
			<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Red__FLASH_01">
				<DiscreteObjectKeyFrame KeyTime="0" Value="{x:Static Visibility.Visible}"/>
				<DiscreteObjectKeyFrame KeyTime="0:0:0.25" Value="{x:Static Visibility.Hidden}"/>
				<DiscreteObjectKeyFrame KeyTime="0:0:0.5" Value="{x:Static Visibility.Hidden}"/>
			</ObjectAnimationUsingKeyFrames>
			<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Red_FLASH_02">
				<DiscreteObjectKeyFrame KeyTime="0" Value="{x:Static Visibility.Visible}"/>
				<DiscreteObjectKeyFrame KeyTime="0:0:0.25" Value="{x:Static Visibility.Hidden}"/>
				<DiscreteObjectKeyFrame KeyTime="0:0:0.5" Value="{x:Static Visibility.Hidden}"/>
			</ObjectAnimationUsingKeyFrames>
		</Storyboard>
	</Page.Resources>
	<Page.Triggers>
		<EventTrigger RoutedEvent="FrameworkElement.Loaded" SourceName="LayoutRoot">
			<BeginStoryboard Storyboard="{StaticResource Shift Lights Flash}"/>
		</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="Top_Background" Fill="#FF373737" Height="720" Width="1280" Canvas.Left="0" Canvas.Top="0"/>
        <Rectangle x:Name="Gauge_Background" Fill="#FF98A52B" Height="100" Canvas.Left="350" Canvas.Top="305" Width="574"/>
        <Rectangle x:Name="Shift_Lights_Background" Fill="Black" Height="94" Canvas.Left="350" Canvas.Top="153" Width="574"/>
        <Canvas x:Name="Shift_Lights" Height="94" Canvas.Left="350" Canvas.Top="153" Width="574">
        	<Canvas x:Name="OFF" Height="94" Width="574">
        		<Image x:Name="Yellow_OFF_01" Height="50" Canvas.Left="35" Source="game:/media/cars/CAT_R500_13/UI/Textures/CAT_R500_13_ShiftLight_OFF.png" Stretch="Fill" Canvas.Top="24" Width="50" Opacity="0.6"/>
        		<Image x:Name="Yellow__OFF_02" Height="50" Canvas.Left="143" Source="game:/media/cars/CAT_R500_13/UI/Textures/CAT_R500_13_ShiftLight_OFF.png" Stretch="Fill" Canvas.Top="24" Width="50" Opacity="0.6"/>
        		<Image x:Name="Yellow_OFF_03" Height="50" Canvas.Left="258" Source="game:/media/cars/CAT_R500_13/UI/Textures/CAT_R500_13_ShiftLight_OFF.png" Stretch="Fill" Canvas.Top="24" Width="50" Opacity="0.6"/>
        		<Image x:Name="Red__OFF_01" Height="50" Canvas.Left="380" Source="game:/media/cars/CAT_R500_13/UI/Textures/CAT_R500_13_ShiftLight_OFF.png" Stretch="Fill" Canvas.Top="24" Width="50" Opacity="0.6"/>
        		<Image x:Name="Red_OFF_02" Height="50" Canvas.Left="499" Source="Textures/CAT_R500_13_ShiftLight_OFF.png" Stretch="Fill" Canvas.Top="24" Width="50" Opacity="0.6"/>
        	</Canvas>
        	<Canvas x:Name="ON" Height="94" Width="574">
        		<Image x:Name="Yellow_ON_01" Height="50" Canvas.Left="35" Source="game:/media/cars/CAT_R500_13/UI/Textures/CAT_R500_13_Yellow_ON.png" Stretch="Fill" Canvas.Top="24" Width="50" Visibility="Hidden"/>
        		<Image x:Name="Yellow__ON_02" Height="50" Canvas.Left="143" Source="game:/media/cars/CAT_R500_13/UI/Textures/CAT_R500_13_Yellow_ON.png" Stretch="Fill" Canvas.Top="24" Width="50" Visibility="Hidden"/>
        		<Image x:Name="Yellow_ON_03" Height="50" Canvas.Left="258" Source="game:/media/cars/CAT_R500_13/UI/Textures/CAT_R500_13_Yellow_ON.png" Stretch="Fill" Canvas.Top="24" Width="50" Visibility="Hidden"/>
        		<Image x:Name="Red__ON_01" Height="50" Canvas.Left="380" Source="game:/media/cars/CAT_R500_13/UI/Textures/CAT_R500_13_Red_ON.png" Stretch="Fill" Canvas.Top="24" Width="50" Visibility="Hidden"/>
        		<Image x:Name="Red_ON_02" Height="50" Canvas.Left="499" Source="game:/media/cars/CAT_R500_13/UI/Textures/CAT_R500_13_Red_ON.png" Stretch="Fill" Canvas.Top="24" Width="50" Visibility="Hidden"/>
        	</Canvas>
        	<Canvas x:Name="FLASHING" Height="94" Width="574" Visibility="Hidden">
        		<Image x:Name="Yellow_FLASH_01" Height="50" Canvas.Left="35" Source="game:/media/cars/CAT_R500_13/UI/Textures/CAT_R500_13_Yellow_ON.png" Stretch="Fill" Canvas.Top="24" Width="50"/>
        		<Image x:Name="Yellow__FLASH_02" Height="50" Canvas.Left="143" Source="game:/media/cars/CAT_R500_13/UI/Textures/CAT_R500_13_Yellow_ON.png" Stretch="Fill" Canvas.Top="24" Width="50"/>
        		<Image x:Name="Yellow_FLASH_03" Height="50" Canvas.Left="258" Source="game:/media/cars/CAT_R500_13/UI/Textures/CAT_R500_13_Yellow_ON.png" Stretch="Fill" Canvas.Top="24" Width="50"/>
        		<Image x:Name="Red__FLASH_01" Height="50" Canvas.Left="380" Source="game:/media/cars/CAT_R500_13/UI/Textures/CAT_R500_13_Red_ON.png" Stretch="Fill" Canvas.Top="24" Width="50"/>
        		<Image x:Name="Red_FLASH_02" Height="50" Canvas.Left="499" Source="game:/media/cars/CAT_R500_13/UI/Textures/CAT_R500_13_Red_ON.png" Stretch="Fill" Canvas.Top="24" Width="50"/>
        	</Canvas>
        </Canvas>
		<Canvas x:Name="Text" Height="720" Width="1280">
            <Image x:Name="Text_baked_Text" Height="80" Canvas.Left="368" Source="game:/media/cars/CAT_R500_13/UI/Textures/CAT_R500_13_text_gauge.png" Stretch="Fill" Canvas.Top="316" Width="290"/>
            <TextBlock x:Name="Text_Trip_Odo" Canvas.Left="753.5" Canvas.Top="300.073" Text="{Binding TripMeter}" Width="180" FontSize="37.333" Style="{StaticResource TextBlockStyle}" FontFamily="DG4_PF_Ronda_Seven" Foreground="Black" RenderTransformOrigin="0.5,0.5">
            	<TextBlock.RenderTransform>
            		<TransformGroup>
            			<ScaleTransform ScaleX="0.83"/>
            			<SkewTransform/>
            			<RotateTransform/>
            			<TranslateTransform/>
            		</TransformGroup>
            	</TextBlock.RenderTransform>
            </TextBlock>
            <TextBlock x:Name="Text_Odometer" Canvas.Left="663" Canvas.Top="341.573" Text="{Binding Odometer}" Width="280" FontSize="37.333" Style="{StaticResource TextBlockStyle}" FontFamily="DG4_PF_Ronda_Seven" Foreground="Black" RenderTransformOrigin="0.5,0.5">
            	<TextBlock.RenderTransform>
            		<TransformGroup>
            			<ScaleTransform ScaleX="0.83"/>
            			<SkewTransform/>
            			<RotateTransform/>
            			<TranslateTransform/>
            		</TransformGroup>
            	</TextBlock.RenderTransform>
            </TextBlock>
            <TextBlock x:Name="Text_Gear" Canvas.Left="612.5" Canvas.Top="275.073" Text="{Binding Gear}" Width="180" FontSize="85.333" Style="{StaticResource TextBlockStyle}" FontFamily="DG4_PF_Ronda_Seven" Foreground="Black" RenderTransformOrigin="0.5,0.5" TextAlignment="Center"/>
            <TextBlock x:Name="Text_Fuel" Canvas.Left="399.5" Canvas.Top="300.073" Text="{Binding FuelText}" Width="130" FontSize="37.333" Style="{StaticResource TextBlockStyle}" FontFamily="DG4_PF_Ronda_Seven" Foreground="Black" RenderTransformOrigin="0.5,0.5">
            	<TextBlock.RenderTransform>
            		<TransformGroup>
            			<ScaleTransform ScaleX="0.85"/>
            			<SkewTransform/>
            			<RotateTransform/>
            			<TranslateTransform/>
            		</TransformGroup>
            	</TextBlock.RenderTransform>
            </TextBlock>
            <TextBlock x:Name="Text_Null" Canvas.Left="393.5" Canvas.Top="341.573" Text="95" Width="130" FontSize="37.333" Style="{StaticResource TextBlockStyle}" FontFamily="DG4_PF_Ronda_Seven" Foreground="Black" RenderTransformOrigin="0.5,0.5">
            	<TextBlock.RenderTransform>
            		<TransformGroup>
            			<ScaleTransform ScaleX="0.9"/>
            			<SkewTransform/>
            			<RotateTransform/>
            			<TranslateTransform/>
            		</TransformGroup>
            	</TextBlock.RenderTransform>
            </TextBlock>
            <TextBlock x:Name="Text_Speed" Canvas.Left="502" Canvas.Top="341.573" Text="{Binding Speed}" Width="150" FontSize="37.333" Style="{StaticResource TextBlockStyle}" FontFamily="DG4_PF_Ronda_Seven" Foreground="Black" RenderTransformOrigin="0.5,0.5">
            	<TextBlock.RenderTransform>
            		<TransformGroup>
            			<ScaleTransform ScaleX="0.9"/>
            			<SkewTransform/>
            			<RotateTransform/>
            			<TranslateTransform/>
            		</TransformGroup>
            	</TextBlock.RenderTransform>
            </TextBlock>
		</Canvas>
        <Rectangle x:Name="Start_Up_Mask" Fill="Black" Height="668" Stroke="Black" Width="1186" Canvas.Left="58" Canvas.Top="53" Opacity="0"/>
		
		        <!-- Storyboard binding controllers -->
        <local:StoryboardController SeekPct="{Binding Tach}" Target="{StaticResource Shift Lights Progress}"/>
	</Canvas>
</Page>