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

    <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="False" UsePsi="True" MaxBoost="40" MinBoost="1" MaxSpeed="47.2" HasAbsLight="False" HasStmLight="False" HasTcsLight="False" HasGAccelX="True" HasGAccelY="True"  HasShiftLights="False" HasTextTach="False" HasLapPlaceInfo="False" HasTextBoost="False" HasTextGAccel="True" HasTextOdometer="True" HasTextFuel="False" MaxFuel="20" MinGear="-1" MaxGear="1" MaxRpm="5000"/>

        <Storyboard x:Key="Gear Analog">
            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Textures_FOR_F150Lightning_22_GearR_png">
                <DiscreteObjectKeyFrame KeyTime="0" Value="{x:Static Visibility.Visible}"/>
                <DiscreteObjectKeyFrame KeyTime="0:0:0.5" Value="{x:Static Visibility.Hidden}"/>
            </ObjectAnimationUsingKeyFrames>
            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Textures_FOR_F150Lightning_22_GearN_png">
                <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="Textures_FOR_F150Lightning_22_GearD_png">
                <DiscreteObjectKeyFrame KeyTime="0" Value="{x:Static Visibility.Hidden}"/>
                <DiscreteObjectKeyFrame KeyTime="0:0:1" 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>
        <Storyboard x:Key="G Accel Vertical">
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)" Storyboard.TargetName="Vertical">
                <EasingDoubleKeyFrame KeyTime="0" Value="0"/>
                <EasingDoubleKeyFrame KeyTime="0:0:1" Value="-182.976"/>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)" Storyboard.TargetName="Vertical_2">
                <EasingDoubleKeyFrame KeyTime="0" Value="-8.55"/>
                <EasingDoubleKeyFrame KeyTime="0:0:0.4" Value="-8.55"/>
                <EasingDoubleKeyFrame KeyTime="0:0:0.5" Value="-125.388"/>
                <EasingDoubleKeyFrame KeyTime="0:0:1" Value="-125.388"/>
            </DoubleAnimationUsingKeyFrames>
        </Storyboard>
        <Storyboard x:Key="G Accel Horizontal">
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)" Storyboard.TargetName="Horizontal">
                <EasingDoubleKeyFrame KeyTime="0" Value="0"/>
                <EasingDoubleKeyFrame KeyTime="0:0:1" Value="2.738"/>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)" Storyboard.TargetName="Horizontal">
                <EasingDoubleKeyFrame KeyTime="0" Value="0"/>
                <EasingDoubleKeyFrame KeyTime="0:0:1" Value="235.715"/>
            </DoubleAnimationUsingKeyFrames>
        </Storyboard>
        <Storyboard x:Key="Speed Analog">
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(ed:Arc.StartAngle)" Storyboard.TargetName="Speedo">
                <EasingDoubleKeyFrame KeyTime="0" Value="224"/>
                <EasingDoubleKeyFrame KeyTime="0:0:0.5" Value="224"/>
                <EasingDoubleKeyFrame KeyTime="0:0:1" Value="224"/>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(ed:Arc.EndAngle)" Storyboard.TargetName="Speedo">
                <EasingDoubleKeyFrame KeyTime="0" Value="224"/>
                <EasingDoubleKeyFrame KeyTime="0:0:0.5" Value="292"/>
                <EasingDoubleKeyFrame KeyTime="0:0:1" Value="495"/>
            </DoubleAnimationUsingKeyFrames>
        </Storyboard>
    </Page.Resources>
    <Page.Triggers>
        <EventTrigger RoutedEvent="FrameworkElement.Loaded">
            <BeginStoryboard x:Name="Speed_Analog_BeginStoryboard" Storyboard="{StaticResource Speed 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="BlackBG" Fill="Black" Height="720.5" Stroke="Black" Width="1281.049"/>
        <Canvas x:Name="Graphics" Height="720" Canvas.Left="-188" Width="1639.174">
            <Image x:Name="Textures_FOR_F150Lightning_22_Center_png" Height="720" Source="game:/media/cars/FOR_F150Lightning_22/UI/Textures/FOR_F150Lightning_22_Center.png" Stretch="Fill" Width="580" RenderTransformOrigin="0.5,0.5" Canvas.Left="995">
                <Image.RenderTransform>
                    <TransformGroup>
                        <ScaleTransform ScaleY="0.48999999999999994" ScaleX="0.52499999999999991"/>
                        <SkewTransform/>
                        <RotateTransform/>
                        <TranslateTransform/>
                    </TransformGroup>
                </Image.RenderTransform>
            </Image>
            <Rectangle x:Name="TachBG_Null" Fill="#FF1F2A42" Height="376.628" Stroke="Black" Width="1150" Canvas.Top="168.506" Canvas.Left="65.5" RenderTransformOrigin="0.5,0.5">
                <Rectangle.RenderTransform>
                    <TransformGroup>
                        <ScaleTransform ScaleY="0.7" ScaleX="0.7"/>
                        <SkewTransform/>
                        <RotateTransform/>
                        <TranslateTransform/>
                    </TransformGroup>
                </Rectangle.RenderTransform>
            </Rectangle>
            <ed:Arc x:Name="Speedo" ArcThickness="1" ArcThicknessUnit="Percent" EndAngle="224" Fill="#FFA2D2FF" Height="313.542" Stretch="None" Width="313.542" StartAngle="224" Canvas.Left="770.324" RenderTransformOrigin="0.5,0.5" Canvas.Top="203.229">
                <ed:Arc.RenderTransform>
                    <TransformGroup>
                        <ScaleTransform ScaleY="0.7" ScaleX="0.7"/>
                        <SkewTransform/>
                        <RotateTransform/>
                        <TranslateTransform/>
                    </TransformGroup>
                </ed:Arc.RenderTransform>
            </ed:Arc>
            <Canvas x:Name="GMeter_2" Height="230.371" Width="156.771" Canvas.Left="219.978" RenderTransformOrigin="0.5,0.5" Canvas.Top="215.705">
                <Canvas.RenderTransform>
                    <TransformGroup>
                        <ScaleTransform ScaleY="0.7" ScaleX="0.7"/>
                        <SkewTransform/>
                        <RotateTransform/>
                        <TranslateTransform/>
                    </TransformGroup>
                </Canvas.RenderTransform>
                <Canvas x:Name="Vertical_2" Height="230.371" Width="156.771" RenderTransformOrigin="0.998,0.681">
                    <Canvas.RenderTransform>
                        <TransformGroup>
                            <ScaleTransform/>
                            <SkewTransform/>
                            <RotateTransform/>
                            <TranslateTransform/>
                        </TransformGroup>
                    </Canvas.RenderTransform>
                    <Canvas x:Name="Horizontal_2" Height="230.371" Width="156.771">
                        <Image x:Name="Textures_FOR_F150Lightning_22_DriverChargeBar_png" Height="334" Source="game:/media/cars/FOR_F150Lightning_22/UI/Textures/FOR_F150Lightning_22_DriverChargeBar.png" Stretch="Fill" Width="170" RenderTransformOrigin="0.5,0.5">
                            <Image.RenderTransform>
                                <TransformGroup>
                                    <ScaleTransform ScaleX="-1"/>
                                    <SkewTransform/>
                                    <RotateTransform/>
                                    <TranslateTransform/>
                                </TransformGroup>
                            </Image.RenderTransform>
                        </Image>
                    </Canvas>
                </Canvas>
            </Canvas>
            <Image x:Name="Textures_FOR_F150Lightning_22_Driver_png" Height="720" Source="game:/media/cars/FOR_F150Lightning_22/UI/Textures/FOR_F150Lightning_22_Driver.png" Stretch="Fill" Width="1280" 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="Gear" Height="22" Width="20" Canvas.Top="469.94" Canvas.Left="346.5" RenderTransformOrigin="0.5,0.5">
                <Canvas.RenderTransform>
                    <TransformGroup>
                        <ScaleTransform ScaleY="0.7" ScaleX="0.7"/>
                        <SkewTransform/>
                        <RotateTransform/>
                        <TranslateTransform/>
                    </TransformGroup>
                </Canvas.RenderTransform>
                <Image x:Name="Textures_FOR_F150Lightning_22_GearD_png" Height="22" Source="game:/media/cars/FOR_F150Lightning_22/UI/Textures/FOR_F150Lightning_22_GearD.png" Stretch="Fill" Width="20" Canvas.Left="41.812"/>
                <Image x:Name="Textures_FOR_F150Lightning_22_GearN_png" Height="22" Source="game:/media/cars/FOR_F150Lightning_22/UI/Textures/FOR_F150Lightning_22_GearN.png" Stretch="Fill" Width="20" Canvas.Left="20"/>
                <Image x:Name="Textures_FOR_F150Lightning_22_GearR_png" Height="22" Source="game:/media/cars/FOR_F150Lightning_22/UI/Textures/FOR_F150Lightning_22_GearR.png" Stretch="Fill" Width="20"/>
            </Canvas>
            <Canvas x:Name="GMeter" Height="15" Width="15" Canvas.Top="415.333" Canvas.Left="550.75" RenderTransformOrigin="0.5,0.5">
                <Canvas.RenderTransform>
                    <TransformGroup>
                        <ScaleTransform ScaleY="0.7" ScaleX="0.7"/>
                        <SkewTransform/>
                        <RotateTransform/>
                        <TranslateTransform/>
                    </TransformGroup>
                </Canvas.RenderTransform>
                <Canvas x:Name="Vertical" Height="15" Width="15" RenderTransformOrigin="0.5,0.5">
                    <Canvas.RenderTransform>
                        <TransformGroup>
                            <ScaleTransform/>
                            <SkewTransform/>
                            <RotateTransform/>
                            <TranslateTransform/>
                        </TransformGroup>
                    </Canvas.RenderTransform>
                    <Canvas x:Name="Horizontal" Height="15" Width="15" RenderTransformOrigin="0.5,0.5">
                        <Canvas.RenderTransform>
                            <TransformGroup>
                                <ScaleTransform/>
                                <SkewTransform/>
                                <RotateTransform/>
                                <TranslateTransform/>
                            </TransformGroup>
                        </Canvas.RenderTransform>
                        <Ellipse x:Name="GMeterBall" Fill="#FFF4F4F5" Height="15" Width="15"/>
                    </Canvas>
                </Canvas>
            </Canvas>
            <Canvas x:Name="Text" Height="410.5" Canvas.Left="214.264" Canvas.Top="141.075" Width="1424.91" RenderTransformOrigin="0.5,0.5">
                <Canvas.RenderTransform>
                    <TransformGroup>
                        <ScaleTransform ScaleY="0.7" ScaleX="0.7"/>
                        <SkewTransform/>
                        <RotateTransform/>
                        <TranslateTransform/>
                    </TransformGroup>
                </Canvas.RenderTransform>
                <local:FastTextBlock x:Name="Text_External_Temp_1"  Text="{Binding ExternalTemp}" Height="23.943"   Canvas.Top="386.557" Width="60.833" FontFamily="DG1_Arial" Foreground="White" FontSize="22" TextAlignment="Right"/>
                <local:FastTextBlock x:Name="Text_Odometer" Text="{Binding Odometer}" Height="23.943" Canvas.Left="671.428"   Canvas.Top="386.557" Width="60.833" FontFamily="DG1_Arial" Foreground="White" FontSize="22" TextAlignment="Right"/>
                <local:FastTextBlock x:Name="Text_Extermal_Temp_2" Text="{Binding ExternalTemp}" Height="10.5" Canvas.Left="1360.97"   Canvas.Top="9.336" Width="24.91" FontFamily="DG1_Arial" Foreground="#FFA195B0" FontSize="8" TextAlignment="Right"/>
                <local:FastTextBlock x:Name="Text_Clock" Text="{Binding Time}" Height="10.5" Canvas.Left="1355.933"   Width="29.947" FontFamily="DG1_Arial" Foreground="#FFE9DBF9" FontSize="10" TextAlignment="Right" Canvas.Top="-1.164"/>
                <local:FastTextBlock x:Name="Text_Speed" Text="{Binding Speed}" Height="60.357" Canvas.Left="653.927"   Canvas.Top="192.524" Width="120.954" FontFamily="Arial" FontSize="48" Foreground="#FFAEE8FF" TextAlignment="Center" RenderTransformOrigin="0.5,0.5">
                    <local:FastTextBlock.RenderTransform>
                        <TransformGroup>
                            <ScaleTransform ScaleX="1.45" ScaleY="1.45"/>
                            <SkewTransform/>
                            <RotateTransform/>
                            <TranslateTransform/>
                        </TransformGroup>
                    </local:FastTextBlock.RenderTransform></local:FastTextBlock>
                <local:FastTextBlock x:Name="Text_G_Meter" Text="{Binding GAccelText}" Height="35.714" Canvas.Left="273.345"   Canvas.Top="75.567" Width="21.429" FontFamily="Arial" FontSize="36" Foreground="White" RenderTransformOrigin="0.5,0.5" TextAlignment="Center">
                    <local:FastTextBlock.RenderTransform>
                        <TransformGroup>
                            <ScaleTransform ScaleX="0.9" ScaleY="0.85"/>
                            <SkewTransform/>
                            <RotateTransform/>
                            <TranslateTransform/>
                        </TransformGroup>
                    </local:FastTextBlock.RenderTransform>
                </local:FastTextBlock>
            </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 AnalogGear}" Target="{StaticResource Gear Analog}"/>
        <local:StoryboardController SeekPct="{Binding GAccelY}" Target="{StaticResource G Accel Vertical}"/>
        <local:StoryboardController SeekPct="{Binding GAccelX}" Target="{StaticResource G Accel Horizontal}"/>
        <local:StoryboardController SeekPct="{Binding AnalogSpeed}" Target="{StaticResource Speed Analog}"/>
    </Canvas>
</Page>