<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="ForzaUI.FOR_4_ElectricSupervan">

    <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="True" UseDegreesF="False" UseMPH="True" UsePsi="False" MaxBoost="0" MinBoost="0" MaxSpeed="88.8" 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="20" MinGear="-1" MaxGear="2" MaxRpm="12000"/>
        <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="Gear Analog">
        	<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Gear_R">
        		<DiscreteObjectKeyFrame KeyTime="0" Value="{x:Static Visibility.Visible}"/>
        		<DiscreteObjectKeyFrame KeyTime="0:0:0.1" 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.1" Value="{x:Static Visibility.Visible}"/>
        		<DiscreteObjectKeyFrame KeyTime="0:0:0.2" Value="{x:Static Visibility.Hidden}"/>
                <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.2" Value="{x:Static Visibility.Visible}"/>
        	</ObjectAnimationUsingKeyFrames>
        </Storyboard>
        <Storyboard x:Key="Fuel Gauge">
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.Width)" Storyboard.TargetName="Fuel">
                <EasingDoubleKeyFrame KeyTime="0" Value="32"/>
                <EasingDoubleKeyFrame KeyTime="0:0:1" Value="226"/>
            </DoubleAnimationUsingKeyFrames>
            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Textures_FOR_4_ElectricSupervan_22_FuelYellow_png">
                <DiscreteObjectKeyFrame KeyTime="0" Value="{x:Static Visibility.Visible}"/>
                <DiscreteObjectKeyFrame KeyTime="0:0:0.25" Value="{x:Static Visibility.Visible}"/>
                <DiscreteObjectKeyFrame KeyTime="0:0:0.251" Value="{x:Static Visibility.Hidden}"/>
                <DiscreteObjectKeyFrame KeyTime="0:0:1" Value="{x:Static Visibility.Hidden}"/>
            </ObjectAnimationUsingKeyFrames>
        </Storyboard>
        <Storyboard x:Key="Tach">
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.Width)" Storyboard.TargetName="Tach">
                <EasingDoubleKeyFrame KeyTime="0" Value="102"/>
                <EasingDoubleKeyFrame KeyTime="0:0:1" Value="583"/>
            </DoubleAnimationUsingKeyFrames>
        </Storyboard>


    </Page.Resources>
    <Page.Triggers>
        <EventTrigger RoutedEvent="FrameworkElement.Loaded">
            <BeginStoryboard x:Name="Fuel_Gauge_BeginStoryboard" Storyboard="{StaticResource Fuel Gauge}"/>
            <BeginStoryboard Storyboard="{StaticResource Tach}"/>
        </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" Width="1280" Canvas.Left="0" Canvas.Top="0"/>

        <!-- Storyboard binding controllers -->
        <Rectangle x:Name="TachBG_Null" Fill="White" Height="68" Canvas.Left="105" Canvas.Top="207" Width="505"/>
        <Canvas x:Name="Tach" Height="68" Canvas.Left="11.146" Canvas.Top="207" Width="686" ClipToBounds="True">
            <Image x:Name="Textures_FOR_4_ElectricSupervan_22_TachNeedle_png" Height="68" Source="game:/media/cars/FOR_4_ElectricSupervan_22/UI/Textures/FOR_4_ElectricSupervan_22_TachNeedle.png" Stretch="Fill" Width="686" RenderTransformOrigin="0.5,0.5">
                <Image.RenderTransform>
                    <TransformGroup>
                        <ScaleTransform ScaleY="0.7" ScaleX="0.7"/>
                        <SkewTransform/>
                        <RotateTransform/>
                        <TranslateTransform/>
                    </TransformGroup>
                </Image.RenderTransform>
            </Image>
        </Canvas>
        <Image x:Name="Textures_FOR_4_ElectricSupervan_22_Driver_png" Height="720" Source="game:/media/cars/FOR_4_ElectricSupervan_22/UI/Textures/FOR_4_ElectricSupervan_22_Driver.png" Stretch="Fill" Width="1280" Canvas.Left="-170" RenderTransformOrigin="0.5,0.5">
            <Image.RenderTransform>
                <TransformGroup>
                    <ScaleTransform ScaleY="0.7" ScaleX="0.7"/>
                    <SkewTransform/>
                    <RotateTransform/>
                    <TranslateTransform/>
                </TransformGroup>
            </Image.RenderTransform>
        </Image>
        <Canvas x:Name="Fuel" Height="16" Canvas.Left="626.5" Canvas.Top="229.5" Width="258" ClipToBounds="True">
            <Image x:Name="Textures_FOR_4_ElectricSupervan_22_FuelGreen_png" Height="16" Source="game:/media/cars/FOR_4_ElectricSupervan_22/UI/Textures/FOR_4_ElectricSupervan_22_FuelGreen.png" Stretch="Fill" Width="258" RenderTransformOrigin="0.5,0.5">
                <Image.RenderTransform>
                    <TransformGroup>
                        <ScaleTransform ScaleY="0.7" ScaleX="0.75"/>
                        <SkewTransform/>
                        <RotateTransform/>
                        <TranslateTransform/>
                    </TransformGroup>
                </Image.RenderTransform>
            </Image>
            <Image x:Name="Textures_FOR_4_ElectricSupervan_22_FuelYellow_png" Height="16" Source="game:/media/cars/FOR_4_ElectricSupervan_22/UI/Textures/FOR_4_ElectricSupervan_22_FuelYellow.png" Stretch="Fill" Width="258" RenderTransformOrigin="0.5,0.5">
                <Image.RenderTransform>
                    <TransformGroup>
                        <ScaleTransform ScaleY="0.7" ScaleX="0.75"/>
                        <SkewTransform/>
                        <RotateTransform/>
                        <TranslateTransform/>
                    </TransformGroup>
                </Image.RenderTransform>
            </Image>
        </Canvas>
        <Image x:Name="Textures_FOR_4_ElectricSupervan_22_Center_png" Height="720" Source="game:/media/cars/FOR_4_ElectricSupervan_22/UI/Textures/FOR_4_ElectricSupervan_22_Center.png" Stretch="Fill" Width="450" Canvas.Left="877.5" RenderTransformOrigin="0.5,0.5">
            <Image.RenderTransform>
                <TransformGroup>
                    <ScaleTransform ScaleY="0.7" ScaleX="0.7"/>
                    <SkewTransform/>
                    <RotateTransform/>
                    <TranslateTransform/>
                </TransformGroup>
            </Image.RenderTransform>
        </Image>
        <local:FastTextBlock x:Name="Text_External_Temp" Text="{Binding ExternalTemp}" Height="97.142" Canvas.Left="429.786"   Canvas.Top="274.358" Width="185.714" FontFamily="DG1_Arial" Foreground="White" FontSize="72" RenderTransformOrigin="0.5,0.5" TextAlignment="Right">
            <local:FastTextBlock.RenderTransform>
                <TransformGroup>
                    <ScaleTransform ScaleX="0.65" ScaleY="0.65"/>
                    <SkewTransform AngleX="-10"/>
                    <RotateTransform/>
                    <TranslateTransform/>
                </TransformGroup>
            </local:FastTextBlock.RenderTransform>
        </local:FastTextBlock>
        <local:FastTextBlock x:Name="Text_Speed" Text="{Binding Speed}" Height="97.142" Canvas.Left="224"   Canvas.Top="332.858" Width="185.714" FontFamily="DG1_Arial" Foreground="White" FontSize="72" RenderTransformOrigin="0.5,0.5" TextAlignment="Center">
            <local:FastTextBlock.RenderTransform>
                <TransformGroup>
                    <ScaleTransform ScaleX="0.65" ScaleY="0.65"/>
                    <SkewTransform AngleX="-10"/>
                    <RotateTransform/>
                    <TranslateTransform/>
                </TransformGroup>
            </local:FastTextBlock.RenderTransform>
        </local:FastTextBlock>
        <Canvas x:Name="GearAnalog" Height="72" Canvas.Left="49.25" Canvas.Top="202" Width="72" RenderTransformOrigin="0.5,0.5">
        	<Canvas.RenderTransform>
        		<TransformGroup>
        			<ScaleTransform ScaleX="0.75" ScaleY="0.75"/>
        			<SkewTransform/>
        			<RotateTransform/>
        			<TranslateTransform/>
        		</TransformGroup>
        	</Canvas.RenderTransform>
        	<Image x:Name="Gear_D" Height="72" Source="game:/media/cars/FOR_4_ElectricSupervan_22/UI/Textures/FOR_4_ElectricSupervan_22_Gear_D.png" Stretch="Fill" Width="72"/>
        	<Image x:Name="Gear_N" Height="72" Source="game:/media/cars/FOR_4_ElectricSupervan_22/UI/Textures/FOR_4_ElectricSupervan_22_Gear_N.png" Stretch="Fill" Width="72"/>
        	<Image x:Name="Gear_R" Height="72" Source="game:/media/cars/FOR_4_ElectricSupervan_22/UI/Textures/FOR_4_ElectricSupervan_22_Gear_R.png" Stretch="Fill" Width="72"/>
        </Canvas>
        <Rectangle x:Name="Start_Up_Mask" Height="720" Width="1280" Opacity="0" Fill="Black">
            <Rectangle.Stroke>
                <ImageBrush/>
            </Rectangle.Stroke>
        </Rectangle>
        <local:StoryboardController SeekPct="{Binding Tach}" Target="{StaticResource Tach}"/>
	    <local:StoryboardController SeekPct="{Binding AnalogGear}" Target="{StaticResource Gear Analog}"/>
        <local:StoryboardController SeekPct="{Binding Fuel}" Target="{StaticResource Fuel Gauge}"/>
    </Canvas>
</Page>