<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.FER_296GTB_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="29.4" MinBoost="1" MaxSpeed="97.67" 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="17.964" MinGear="-1" MaxGear="8" MaxRpm="10000"/>

        <Storyboard x:Key="Tach">
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)" Storyboard.TargetName="Textures_FER_SF90Stradale_20_Needle_png">
                <EasingDoubleKeyFrame KeyTime="0" Value="0"/>
                <EasingDoubleKeyFrame KeyTime="0:0:1" Value="225.047"/>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(ed:Arc.StartAngle)" Storyboard.TargetName="Charge">
                <EasingDoubleKeyFrame KeyTime="0" Value="-44"/>
                <EasingDoubleKeyFrame KeyTime="0:0:0.5" Value="-36"/>
                <EasingDoubleKeyFrame KeyTime="0:0:1" Value="-1"/>
            </DoubleAnimationUsingKeyFrames>
        </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="Fuel Gauge">
            <PointAnimationUsingKeyFrames Storyboard.TargetProperty="(Path.Data).(PathGeometry.Figures)[0].(PathFigure.StartPoint)" Storyboard.TargetName="Fuel">
                <EasingPointKeyFrame KeyTime="0" Value="0,0.104166666667008"/>
                <EasingPointKeyFrame KeyTime="0:0:1" Value="125.408191422263,-7.63278329429795E-17"/>
            </PointAnimationUsingKeyFrames>
            <PointAnimationUsingKeyFrames Storyboard.TargetProperty="(Path.Data).(PathGeometry.Figures)[0].(PathFigure.Segments)[2].(LineSegment.Point)" Storyboard.TargetName="Fuel">
                <EasingPointKeyFrame KeyTime="0" Value="6.67514191106906,14.479166666667"/>
                <EasingPointKeyFrame KeyTime="0:0:1" Value="132.083333333333,14.375"/>
            </PointAnimationUsingKeyFrames>
        </Storyboard>
        <Storyboard x:Key="Boost Analog">
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(ed:Arc.StartAngle)" Storyboard.TargetName="Boost">
                <EasingDoubleKeyFrame KeyTime="0" Value="0"/>
                <EasingDoubleKeyFrame KeyTime="0:0:1" Value="0"/>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(ed:Arc.EndAngle)" Storyboard.TargetName="Boost">
                <EasingDoubleKeyFrame KeyTime="0" Value="0"/>
                <EasingDoubleKeyFrame KeyTime="0:0:1" Value="181"/>
            </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="-142"/>
            </DoubleAnimationUsingKeyFrames>
        </Storyboard>
        <Storyboard x:Key="G Accel Horizontal">
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)" Storyboard.TargetName="Horizontal">
                <EasingDoubleKeyFrame KeyTime="0" Value="0"/>
                <EasingDoubleKeyFrame KeyTime="0:0:1" Value="137.333"/>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)" Storyboard.TargetName="Horizontal">
                <EasingDoubleKeyFrame KeyTime="0" Value="0"/>
                <EasingDoubleKeyFrame KeyTime="0:0:1" Value="-0.333"/>
            </DoubleAnimationUsingKeyFrames>
        </Storyboard>
    </Page.Resources>
    <Page.Triggers>
        <EventTrigger RoutedEvent="FrameworkElement.Loaded" SourceName="LayoutRoot">
            <BeginStoryboard Storyboard="{StaticResource Fuel Gauge}"/>
            <BeginStoryboard Storyboard="{StaticResource Boost 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" Width="1280" Canvas.Left="0" Canvas.Top="0"/>
        <Rectangle x:Name="Background_Gray" Fill="#FF060606" Height="515.295" Width="1280"/>
        <Canvas x:Name="Main_Canvas" Height="480" Width="1280" RenderTransformOrigin="0.5,0.5">
            <Canvas.RenderTransform>
                <TransformGroup>
                    <ScaleTransform ScaleX="0.85" ScaleY="0.85"/>
                    <SkewTransform/>
                    <RotateTransform/>
                    <TranslateTransform/>
                </TransformGroup>
            </Canvas.RenderTransform>
            <Image x:Name="Textures_FER_SF90Stradale_20_Driver_png" Height="480" Source="game:/media/cars/FER_296GTB_22/UI/Textures/FER_SF90Stradale_20 Driver.png" Stretch="Fill" Width="1280"/>
            <ed:Arc x:Name="Boost" ArcThickness="1" ArcThicknessUnit="Percent" EndAngle="0" Fill="#FF33A9EC" Height="354.667" Canvas.Left="462" Stretch="None" Stroke="Black" Canvas.Top="62" Width="354.667" RenderTransformOrigin="0.5,0.5" Opacity="0.5">
                <ed:Arc.RenderTransform>
                    <TransformGroup>
                        <ScaleTransform/>
                        <SkewTransform/>
                        <RotateTransform Angle="-180"/>
                        <TranslateTransform/>
                    </TransformGroup>
                </ed:Arc.RenderTransform>
            </ed:Arc>
            <ed:Arc x:Name="Charge" ArcThickness="1" ArcThicknessUnit="Percent" EndAngle="0" Fill="#FF2AE27A" Height="354.667" Canvas.Left="462" Stretch="None" Stroke="Black" Canvas.Top="62" Width="354.667" RenderTransformOrigin="0.5,0.5" Opacity="0.5">
                <ed:Arc.RenderTransform>
                    <TransformGroup>
                        <ScaleTransform/>
                        <SkewTransform/>
                        <RotateTransform Angle="-180"/>
                        <TranslateTransform/>
                    </TransformGroup>
                </ed:Arc.RenderTransform>
            </ed:Arc>
            <Image x:Name="Textures_FER_SF90Stradale_20_DriverDial_png" Height="480" Source="game:/media/cars/FER_296GTB_22/UI/Textures/FER_SF90Stradale_20 DriverDial.png" Stretch="Fill" Width="1280"/>
            <Image x:Name="Textures_FER_SF90Stradale_20_Needle_png" Height="174" Source="game:/media/cars/FER_296GTB_22/UI/Textures/FER_SF90Stradale_20 Needle.png" Stretch="Fill" Width="42" Canvas.Left="618.646" Canvas.Top="218.833" RenderTransformOrigin="0.51,0.125">
                <Image.RenderTransform>
                    <TransformGroup>
                        <ScaleTransform/>
                        <SkewTransform/>
                        <RotateTransform/>
                        <TranslateTransform/>
                    </TransformGroup>
                </Image.RenderTransform>
            </Image>
            <Image x:Name="Textures_FER_SF90Stradale_20_GearFace_png" Height="480" Source="game:/media/cars/FER_296GTB_22/UI/Textures/FER_SF90Stradale_20 GearFace.png" Stretch="Fill" Width="1280"/>
            <Path x:Name="Fuel" Fill="#FF464257" Height="14.479" Canvas.Left="144" Canvas.Top="435.271" Width="133.125">
                <Path.Data>
                    <PathGeometry>
                        <PathFigure IsClosed="True" StartPoint="0,0.104166666667008">
                            <LineSegment Point="125.694181646168,0.104166666667008"/>
                            <LineSegment Point="133.125,14.479166666667"/>
                            <LineSegment Point="6.67514191106906,14.479166666667"/>
                        </PathFigure>
                    </PathGeometry>
                </Path.Data>
            </Path>
            <Canvas x:Name="Text" Height="293.991" Canvas.Left="178.755" Canvas.Top="182.593" Width="841.465">
                <local:FastTextBlock x:Name="Text_Speed" Text="{Binding Speed}" Height="48"   Width="108.333" FontFamily="Moire" FontSize="36" TextAlignment="Right" Foreground="White" Canvas.Left="473.912" Canvas.Top="24.741"/>
                <local:FastTextBlock x:Name="Text_Gear" Text="{Binding Gear}" Height="60"   Width="68.5" FontFamily="Moire" FontSize="48" Foreground="White" TextAlignment="Center" Canvas.Top="99.407" Canvas.Left="482.245"/>
                <local:FastTextBlock x:Name="Text_External_Temp" Text="{Binding ExternalTemp}" Height="16.75"   Width="41.25" TextAlignment="Right" FontFamily="DG1_Arial" Foreground="White" FontSize="14" Canvas.Top="264.907" Canvas.Left="287.245"/>
                <local:FastTextBlock x:Name="Text_Clock" Text="{Binding Time}" Height="16.75"   Width="56.5" TextAlignment="Center" FontFamily="DG1_Arial" Foreground="White" FontSize="14" Canvas.Top="264.907" Canvas.Left="558.495"/>
                <local:FastTextBlock x:Name="Text_Odometer" Text="{Binding Odometer}" Height="16.75"   Width="70.583" TextAlignment="Right" FontFamily="DG1_Arial" Foreground="White" FontSize="14" Canvas.Top="277.241"/>
                <local:FastTextBlock x:Name="Text_G_Meter" Text="{Binding GAccelText}" Height="21.809" Canvas.Left="804.745"   Width="36.72" FontFamily="DG1_Arial" Foreground="White" FontSize="18" TextAlignment="Center"/>
            </Canvas>
            <Canvas x:Name="G_Meter" Height="18" Canvas.Left="924.25" Canvas.Top="351.965" Width="18">
                <Canvas x:Name="Vertical" Height="18" Width="18" RenderTransformOrigin="0.5,0.5">
                    <Canvas.RenderTransform>
                        <TransformGroup>
                            <ScaleTransform/>
                            <SkewTransform/>
                            <RotateTransform/>
                            <TranslateTransform/>
                        </TransformGroup>
                    </Canvas.RenderTransform>
                    <Canvas x:Name="Horizontal" Height="18" Width="18" RenderTransformOrigin="0.5,0.5">
                        <Canvas.RenderTransform>
                            <TransformGroup>
                                <ScaleTransform/>
                                <SkewTransform/>
                                <RotateTransform/>
                                <TranslateTransform/>
                            </TransformGroup>
                        </Canvas.RenderTransform>
                        <Image x:Name="Marker" Height="18" Source="game:/media/cars/FER_296GTB_22/UI/Textures/AUD_R8V10Plus_16_G_Meter.png" Stretch="Fill" Width="18"/>
                    </Canvas>
                </Canvas>
            </Canvas>
            <Image x:Name="Textures_FER_296GTB_22_20_Passenger_png" Height="236" Source="game:/media/cars/FER_296GTB_22/UI/Textures/FER_296GTB_22_20_Passenger.png" Stretch="Fill" Width="1280" Canvas.Top="563.529" RenderTransformOrigin="0.5,0.5">
                <Image.RenderTransform>
                    <TransformGroup>
                        <ScaleTransform ScaleX="0.85" ScaleY="0.85"/>
                        <SkewTransform/>
                        <RotateTransform/>
                        <TranslateTransform/>
                    </TransformGroup>
                </Image.RenderTransform>
            </Image>
        </Canvas>
        <Rectangle x:Name="Start_Up_Mask" Fill="Black" Height="720" Stroke="Black" Width="1280" Opacity="0"/>

        <!-- Storyboard binding controllers -->
        <local:StoryboardController SeekPct="{Binding Tach}" Target="{StaticResource Tach}"/>
        <local:StoryboardController SeekPct="{Binding Fuel}" Target="{StaticResource Fuel Gauge}"/>
        <local:StoryboardController SeekPct="{Binding BoostAnim}" Target="{StaticResource Boost Analog}"/>
        <local:StoryboardController SeekPct="{Binding GAccelY}" Target="{StaticResource G Accel Vertical}"/>
        <local:StoryboardController SeekPct="{Binding GAccelX}" Target="{StaticResource G Accel Horizontal}"/>


    </Canvas>
</Page>