<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"
    xmlns:ed="http://schemas.microsoft.com/expression/2010/drawing"
    mc:Ignorable="d"
	x:Class="DigitalGauge.POR_00_CaymanWTA_05"
	 >

    <Page.Resources>
        <Style x:Key="TextBlockStyle" TargetType="{x:Type local:FastTextBlock}">
            <Setter Property="FontFamily" Value="DG2_LCD"/>
            <Setter Property="Foreground" Value="#FFF52233"/>
             
            <Setter Property="TextAlignment" Value="Right"/>
        </Style>

        <BooleanToVisibilityConverter x:Key="BoolVisConverter" />

        <local:DigitalGaugeConfig x:Key="Config" HasClock="False" HasExternalTemp="False" UseDegreesF="False" UseMPH="False" UsePsi="False" MaxBoost="0" MinBoost="0" MaxSpeed="220" HasAbsLight="False" HasStmLight="False" HasTcsLight="False" HasGAccelX="False" HasGAccelY="False" HasShiftLights="True" HasTextTach="False" HasLapPlaceInfo="True" HasTextBoost="False" HasTextGAccel="False" HasTextOdometer="False" HasTextFuel="True" MaxFuel="75.7" MaxGear="6" MaxRpm="9000"/>

        <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="Tach">
        	<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)" Storyboard.TargetName="POR_00_CaymanWTA_05_Needle">
        		<EasingDoubleKeyFrame KeyTime="0" Value="-105.3"/>
        		<EasingDoubleKeyFrame KeyTime="0:0:0.163" Value="-87.788505939794163"/>
        		<EasingDoubleKeyFrame KeyTime="0:0:0.343" Value="-70.378822891566273"/>
        		<EasingDoubleKeyFrame KeyTime="0:0:0.498" Value="-45.742650000000005"/>
        		<EasingDoubleKeyFrame KeyTime="0:0:0.555" Value="-36.424577988047815"/>
        		<EasingDoubleKeyFrame KeyTime="0:0:0.669" Value="-0.1560344135816365"/>
        		<EasingDoubleKeyFrame KeyTime="0:0:0.781" Value="36.430654279958816"/>
        		<EasingDoubleKeyFrame KeyTime="0:0:1" Value="105.15"/>
        	</DoubleAnimationUsingKeyFrames>
        </Storyboard>
        <Storyboard x:Key="Shift Light Progress">
        	<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Shift_Light_Green_On">
        		<DiscreteObjectKeyFrame KeyTime="0" Value="{x:Static Visibility.Hidden}"/>
        		<DiscreteObjectKeyFrame KeyTime="0:0:0.888" Value="{x:Static Visibility.Visible}"/>
        		<DiscreteObjectKeyFrame KeyTime="0:0:0.927" Value="{x:Static Visibility.Hidden}"/>
        		<DiscreteObjectKeyFrame KeyTime="0:0:0.972" Value="{x:Static Visibility.Hidden}"/>
        		<DiscreteObjectKeyFrame KeyTime="0:0:1" Value="{x:Static Visibility.Hidden}"/>
        	</ObjectAnimationUsingKeyFrames>
        	<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Shift_Light_Blue_On">
        		<DiscreteObjectKeyFrame KeyTime="0" Value="{x:Static Visibility.Hidden}"/>
        		<DiscreteObjectKeyFrame KeyTime="0:0:0.927" Value="{x:Static Visibility.Visible}"/>
        		<DiscreteObjectKeyFrame KeyTime="0:0:0.972" Value="{x:Static Visibility.Hidden}"/>
        		<DiscreteObjectKeyFrame KeyTime="0:0:1" Value="{x:Static Visibility.Hidden}"/>
        	</ObjectAnimationUsingKeyFrames>
        	<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Shift_Light_Green_On_Copy">
        		<DiscreteObjectKeyFrame KeyTime="0" Value="{x:Static Visibility.Hidden}"/>
        		<DiscreteObjectKeyFrame KeyTime="0:0:0.904" Value="{x:Static Visibility.Visible}"/>
        		<DiscreteObjectKeyFrame KeyTime="0:0:0.927" Value="{x:Static Visibility.Hidden}"/>
        		<DiscreteObjectKeyFrame KeyTime="0:0:0.972" Value="{x:Static Visibility.Hidden}"/>
        		<DiscreteObjectKeyFrame KeyTime="0:0:1" Value="{x:Static Visibility.Hidden}"/>
        	</ObjectAnimationUsingKeyFrames>
        	<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Shift_Light_Blue_On_Copy">
        		<DiscreteObjectKeyFrame KeyTime="0" Value="{x:Static Visibility.Hidden}"/>
        		<DiscreteObjectKeyFrame KeyTime="0:0:0.945" Value="{x:Static Visibility.Visible}"/>
        		<DiscreteObjectKeyFrame KeyTime="0:0:0.972" Value="{x:Static Visibility.Hidden}"/>
        		<DiscreteObjectKeyFrame KeyTime="0:0:1" Value="{x:Static Visibility.Hidden}"/>
        	</ObjectAnimationUsingKeyFrames>
        	<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Shift_Light_Green_On_B">
        		<DiscreteObjectKeyFrame KeyTime="0" Value="{x:Static Visibility.Hidden}"/>
        		<DiscreteObjectKeyFrame KeyTime="0:0:0.927" Value="{x:Static Visibility.Visible}"/>
        		<DiscreteObjectKeyFrame KeyTime="0:0:0.972" Value="{x:Static Visibility.Hidden}"/>
        		<DiscreteObjectKeyFrame KeyTime="0:0:1" Value="{x:Static Visibility.Hidden}"/>
        	</ObjectAnimationUsingKeyFrames>
        	<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Shift_Light_Green_On_CopyB">
        		<DiscreteObjectKeyFrame KeyTime="0" Value="{x:Static Visibility.Hidden}"/>
        		<DiscreteObjectKeyFrame KeyTime="0:0:0.927" Value="{x:Static Visibility.Visible}"/>
        		<DiscreteObjectKeyFrame KeyTime="0:0:0.972" Value="{x:Static Visibility.Hidden}"/>
        		<DiscreteObjectKeyFrame KeyTime="0:0:1" 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.972" Value="{x:Static Visibility.Visible}"/>
        		<DiscreteObjectKeyFrame KeyTime="0:0:1" Value="{x:Static Visibility.Visible}"/>
        	</ObjectAnimationUsingKeyFrames>
        </Storyboard>
        <Storyboard x:Key="Shift Lights Flashing">
        	<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Shift_Light_Red_On_Copy">
        		<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="Shift_Light_Green_On_R_Copy">
        		<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="Shift_Light_Green_On_CopyR_Copy">
        		<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="Shift_Light_Blue_On_R_Copy">
        		<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="Shift_Light_Blue_On_CopyR_Copy">
        		<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 Tach}"/>
            <BeginStoryboard Storyboard="{StaticResource Shift Light Progress}"/>
            <BeginStoryboard Storyboard="{StaticResource Shift Lights Flashing}"/>
        </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="Black" Height="720" Canvas.Left="0" Canvas.Top="0" Width="1280"/>
        <Image x:Name="POR_00_CaymanWTA_05_BG" Height="685" Canvas.Left="140" Source="game:/media/cars/POR_00_CaymanWTA_05/UI/Textures/POR_00_CaymanWTA_05_BG.png" Stretch="Fill" Canvas.Top="14" Width="1117"/>
        <Canvas x:Name="Tach" Height="128" Canvas.Left="683.333" Canvas.Top="94.375" Width="28">
        	<Image x:Name="POR_00_CaymanWTA_05_Needle" Height="128" Source="game:/media/cars/POR_00_CaymanWTA_05/UI/Textures/POR_00_CaymanWTA_05_Needle.png" Stretch="Fill" Width="28" RenderTransformOrigin="0.49,1.981">
        		<Image.RenderTransform>
        			<TransformGroup>
        				<ScaleTransform/>
        				<SkewTransform/>
        				<RotateTransform Angle="-105.3"/>
        				<TranslateTransform/>
        			</TransformGroup>
        		</Image.RenderTransform>
        	</Image>
        </Canvas>
        <local:FastTextBlock x:Name="Text_Gear" Text="{Binding Gear}" Height="202.619"   Width="182.556" FontFamily="DG1_Arial Bold" FontSize="208" Foreground="#FFC2C6C8" RenderTransformOrigin="0.5,0.5" Canvas.Top="198.405" Canvas.Left="607" TextAlignment="Center"><local:FastTextBlock.RenderTransform><TransformGroup><ScaleTransform ScaleX="1.5" ScaleY="1.05"/><SkewTransform/><RotateTransform/><TranslateTransform/></TransformGroup></local:FastTextBlock.RenderTransform></local:FastTextBlock>
        <local:FastTextBlock x:Name="Text_Fuel" Text="{Binding FuelText}" Height="106.429"   Width="215.42" FontFamily="DG1_Arial Bold" FontSize="86.667" Foreground="#FFC2C6C8" RenderTransformOrigin="0.5,0.5" TextAlignment="Right" Canvas.Left="989.655" Canvas.Top="82.999"><local:FastTextBlock.RenderTransform><TransformGroup><ScaleTransform ScaleX="1.05" ScaleY="1.05"/><SkewTransform AngleX="-6"/><RotateTransform/><TranslateTransform/></TransformGroup></local:FastTextBlock.RenderTransform></local:FastTextBlock>
        <local:FastTextBlock x:Name="Text_Current_Lap" Text="{Binding CurLapTime}" Height="106.429"   Width="389.703" FontFamily="DG1_Arial Bold" FontSize="82.667" Foreground="#FF036699" RenderTransformOrigin="0.5,0.5" Canvas.Top="486.003" Canvas.Left="147.062" TextAlignment="Right"><local:FastTextBlock.RenderTransform><TransformGroup><ScaleTransform ScaleX="0.93" ScaleY="1.05"/><SkewTransform AngleX="-6"/><RotateTransform/><TranslateTransform/></TransformGroup></local:FastTextBlock.RenderTransform></local:FastTextBlock>
        <local:FastTextBlock x:Name="Text_Last_Lap" Text="{Binding LastLapTime}" Height="106.429"   Width="448.938" FontFamily="DG1_Arial Bold" FontSize="82.667" Foreground="#FF036699" RenderTransformOrigin="0.5,0.5" Canvas.Top="486.003" Canvas.Left="782.853" TextAlignment="Right"><local:FastTextBlock.RenderTransform><TransformGroup><ScaleTransform ScaleX="0.95" ScaleY="1.05"/><SkewTransform AngleX="-6"/><RotateTransform/><TranslateTransform/></TransformGroup></local:FastTextBlock.RenderTransform></local:FastTextBlock>
        <Canvas x:Name="Shift_Lights" Height="290.743" Canvas.Left="-5.286" Canvas.Top="199.75" Width="64">
        	<Canvas x:Name="OFF" Height="290.743" Width="64">
        		<Image x:Name="Shift_Light_Green_Off" Height="64" Source="game:/media/cars/POR_00_CaymanWTA_05/UI/Textures/CAP_T1_13_ShiftLight_Off.PNG" Stretch="Fill" Canvas.Top="226.743" Width="64"/>
        		<Image x:Name="Shift_Light_Green_Off_Copy" Height="64" Source="game:/media/cars/POR_00_CaymanWTA_05/UI/Textures/CAP_T1_13_ShiftLight_Off.PNG" Stretch="Fill" Canvas.Top="169.576" Width="64"/>
        		<Image x:Name="Shift_Light_Blue_Off" Height="64" Source="game:/media/cars/POR_00_CaymanWTA_05/UI/Textures/CAP_T1_13_ShiftLight_Off.PNG" Stretch="Fill" Canvas.Top="113.355" Width="64"/>
        		<Image x:Name="Shift_Light_Blue_Off_Copy" Height="64" Source="game:/media/cars/POR_00_CaymanWTA_05/UI/Textures/CAP_T1_13_ShiftLight_Off.PNG" Stretch="Fill" Canvas.Top="56.105" Width="64"/>
        		<Image x:Name="Shift_Light_Red_Off" Height="64" Source="game:/media/cars/POR_00_CaymanWTA_05/UI/Textures/CAP_T1_13_ShiftLight_Off.PNG" Stretch="Fill" Width="64"/>
        		<Image x:Name="Shift_Light_Sides" Height="64" Source="game:/media/cars/POR_00_CaymanWTA_05/UI/Textures/CAP_T1_13_ShiftLight_Off.PNG" Stretch="Fill" Canvas.Top="399.41" Width="64"/>
        	</Canvas>
        	<Canvas x:Name="ON" Height="290.743" Width="64">
        		<Image x:Name="Shift_Light_Green_On" Height="64" Source="game:/media/cars/POR_00_CaymanWTA_05/UI/Textures/CAP_T1_13_GreenLight_On.PNG" Stretch="Fill" Canvas.Top="226.743" Width="64" Visibility="Hidden"/>
        		<Image x:Name="Shift_Light_Green_On_Copy" Height="64" Source="game:/media/cars/POR_00_CaymanWTA_05/UI/Textures/CAP_T1_13_GreenLight_On.PNG" Stretch="Fill" Canvas.Top="169.576" Width="64" Visibility="Hidden"/>
        		<Image x:Name="Shift_Light_Green_On_B" Height="64" Source="game:/media/cars/POR_00_CaymanWTA_05/UI/Textures/CAP_T1_13_BlueLight_On.PNG" Stretch="Fill" Canvas.Top="226.743" Width="64" Visibility="Hidden"/>
        		<Image x:Name="Shift_Light_Green_On_CopyB" Height="64" Source="game:/media/cars/POR_00_CaymanWTA_05/UI/Textures/CAP_T1_13_BlueLight_On.PNG" Stretch="Fill" Canvas.Top="169.576" Width="64" Visibility="Hidden"/>
        		<Image x:Name="Shift_Light_Blue_On" Height="64" Source="game:/media/cars/POR_00_CaymanWTA_05/UI/Textures/CAP_T1_13_BlueLight_On.PNG" Stretch="Fill" Canvas.Top="113.355" Width="64" Visibility="Hidden"/>
        		<Image x:Name="Shift_Light_Blue_On_Copy" Height="64" Source="game:/media/cars/POR_00_CaymanWTA_05/UI/Textures/CAP_T1_13_BlueLight_On.PNG" Stretch="Fill" Canvas.Top="56.105" Width="64" Visibility="Hidden"/>
        	</Canvas>
        	<Canvas x:Name="FLASHING" Height="64" Width="64">
        		<Image x:Name="Shift_Light_Red_On_Copy" Height="64" Source="game:/media/cars/POR_00_CaymanWTA_05/UI/Textures/CAP_T1_13_RedLight_On.PNG" Stretch="Fill" Width="64"/>
        		<Image x:Name="Shift_Light_Green_On_R_Copy" Height="64" Source="game:/media/cars/POR_00_CaymanWTA_05/UI/Textures/CAP_T1_13_RedLight_On.PNG" Stretch="Fill" Canvas.Top="226.743" Width="64"/>
        		<Image x:Name="Shift_Light_Green_On_CopyR_Copy" Height="64" Source="game:/media/cars/POR_00_CaymanWTA_05/UI/Textures/CAP_T1_13_RedLight_On.PNG" Stretch="Fill" Canvas.Top="169.576" Width="64"/>
        		<Image x:Name="Shift_Light_Blue_On_R_Copy" Height="64" Source="game:/media/cars/POR_00_CaymanWTA_05/UI/Textures/CAP_T1_13_RedLight_On.PNG" Stretch="Fill" Canvas.Top="113.355" Width="64"/>
        		<Image x:Name="Shift_Light_Blue_On_CopyR_Copy" Height="64" Source="game:/media/cars/POR_00_CaymanWTA_05/UI/Textures/CAP_T1_13_RedLight_On.PNG" Stretch="Fill" Canvas.Top="56.105" Width="64"/>
        	</Canvas>
        </Canvas>

        <!-- Storyboard binding controllers -->
        <Rectangle x:Name="Start_Up_Mask" Fill="#FFC2C6C8" Height="720" Stroke="Black" Width="1280" Canvas.Left="0.062" Opacity="0"/>
        <local:StoryboardController SeekPct="{Binding Tach}" Target="{StaticResource Shift Light Progress}"/>
        <local:StoryboardController SeekPct="{Binding Tach}" Target="{StaticResource Shift Lights Flashing}"/>
        <local:StoryboardController SeekPct="{Binding Tach}" Target="{StaticResource Tach}"/> 
 </Canvas>
</Page>