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

    <Page.Resources>
        <Style x:Key="TextBlockStyle" TargetType="{x:Type local:FastTextBlock}">
            <Setter Property="FontFamily" Value="DG1_Arial"/>
            <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="True" MaxBoost="25" MinBoost="-11" MaxSpeed="120" HasAbsLight="False" HasStmLight="False" HasTcsLight="False" HasGAccelX="False" HasGAccelY="False" HasShiftLights="False" HasTextTach="False" HasLapPlaceInfo="False" HasTextBoost="True" HasTextGAccel="False" HasTextOdometer="True" HasTextFuel="False" MaxFuel="20" MinGear="-1" MaxGear="1" MaxRpm="7000"/>
        <Storyboard x:Key="Start Up Animation">
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="Start_Up">
                <EasingDoubleKeyFrame KeyTime="0" Value="1"/>
                <EasingDoubleKeyFrame KeyTime="0:0:1" Value="0"/>
            </DoubleAnimationUsingKeyFrames>
        </Storyboard>
        <Storyboard x:Key="Boost Analog">
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(ed:Arc.EndAngle)" Storyboard.TargetName="TachBarLeft">
                <EasingDoubleKeyFrame KeyTime="0" Value="215"/>
                <EasingDoubleKeyFrame KeyTime="0:0:1" Value="324"/>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(ed:Arc.StartAngle)" Storyboard.TargetName="TachBarLeft">
                <EasingDoubleKeyFrame KeyTime="0" Value="215"/>
                <EasingDoubleKeyFrame KeyTime="0:0:1" Value="215"/>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(ed:Arc.StartAngle)" Storyboard.TargetName="TachBarRight">
                <EasingDoubleKeyFrame KeyTime="0" Value="145"/>
                <EasingDoubleKeyFrame KeyTime="0:0:0.8" Value="36"/>
                <EasingDoubleKeyFrame KeyTime="0:0:1" Value="36"/>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)" Storyboard.TargetName="Textures_MIN_JWCGP_21_CenterNeedleLeft_png">
                <EasingDoubleKeyFrame KeyTime="0" Value="37"/>
                <EasingDoubleKeyFrame KeyTime="0:0:0.1" Value="47"/>
                <EasingDoubleKeyFrame KeyTime="0:0:0.967" Value="143"/>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)" Storyboard.TargetName="Textures_MIN_JWCGP_21_CenterNeedleRight_png">
                <EasingDoubleKeyFrame KeyTime="0" Value="-37"/>
                <EasingDoubleKeyFrame KeyTime="0:0:0.1" Value="-47"/>
                <EasingDoubleKeyFrame KeyTime="0:0:0.767" Value="-143"/>
                <EasingDoubleKeyFrame KeyTime="0:0:1" Value="-143"/>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)" Storyboard.TargetName="TachBarLeft">
                <EasingDoubleKeyFrame KeyTime="0" Value="0"/>
                <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="Textures_MIN_JWCGP_21_MainNeedle_png">
                <EasingDoubleKeyFrame KeyTime="0" Value="0"/>
                <EasingDoubleKeyFrame KeyTime="0:0:1" Value="180"/>
            </DoubleAnimationUsingKeyFrames>
        </Storyboard>
        <Storyboard x:Key="Fuel">
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(ed:Arc.EndAngle)" Storyboard.TargetName="arc">
                <EasingDoubleKeyFrame KeyTime="0" Value="173"/>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(ed:Arc.StartAngle)" Storyboard.TargetName="arc">
                <EasingDoubleKeyFrame KeyTime="0" Value="173"/>
                <EasingDoubleKeyFrame KeyTime="0:0:1" Value="8"/>
            </DoubleAnimationUsingKeyFrames>
        </Storyboard>
    </Page.Resources>
    <Page.Triggers>
        <EventTrigger RoutedEvent="FrameworkElement.Loaded">
            <BeginStoryboard x:Name="Boost_Analog_BeginStoryboard" Storyboard="{StaticResource Boost Analog}"/>
            <BeginStoryboard Storyboard="{StaticResource Tach}"/>
            <BeginStoryboard Storyboard="{StaticResource Fuel}"/>
        </EventTrigger>
    </Page.Triggers>


    <Canvas x:Name="LayoutRoot" Background="#FF3F3F3F" Width="1280" Height="720">
        <VisualStateManager.VisualStateGroups>
            <VisualStateGroup x:Name="NightDaySplit">
                <VisualState x:Name="Day"/>
                <VisualState x:Name="Night"/>
            </VisualStateGroup>
        </VisualStateManager.VisualStateGroups>

        <!-- Storyboard binding controllers -->
        <Rectangle x:Name="BlackBG" Fill="Black" Height="721" Stroke="Black" Width="1280"/>
        <Canvas x:Name="MainGauge" Height="720" Width="1280" RenderTransformOrigin="0.5,0.5">
            <Canvas.RenderTransform>
                <TransformGroup>
                    <ScaleTransform ScaleX="0.75" ScaleY="0.75"/>
                    <SkewTransform/>
                    <RotateTransform/>
                    <TranslateTransform X="-160" Y="90"/>
                </TransformGroup>
            </Canvas.RenderTransform>
            <Rectangle x:Name="FuelEmpty" Fill="#FF1B1B1B" Height="541.5" Canvas.Left="891" Stroke="Black" Canvas.Top="100.5" Width="303"/>
            <ed:Arc x:Name="arc" ArcThickness="1" ArcThicknessUnit="Percent" EndAngle="173" Fill="#FFF4F4F5" Height="444" Canvas.Left="699" Stretch="None" Stroke="Black" StartAngle="173" Canvas.Top="147.333" Width="444"/>
            <Image x:Name="Textures_MIN_JWCGP_21_MainGauge_png" Height="720" Source="game:/media/cars/MIN_JCWGP_21/UI/Textures/MIN_JWCGP_21_MainGauge.png" Stretch="Fill" Width="1280"/>
            <Image x:Name="Textures_MIN_JWCGP_21_MainNeedle_png" Height="500" Source="game:/media/cars/MIN_JCWGP_21/UI/Textures/MIN_JWCGP_21_MainNeedle.png" Stretch="Fill" Width="500" Canvas.Top="119" Canvas.Left="76" RenderTransformOrigin="0.5,0.5">
                <Image.RenderTransform>
                    <TransformGroup>
                        <ScaleTransform/>
                        <SkewTransform/>
                        <RotateTransform/>
                        <TranslateTransform/>
                    </TransformGroup>
                </Image.RenderTransform>
            </Image>
            <Canvas x:Name="Text" Height="290.083" Canvas.Left="455.333" Canvas.Top="140.417" Width="345.917">
                <local:FastTextBlock x:Name="Text_Speed" Text="{Binding Speed}" Height="148.5" Canvas.Left="65.167"   Canvas.Top="141.583" Width="240" FontFamily="DG1_Arial" FontSize="130" Foreground="White" TextAlignment="Center"/>
                <local:FastTextBlock x:Name="Text_External_Temp" Text="{Binding ExternalTemp}" Height="27.28" Canvas.Left="280.417"   Width="65.5" Foreground="White" FontFamily="DG1_Arial" FontSize="24" TextAlignment="Right"/>
                <local:FastTextBlock x:Name="Text_Time" Text="{Binding Clock}" Height="23.25"   Canvas.Top="4.03" Width="74.667" Foreground="White" FontFamily="DG1_Arial" FontSize="24" TextAlignment="Center"/>
                <local:FastTextBlock x:Name="Text_Odometer" Text="{Binding Odometer}" Height="30" Canvas.Left="-12.996"   Canvas.Top="467.334" Width="81.999" FontFamily="DG1_Arial" Foreground="White" FontSize="24" TextAlignment="Right"/>
                <local:FastTextBlock x:Name="Text_Gear" Text="{Binding Gear}" Height="42.667" Canvas.Left="-19.496"   Canvas.Top="195.34" Width="41" Foreground="White" FontFamily="DG1_Arial" FontSize="36" TextAlignment="Center"/>
            </Canvas>
        </Canvas>
        <Canvas x:Name="CenterGauge" Height="720" Width="1280" RenderTransformOrigin="0.5,0.5">
            <Canvas.RenderTransform>
                <TransformGroup>
                    <ScaleTransform ScaleX="0.5" ScaleY="0.5"/>
                    <SkewTransform/>
                    <RotateTransform Angle="-90"/>
                    <TranslateTransform X="461"/>
                </TransformGroup>
            </Canvas.RenderTransform>
            <Image x:Name="Textures_MIN_JWCGP_21_CenterGauge3_png" Height="720" Source="game:/media/cars/MIN_JCWGP_21/UI/Textures/MIN_JWCGP_21_CenterGauge3.png" Stretch="Fill" Width="1280"/>
            <ed:Arc x:Name="TachBarLeft" ArcThickness="1" ArcThicknessUnit="Percent" EndAngle="215" Fill="#FF66FF86" Height="318.25" Canvas.Left="481" Stretch="None" StartAngle="215" Canvas.Top="200.5" Width="318.25" RenderTransformOrigin="0.5,0.5">
                <ed:Arc.RenderTransform>
                    <TransformGroup>
                        <ScaleTransform/>
                        <SkewTransform/>
                        <RotateTransform/>
                        <TranslateTransform/>
                    </TransformGroup>
                </ed:Arc.RenderTransform>
            </ed:Arc>
            <ed:Arc x:Name="TachBarRight" ArcThickness="1" ArcThicknessUnit="Percent" EndAngle="145" Fill="#FF66FF86" Height="318.25" Canvas.Left="481" Stretch="None" StartAngle="145" Canvas.Top="200.5" Width="318.25"/>
            <Image x:Name="Textures_MIN_JWCGP_21_CenterGauge2_png" Height="720" Source="game:/media/cars/MIN_JCWGP_21/UI/Textures/MIN_JWCGP_21_CenterGauge2.png" Stretch="Fill" Width="1280"/>
            <Image x:Name="Textures_MIN_JWCGP_21_CenterNeedleLeft_png" Height="500" Source="game:/media/cars/MIN_JCWGP_21/UI/Textures/MIN_JWCGP_21_CenterNeedle.png" Stretch="Fill" Width="500" Canvas.Top="109.998" Canvas.Left="390.333" RenderTransformOrigin="0.5,0.5">
                <Image.RenderTransform>
                    <TransformGroup>
                        <ScaleTransform/>
                        <SkewTransform/>
                        <RotateTransform/>
                        <TranslateTransform/>
                    </TransformGroup>
                </Image.RenderTransform>
            </Image>
            <Image x:Name="Textures_MIN_JWCGP_21_CenterNeedleRight_png" Height="500" Source="game:/media/cars/MIN_JCWGP_21/UI/Textures/MIN_JWCGP_21_CenterNeedle.png" Stretch="Fill" Width="500" Canvas.Top="109.998" Canvas.Left="390.333" RenderTransformOrigin="0.5,0.5">
                <Image.RenderTransform>
                    <TransformGroup>
                        <ScaleTransform/>
                        <SkewTransform/>
                        <RotateTransform/>
                        <TranslateTransform/>
                    </TransformGroup>
                </Image.RenderTransform>
            </Image>
            <Image x:Name="Textures_MIN_JWCGP_21_CenterGauge1_png" Height="720" Source="game:/media/cars/MIN_JCWGP_21/UI/Textures/MIN_JWCGP_21_CenterGauge1.png" Stretch="Fill" Width="1280"/>
        </Canvas>
        <Image x:Name="Textures_MIN_JWCGP_21_CenterRim_png" Height="238" Source="game:/media/cars/MIN_JCWGP_21/UI/Textures/MIN_JWCGP_21_CenterRim.png" Stretch="Fill" Width="238" Canvas.Left="656.5"/>
        <Rectangle x:Name="Start_Up" Fill="Black" Height="720" Stroke="Black" Width="1280" Opacity="0"/>
        <local:StoryboardController SeekPct="{Binding BoostAnim}" Target="{StaticResource Boost Analog}"/>
        <local:StoryboardController SeekPct="{Binding Fuel}" Target="{StaticResource Fuel}"/>
        <local:StoryboardController SeekPct="{Binding Tach}" Target="{StaticResource Tach}"/>
    </Canvas>
</Page>