<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.MER_CLKGTR_98">
	
    <Page.Resources>
        <Style x:Key="TextBlockStyle" TargetType="{x:Type local:FastTextBlock}">
            <Setter Property="FontFamily" Value="Moire"/>
            <Setter Property="Foreground" Value="White"/>
             
            <Setter Property="TextAlignment" Value="Right"/>
        </Style>
		
		<local:DigitalGaugeConfig x:Key="Config" HasClock="False" HasExternalTemp="False" UseDegreesF="True" UseMPH="False" UsePsi="True" MaxBoost="00" MinBoost="0" MaxSpeed="120" HasAbsLight="False" HasStmLight="False" HasTcsLight="False" HasGAccelX="False" HasGAccelY="False" HasShiftLights="True" HasTextTach="True" HasLapPlaceInfo="True" HasTextBoost="False" HasTextGAccel="False" HasTextOdometer="True" HasTextFuel="False" MaxFuel="20" MaxGear="8" MaxRpm="8000"></local:DigitalGaugeConfig>
	
        <BooleanToVisibilityConverter x:Key="BoolVisConverter" />
		<Storyboard x:Key="Shift Lights Progress">
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="Green_Light_On">
				<EasingDoubleKeyFrame KeyTime="0" Value="1"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.76" Value="1"/>
			</DoubleAnimationUsingKeyFrames>
			<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Green_Light_On">
				<DiscreteObjectKeyFrame KeyTime="0" Value="{x:Static Visibility.Hidden}"/>
				<DiscreteObjectKeyFrame KeyTime="0:0:0.751" Value="{x:Static Visibility.Visible}"/>
				<DiscreteObjectKeyFrame KeyTime="0:0:0.76" 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.76" Value="{x:Static Visibility.Visible}"/>
			</ObjectAnimationUsingKeyFrames>
		</Storyboard>
		<Storyboard x:Key="Shift Lights Flash" RepeatBehavior="Forever">
			<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Green_Light_Flashing">
				<DiscreteObjectKeyFrame KeyTime="0" Value="{x:Static Visibility.Visible}"/>
				<DiscreteObjectKeyFrame KeyTime="0:0:0.5" Value="{x:Static Visibility.Visible}"/>
			</ObjectAnimationUsingKeyFrames>
		</Storyboard>
		<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>
	</Page.Resources>
	<local:EventFire.FzTriggers>
        <local:EventFireTrigger Event="StartUp" Storyboard="{StaticResource Start Up Animation}"/>
    </local:EventFire.FzTriggers>
	<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="Background_Grey" Fill="#FF474747" Height="720" Width="1280" Canvas.Left="0" Canvas.Top="0"/>
        <Rectangle x:Name="Background_Shift_Lights" Fill="Black" Height="107" Canvas.Left="540.793" Canvas.Top="364" Width="213.207"/>
        <Rectangle x:Name="Background_Trip_Odo" Fill="Black" Height="120" Canvas.Left="520" Canvas.Top="84" Width="240"/>
        <Rectangle x:Name="Background_Odometer" Fill="Black" Height="120" Canvas.Left="446" Canvas.Top="213" Width="388"/>
        <Rectangle x:Name="Background_Gear" Fill="Black" Height="150" Canvas.Left="581" Canvas.Top="516" Width="118"/>
		<Canvas x:Name="Text" Height="720" Width="1280">
            <local:FastTextBlock x:Name="Text_Trip_Odo" Canvas.Left="437.793" Canvas.Top="95.5" Text="{Binding TripMeter}" Width="300" FontSize="64" Style="{StaticResource TextBlockStyle}" Foreground="White" FontFamily="DG5_QuartzMS" 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_Gear" Canvas.Left="550.793" Canvas.Top="503.263" Text="{Binding Gear}" Width="180" FontSize="106.667" Style="{StaticResource TextBlockStyle}" Foreground="White" FontFamily="DG5_QuartzMS" TextAlignment="Center" RenderTransformOrigin="0.5,0.5">
            	<local:FastTextBlock.RenderTransform>
            		<TransformGroup>
            			<ScaleTransform ScaleX="1.1" ScaleY="1.25"/>
            			<SkewTransform/>
            			<RotateTransform/>
            			<TranslateTransform/>
            		</TransformGroup>
            	</local:FastTextBlock.RenderTransform>
            </local:FastTextBlock>
			<local:FastTextBlock x:Name="Text_Odometer" Canvas.Left="443.485" Canvas.Top="225.5" Text="{Binding Odometer}" FontSize="64" Style="{StaticResource TextBlockStyle}" Width="350" FontFamily="DG5_QuartzMS" Foreground="White" 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_Background" Canvas.Left="550.793" Canvas.Top="503.263" Text="8" Width="180" FontSize="106.667" Style="{StaticResource TextBlockStyle}" Foreground="White" FontFamily="DG5_QuartzMS" TextAlignment="Center" RenderTransformOrigin="0.5,0.5" Opacity="0.2">
            	<local:FastTextBlock.RenderTransform>
            		<TransformGroup>
            			<ScaleTransform ScaleX="1.1" ScaleY="1.25"/>
            			<SkewTransform/>
            			<RotateTransform/>
            			<TranslateTransform/>
            		</TransformGroup>
            	</local:FastTextBlock.RenderTransform>
            </local:FastTextBlock>
		</Canvas>
        <Canvas x:Name="Shift_Lights" Height="92" Width="600" Canvas.Left="194" Canvas.Top="369">
        	<Canvas x:Name="OFF">
	        	<Image x:Name="Green_Light_Off" Height="128" Source="game:/media/cars/MER_CLKGTR_98/UI/Textures/MER_CLKGTR_98_GreenLight_Off.PNG" Stretch="Fill" Width="128" Canvas.Top="-15" Canvas.Left="389" Opacity="0.2" RenderTransformOrigin="0.5,0.5">
	        		<Image.RenderTransform>
	        			<TransformGroup>
	        				<ScaleTransform ScaleX="1.5" ScaleY="1.5"/>
	        				<SkewTransform/>
	        				<RotateTransform/>
	        				<TranslateTransform/>
	        			</TransformGroup>
	        		</Image.RenderTransform>
	        	</Image>
        	</Canvas>
        	<Canvas x:Name="ON">
	        	<Image x:Name="Green_Light_On" Height="128" Source="game:/media/cars/MER_CLKGTR_98/UI/Textures/MER_CLKGTR_98_GreenLight_On.PNG" Stretch="Fill" Width="128" Canvas.Top="-15" Canvas.Left="389" Visibility="Hidden" RenderTransformOrigin="0.5,0.5">
	        		<Image.RenderTransform>
	        			<TransformGroup>
	        				<ScaleTransform ScaleX="1.5" ScaleY="1.5"/>
	        				<SkewTransform/>
	        				<RotateTransform/>
	        				<TranslateTransform/>
	        			</TransformGroup>
	        		</Image.RenderTransform>
	        	</Image>
        	</Canvas>
        	<Canvas x:Name="FLASHING" Visibility="Hidden">
	        	<Image x:Name="Green_Light_Flashing" Height="128" Source="game:/media/cars/MER_CLKGTR_98/UI/Textures/MER_CLKGTR_98_GreenLight_On.PNG" Stretch="Fill" Width="128" Canvas.Top="-15" Canvas.Left="389" RenderTransformOrigin="0.5,0.5">
	        		<Image.RenderTransform>
	        			<TransformGroup>
	        				<ScaleTransform ScaleX="1.5" ScaleY="1.5"/>
	        				<SkewTransform/>
	        				<RotateTransform/>
	        				<TranslateTransform/>
	        			</TransformGroup>
	        		</Image.RenderTransform>
	        	</Image>
        	</Canvas>
        </Canvas>
        <Rectangle x:Name="Start_Up_Mask" Fill="Black" Height="720" Stroke="Black" Width="1280" Canvas.Left="0" Canvas.Top="0" Opacity="0"/>
		
				<!-- Storyboard binding controllers -->
		<local:StoryboardController SeekPct="{Binding Tach}" Target="{StaticResource Shift Lights Progress}"/>
		
	</Canvas>
</Page>