<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_F450DRW_20"
	 >

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

        <Storyboard x:Key="Gear Analog">
            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Gear_D">
                <DiscreteObjectKeyFrame KeyTime="0" Value="{x:Static Visibility.Hidden}"/>
                <DiscreteObjectKeyFrame KeyTime="0:0:1" Value="{x:Static Visibility.Visible}"/>
            </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_R">
                <DiscreteObjectKeyFrame KeyTime="0" Value="{x:Static Visibility.Visible}"/>
                <DiscreteObjectKeyFrame KeyTime="0:0:0.5" Value="{x:Static Visibility.Hidden}"/>
            </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="Fuel Gauge">
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(ed:Arc.StartAngle)" Storyboard.TargetName="Fuel_Mask">
                <EasingDoubleKeyFrame KeyTime="0" Value="-33"/>
                <EasingDoubleKeyFrame KeyTime="0:0:1" Value="-33"/>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(ed:Arc.EndAngle)" Storyboard.TargetName="Fuel_Mask">
                <EasingDoubleKeyFrame KeyTime="0" Value="-32"/>
                <EasingDoubleKeyFrame KeyTime="0:0:1" Value="32"/>
            </DoubleAnimationUsingKeyFrames>
            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Textures_FOR_F450DRW_20_GaugeRed_png">
                <DiscreteObjectKeyFrame KeyTime="0" Value="{x:Static Visibility.Visible}"/>
                <DiscreteObjectKeyFrame KeyTime="0:0:0.1" Value="{x:Static Visibility.Hidden}"/>
            </ObjectAnimationUsingKeyFrames>
        </Storyboard>
        <Storyboard x:Key="Boost Gauge">
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="Boost_Mask">
                <EasingDoubleKeyFrame KeyTime="0" Value="1"/>
                <EasingDoubleKeyFrame KeyTime="0:0:1" Value="1"/>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(ed:Arc.StartAngle)" Storyboard.TargetName="Boost_Mask">
                <EasingDoubleKeyFrame KeyTime="0" Value="-33"/>
                <EasingDoubleKeyFrame KeyTime="0:0:1" Value="-33"/>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(ed:Arc.EndAngle)" Storyboard.TargetName="Boost_Mask">
                <EasingDoubleKeyFrame KeyTime="0" Value="-32"/>
                <EasingDoubleKeyFrame KeyTime="0:0:1" Value="32"/>
            </DoubleAnimationUsingKeyFrames>
        </Storyboard>
    </Page.Resources>
    <Page.Triggers>
        <EventTrigger RoutedEvent="FrameworkElement.Loaded">
            <BeginStoryboard Storyboard="{StaticResource Fuel Gauge}"/>
            <BeginStoryboard x:Name="Boost_Gauge_BeginStoryboard" Storyboard="{StaticResource Boost Gauge}"/>
        </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 Fill="Black" Height="720.5" Stroke="Black" Width="1281.049"/>
        <Canvas x:Name="Boost_Animation" Height="720.5" Width="1281.049">
            <ed:Arc x:Name="Boost_Mask" ArcThickness="1" ArcThicknessUnit="Percent" EndAngle="-32" Fill="#FF6A96E0" Height="177.333" Canvas.Left="757.53" Stretch="None" Stroke="Black" StartAngle="-33" Canvas.Top="209.253" Width="177.333"/>
        </Canvas>
        <Canvas x:Name="Fuel_Gauge" Height="720.5" Width="1281.049">
            <ed:Arc x:Name="Fuel_Mask" ArcThickness="1" ArcThicknessUnit="Percent" EndAngle="-32" Fill="#FF6A96E0" Height="177.333" Canvas.Left="620.667" Stretch="None" Stroke="Black" StartAngle="-33" Canvas.Top="209.253" Width="177.333"/>
        </Canvas>
        <Image x:Name="Textures_FOR_F450DRW_20_BG_png" Height="403" Source="game:/media/cars/FOR_F450DRWFE_20/UI/Textures/FOR_F450DRW_20_BG.png" Stretch="Fill" Width="720" Canvas.Left="280.5" Canvas.Top="157.761"/>
        <Image x:Name="Textures_FOR_F450DRW_20_GaugeRed_png" Height="6.552" Source="game:/media/cars/FOR_F450DRWFE_20/UI/Textures/FOR_F450DRW_20_GaugeRed.png" Stretch="Fill" Width="4.286" Canvas.Left="665.856" Canvas.Top="227.764" RenderTransformOrigin="0.5,0.5">
            <Image.RenderTransform>
                <TransformGroup>
                    <ScaleTransform ScaleX="-1"/>
                    <SkewTransform/>
                    <RotateTransform Angle="-30"/>
                    <TranslateTransform/>
                </TransformGroup>
            </Image.RenderTransform>
        </Image>
        <Canvas x:Name="Gear_Analog" Height="28.327" Canvas.Left="612.625" Canvas.Top="492" Width="55.5" RenderTransformOrigin="0.5,0.5">
            <local:FastTextBlock x:Name="Gear_D" Height="30.25"   Text="D" Width="19.589" FontSize="27.5" FontFamily="DG1_Arial" Foreground="Red" Canvas.Top="-0.089" Canvas.Left="40.203" Background="Black" Visibility="Hidden"/>
            <local:FastTextBlock x:Name="Gear_N" Height="30.25"   Text="N" Width="19.589" FontSize="27.5" FontFamily="DG1_Arial" Foreground="Red" Canvas.Top="-0.089" Canvas.Left="20.998" Background="Black" Visibility="Hidden"/>
            <local:FastTextBlock x:Name="Gear_R" Height="30.25"   Text="R" Width="19.589" FontSize="27.5" FontFamily="DG1_Arial" Foreground="Red" Canvas.Top="-0.089" Canvas.Left="1.576" Background="Black"/>
        </Canvas>
        <Canvas x:Name="Text" Height="18.5" Canvas.Left="646" Canvas.Top="208" Width="56.5">
            <local:FastTextBlock x:Name="Text_Clock" Text="{Binding Time}" Height="26.333"   Width="94.917" Foreground="White" FontFamily="DG1_Arial" FontSize="22" Canvas.Top="132.89" Canvas.Left="-125.282" Margin="0" TextAlignment="Right" RenderTransformOrigin="0.5,0.5">
                <local:FastTextBlock.RenderTransform>
                    <TransformGroup>
                        <ScaleTransform/>
                        <SkewTransform/>
                        <RotateTransform/>
                        <TranslateTransform Y="-4" X="-18"/>
                    </TransformGroup>
                </local:FastTextBlock.RenderTransform>
            </local:FastTextBlock>
            <local:FastTextBlock x:Name="Text_Odometer" Text="{Binding Odometer}" Height="19.333"   Width="97.583" Foreground="White" FontFamily="DG1_Arial" FontSize="16" Canvas.Top="288.172" Canvas.Left="-220.598" Margin="0" TextAlignment="Right"/>
            <local:FastTextBlock x:Name="Text_Trip_Odo" Text="{Binding TripMeter}" Height="26.333"   Width="91.916" Foreground="White" FontFamily="DG1_Arial" FontSize="22" Canvas.Top="182.507" Canvas.Left="-138.647" Margin="0" TextAlignment="Right" RenderTransformOrigin="0.5,0.5">
                <local:FastTextBlock.RenderTransform>
                    <TransformGroup>
                        <ScaleTransform/>
                        <SkewTransform/>
                        <RotateTransform/>
                        <TranslateTransform Y="-5"/>
                    </TransformGroup>
                </local:FastTextBlock.RenderTransform>
            </local:FastTextBlock>
        </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 Fuel}" Target="{StaticResource Fuel Gauge}"/>
        <local:StoryboardController SeekPct="{Binding BoostAnim}" Target="{StaticResource Boost Gauge}"/>
        <local:StoryboardController SeekPct="{Binding AnalogGear}" Target="{StaticResource Gear Analog}"/>
    </Canvas>
</Page>