<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_FocusST_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="False" UseMPH="True" UsePsi="False" MaxBoost="1.3" MinBoost="0" MaxSpeed="80.46" HasAbsLight="False" HasStmLight="False" HasTcsLight="False" HasGAccelX="False" HasGAccelY="False"  HasShiftLights="False" HasTextTach="True" HasLapPlaceInfo="True" HasTextBoost="False" HasTextGAccel="False" HasTextOdometer="True" HasTextFuel="False" MaxFuel="20" MinGear="-1" MaxGear="6" MaxRpm="8000"/>
        <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="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)" Storyboard.TargetName="FuelMask">
                <EasingDoubleKeyFrame KeyTime="0" Value="0"/>
                <EasingDoubleKeyFrame KeyTime="0:0:1" Value="-126.802"/>
            </DoubleAnimationUsingKeyFrames>
        </Storyboard>
        <Storyboard x:Key="Tach">
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)" Storyboard.TargetName="Textures_FOR_FocusST_22_NeedleTach">
                <EasingDoubleKeyFrame KeyTime="0" Value="-132.3"/>
                <EasingDoubleKeyFrame KeyTime="0:0:1" Value="132.8"/>
            </DoubleAnimationUsingKeyFrames>
        </Storyboard>
        <Storyboard x:Key="Speed Analog">
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)" Storyboard.TargetName="Textures_FOR_FocusST_22_NeedleSpeedo">
                <EasingDoubleKeyFrame KeyTime="0" Value="-135.8"/>
                <EasingDoubleKeyFrame KeyTime="0:0:1" Value="135.8"/>
            </DoubleAnimationUsingKeyFrames>
        </Storyboard>
        <Storyboard x:Key="Boost Gauge">
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)" Storyboard.TargetName="BoostFill">
                <EasingDoubleKeyFrame KeyTime="0" Value="-93.156"/>
                <EasingDoubleKeyFrame KeyTime="0:0:1" Value="-25.289"/>
            </DoubleAnimationUsingKeyFrames>
        </Storyboard>
    </Page.Resources>
    <Page.Triggers>
        <EventTrigger RoutedEvent="FrameworkElement.Loaded">
            <BeginStoryboard Storyboard="{StaticResource Fuel Gauge}"/>
            <BeginStoryboard Storyboard="{StaticResource Tach}"/>
            <BeginStoryboard x:Name="Speed_Analog_BeginStoryboard" Storyboard="{StaticResource Speed Analog}"/>
            <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 x:Name="BackGround" Fill="Black" Height="720.5" Stroke="Black" Width="1281.049"/>

        <!-- Storyboard binding controllers -->
        <Image x:Name="Textures_FOR_FocusST_22_Center_png" Height="620" Source="game:/media/cars/FOR_FocusST_22/UI/Textures/FOR_FocusST_22_Center.png" Stretch="Fill" Width="1200" Canvas.Left="40" RenderTransformOrigin="0.5,0.5" Canvas.Top="265">
            <Image.RenderTransform>
                <TransformGroup>
                    <ScaleTransform ScaleY="0.45" ScaleX="0.45"/>
                    <SkewTransform/>
                    <RotateTransform/>
                    <TranslateTransform/>
                </TransformGroup>
            </Image.RenderTransform>
        </Image>
        <Canvas x:Name="Driver" Height="440" Width="1280">
            <Image x:Name="Textures_FOR_FocusST_22_FuelFill_png" Height="170" Source="game:/media/cars/FOR_FocusST_22/UI/Textures/FOR_FocusST_22_FuelFill.png" Stretch="Fill" Width="80" RenderTransformOrigin="0.5,0.5" Canvas.Left="1068.938" Canvas.Top="213.125">
                <Image.RenderTransform>
                    <TransformGroup>
                        <ScaleTransform ScaleY="0.85" ScaleX="0.85"/>
                        <SkewTransform/>
                        <RotateTransform/>
                        <TranslateTransform/>
                    </TransformGroup>
                </Image.RenderTransform>
            </Image>
            <Rectangle x:Name="FuelMask" Fill="Black" Height="131.167" Canvas.Left="1075" Canvas.Top="230" Width="75" RenderTransformOrigin="0.5,0.5">
                <Rectangle.RenderTransform>
                    <TransformGroup>
                        <ScaleTransform/>
                        <SkewTransform/>
                        <RotateTransform/>
                        <TranslateTransform/>
                    </TransformGroup>
                </Rectangle.RenderTransform>
            </Rectangle>
            <Rectangle x:Name="BoostFill" Fill="#FF999999" Height="13" Canvas.Left="593.125" Canvas.Top="220.792" Width="93.5" RenderTransformOrigin="0.5,0.5">
                <Rectangle.RenderTransform>
                    <TransformGroup>
                        <ScaleTransform/>
                        <SkewTransform/>
                        <RotateTransform/>
                        <TranslateTransform/>
                    </TransformGroup>
                </Rectangle.RenderTransform>
            </Rectangle>
            <Image x:Name="Textures_FOR_FocusST_22_Driver_png" Height="440" Source="game:/media/cars/FOR_FocusST_22/UI/Textures/FOR_FocusST_22_Driver.png" Stretch="Fill" Width="1280" RenderTransformOrigin="0.5,0.5">
                <Image.RenderTransform>
                    <TransformGroup>
                        <ScaleTransform ScaleY="0.85" ScaleX="0.85"/>
                        <SkewTransform/>
                        <RotateTransform/>
                        <TranslateTransform/>
                    </TransformGroup>
                </Image.RenderTransform>
            </Image>
            <Image x:Name="Textures_FOR_FocusST_22_NeedleSpeedo" Height="310" Source="game:/media/cars/FOR_FocusST_22/UI/Textures/FOR_FocusST_22_Needle.png" Stretch="Fill" Width="310" Canvas.Top="77.75" Canvas.Left="174.75" RenderTransformOrigin="0.5,0.5">
                <Image.RenderTransform>
                    <TransformGroup>
                        <ScaleTransform ScaleY="0.85" ScaleX="0.85"/>
                        <SkewTransform/>
                        <RotateTransform Angle="-135.8"/>
                        <TranslateTransform/>
                    </TransformGroup>
                </Image.RenderTransform>
            </Image>
            <Image x:Name="Textures_FOR_FocusST_22_NeedleTach" Height="310" Source="game:/media/cars/FOR_FocusST_22/UI/Textures/FOR_FocusST_22_Needle.png" Stretch="Fill" Width="310" Canvas.Top="77.75" Canvas.Left="795.25" RenderTransformOrigin="0.5,0.5">
                <Image.RenderTransform>
                    <TransformGroup>
                        <ScaleTransform ScaleY="0.85" ScaleX="0.85"/>
                        <SkewTransform/>
                        <RotateTransform Angle="-132.3"/>
                        <TranslateTransform/>
                    </TransformGroup>
                </Image.RenderTransform>
            </Image>
            <local:FastTextBlock x:Name="Text_Speed" Text="{Binding Speed}" Height="75"   Width="140" FontFamily="DG1_Arial" Foreground="White" TextAlignment="Center" FontSize="72" Canvas.Top="195" Canvas.Left="260"/>
            <local:FastTextBlock x:Name="Text_Gear" Text="{Binding Gear}" Height="75"   Width="140" FontFamily="DG1_Arial" Foreground="White" TextAlignment="Center" FontSize="72" RenderTransformOrigin="0.5,0.5" Canvas.Left="880" Canvas.Top="190">
                <local:FastTextBlock.RenderTransform>
                    <TransformGroup>
                        <ScaleTransform ScaleY="1.25" ScaleX="1.25"/>
                        <SkewTransform/>
                        <RotateTransform/>
                        <TranslateTransform/>
                    </TransformGroup>
                </local:FastTextBlock.RenderTransform>
            </local:FastTextBlock>
            <local:FastTextBlock x:Name="Text_Odometer" Text="{Binding Odometer}" Height="22.25" Canvas.Left="357.5"   Canvas.Top="382.75" Width="120" FontFamily="DG1_Arial" Foreground="White" TextAlignment="Right" FontSize="22"/>
            <local:FastTextBlock x:Name="Text_ExternalTemp" Text="{Binding ExernalTemp}" Height="22.25" Canvas.Left="638.5"   Canvas.Top="382.75" Width="120" FontFamily="DG1_Arial" Foreground="White" TextAlignment="Right" FontSize="22"/>
        </Canvas>
        <Rectangle x:Name="Start_Up_Mask" Fill="Black" Height="720" Stroke="Black" Width="1280" Canvas.Left="0" Canvas.Top="4.344" Opacity="0" RenderTransformOrigin="0.5,0.5">
            <Rectangle.RenderTransform>
                <TransformGroup>
                    <ScaleTransform ScaleY="0.95" ScaleX="0.95"/>
                    <SkewTransform/>
                    <RotateTransform/>
                    <TranslateTransform/>
                </TransformGroup>
            </Rectangle.RenderTransform>
        </Rectangle>
        <local:StoryboardController SeekPct="{Binding Fuel}" Target="{StaticResource Fuel Gauge}"/>
        <local:StoryboardController SeekPct="{Binding Tach}" Target="{StaticResource Tach}"/>
        <local:StoryboardController SeekPct="{Binding AnalogSpeed}" Target="{StaticResource Speed Analog}"/>
        <local:StoryboardController SeekPct="{Binding BoostAnim}" Target="{StaticResource Boost Gauge}"/>
    </Canvas>
</Page>