<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.TOY_CrownTaxi_05"
	 >

    <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="True" HasExternalTemp="True" UseDegreesF="True" UseMPH="True" UsePsi="False" MaxBoost="40" MinBoost="1" MaxSpeed="62.5856" HasAbsLight="False" HasStmLight="False" HasTcsLight="False" HasGAccelX="False" HasGAccelY="False"  HasShiftLights="False" HasTextTach="True" HasLapPlaceInfo="True" HasTextBoost="False" HasTextGAccel="False" HasTextOdometer="True" HasTextFuel="True" MaxFuel="20" MinGear="-1" MaxGear="1" MaxRpm="8000"/>
        <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="Fuel"/>
        <Storyboard x:Key="Gear Analog">
        	<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Gear_R">
        		<DiscreteObjectKeyFrame KeyTime="0" Value="{x:Static Visibility.Visible}"/>
        		<DiscreteObjectKeyFrame KeyTime="0:0:0.5" Value="{x:Static Visibility.Hidden}"/>
        		<DiscreteObjectKeyFrame KeyTime="0:0:1" Value="{x:Static Visibility.Hidden}"/>
        	</ObjectAnimationUsingKeyFrames>
        	<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Gear_N">
        		<DiscreteObjectKeyFrame KeyTime="0" Value="{x:Static Visibility.Hidden}"/>
        		<DiscreteObjectKeyFrame KeyTime="0:0:0.5" Value="{x:Static Visibility.Visible}"/>
        		<DiscreteObjectKeyFrame KeyTime="0:0:1" Value="{x:Static Visibility.Hidden}"/>
        	</ObjectAnimationUsingKeyFrames>
        	<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Gear_D">
        		<DiscreteObjectKeyFrame KeyTime="0" Value="{x:Static Visibility.Hidden}"/>
        		<DiscreteObjectKeyFrame KeyTime="0:0:0.5" Value="{x:Static Visibility.Hidden}"/>
        		<DiscreteObjectKeyFrame KeyTime="0:0:1" Value="{x:Static Visibility.Visible}"/>
        	</ObjectAnimationUsingKeyFrames>
        </Storyboard>
    </Page.Resources>
	<Page.Triggers>
		<EventTrigger RoutedEvent="FrameworkElement.Loaded">
			<BeginStoryboard Storyboard="{StaticResource Fuel}"/>
			<BeginStoryboard Storyboard="{StaticResource Gear Analog}"/>
		</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_Black" Fill="Black" Height="720.5" Stroke="Black" Width="1281.049"/>
        <Image x:Name="TOY_CrownTaxi_05_Clock" Height="174" Source="game:/media/cars/TOY_CrownTaxi_05/UI/Textures/TOY_CrownTaxi_05 Clock.png" Stretch="Fill" Width="485" Canvas.Left="704" Canvas.Top="96"/>
        <local:FastTextBlock x:Name="Text_Clock" Text="{Binding Time}" FontSize="80" Style="{StaticResource TextBlockStyle}" Foreground="#FF34B630" FontFamily="DG2_LCD" Width="207.258" RenderTransformOrigin="0.5,0.5" TextAlignment="Center" Height="104.836" Canvas.Left="837.817" Canvas.Top="135.158"><local:FastTextBlock.RenderTransform><TransformGroup><ScaleTransform ScaleY="1.05" ScaleX="1.05"/><SkewTransform/><RotateTransform/><TranslateTransform/></TransformGroup>
        	</local:FastTextBlock.RenderTransform></local:FastTextBlock>
        <Image x:Name="TOY_CrownTaxi_05_ODO" Height="205.894" Source="game:/media/cars/TOY_CrownTaxi_05/UI/Textures/TOY_CrownTaxi_05 ODO.png" Stretch="Fill" Width="867" Canvas.Left="306" Canvas.Top="348.553"/>
        <Canvas x:Name="Gear" Height="41" Width="248" Canvas.Left="236" Canvas.Top="151" RenderTransformOrigin="0.5,0.5">
        	<Canvas.RenderTransform>
        		<TransformGroup>
        			<ScaleTransform ScaleX="1.35" ScaleY="1.35"/>
        			<SkewTransform/>
        			<RotateTransform/>
        			<TranslateTransform/>
        		</TransformGroup>
        	</Canvas.RenderTransform>
        	<Image x:Name="Gear_Image" Height="41" Source="game:/media/cars/TOY_CrownTaxi_05/UI/Textures/TOY_CrownTaxi_05 Gears.png" Stretch="Fill" Width="248"/>
        	<Image x:Name="Gear_R" Height="27" Source="game:/media/cars/TOY_CrownTaxi_05/UI/Textures/TOY_CrownTaxi_05 Gear R.png" Stretch="Fill" Width="28" Canvas.Left="167.778" Canvas.Top="7.778" Opacity="0.995"/>
        	<Image x:Name="Gear_N" Height="27" Source="game:/media/cars/TOY_CrownTaxi_05/UI/Textures/TOY_CrownTaxi_05 Gear N.png" Stretch="Fill" Width="28" Canvas.Left="128.018" Canvas.Top="8.148"/>
        	<Image x:Name="Gear_D" Height="27" Source="game:/media/cars/TOY_CrownTaxi_05/UI/Textures/TOY_CrownTaxi_05 Gear D.png" Stretch="Fill" Width="28" Canvas.Left="87.037" Canvas.Top="8.148"/>

        </Canvas>
        <local:FastTextBlock x:Name="Text_Odometer" Text="{Binding Odometer}" FontSize="104" Style="{StaticResource TextBlockStyle}" Foreground="Black" FontFamily="DG2_LCD" Width="393.777" RenderTransformOrigin="0.5,0.5" TextAlignment="Right" Height="111.774" Canvas.Left="654.833" Canvas.Top="398.166"><local:FastTextBlock.RenderTransform><TransformGroup><ScaleTransform ScaleY="1.5" ScaleX="1.5"/><SkewTransform/><RotateTransform/><TranslateTransform/></TransformGroup>
        	</local:FastTextBlock.RenderTransform></local:FastTextBlock>
        <Rectangle x:Name="Start_Up_Mask" Fill="Black" Height="720" Stroke="Black" Width="1280" Canvas.Left="-8" Canvas.Top="4" Opacity="0" RenderTransformOrigin="0.5,0.5"/>

        <!-- Storyboard binding controllers -->
		<local:StoryboardController SeekPct="{Binding AnalogGear}" Target="{StaticResource Gear Analog}"/>
    </Canvas>
</Page>