<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"
    mc:Ignorable="d"
	x:Class="DigitalGauge.MAZ_MX5RF_22"
	 >

    <Page.Resources>
        <Style x:Key="TextBlockStyle" TargetType="{x:Type local:FastTextBlock}">
            <Setter Property="FontFamily" Value="DG2_LCD"/>
            <Setter Property="Foreground" Value="#FF8AC90D"/>
             
            <Setter Property="TextAlignment" Value="Right"/>
        </Style>

        <local:DigitalGaugeConfig x:Key="Config" HasClock="False" HasExternalTemp="True" UseDegreesF="True" UseMPH="True" UsePsi="False" MaxBoost="0" MinBoost="0" MaxSpeed="00" 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" MaxGear="8" MaxRpm="10000"></local:DigitalGaugeConfig>
        <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>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.Width)" Storyboard.TargetName="Start_Up_Mask">
                <EasingDoubleKeyFrame KeyTime="0" Value="1280"/>
                <EasingDoubleKeyFrame KeyTime="0:0:1" Value="1280"/>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.Height)" Storyboard.TargetName="Start_Up_Mask">
                <EasingDoubleKeyFrame KeyTime="0" Value="720"/>
                <EasingDoubleKeyFrame KeyTime="0:0:1" Value="720"/>
            </DoubleAnimationUsingKeyFrames>
        </Storyboard>
        <Storyboard x:Key="Fuel Gauge">
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)" Storyboard.TargetName="Textures_MAZ_MX5RF_22_FuelArc_png">
                <EasingDoubleKeyFrame KeyTime="0" Value="225"/>
                <EasingDoubleKeyFrame KeyTime="0:0:1" Value="135"/>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)" Storyboard.TargetName="Textures_MAZ_MX5RF_22_FuelNeedle_png">
                <EasingDoubleKeyFrame KeyTime="0" Value="45"/>
                <EasingDoubleKeyFrame KeyTime="0:0:1" Value="-45"/>
            </DoubleAnimationUsingKeyFrames>
        </Storyboard>
    </Page.Resources>
    <Page.Triggers>
        <EventTrigger RoutedEvent="FrameworkElement.Loaded">
            <BeginStoryboard Storyboard="{StaticResource Fuel Gauge}"/>
        </EventTrigger>
    </Page.Triggers>


    <Canvas x:Name="LayoutRoot" Background="#FF1C1C1C" Width="1280" Height="720">
        <Rectangle x:Name="Background_Black" Fill="Black" Height="720" Canvas.Left="0" Width="1280"/>

        <!-- Storyboard binding controllers -->
        <Image x:Name="Textures_MAZ_MX5RF_22_FuelArc_png" Height="540" Source="game:/media/cars/MAZ_MX5RF_22/UI/Textures/MAZ_MX5RF_22_FuelArc.png" Stretch="Fill" Width="540" RenderTransformOrigin="0.5,0.5" Canvas.Left="30" Canvas.Top="91.988">
            <Image.RenderTransform>
                <TransformGroup>
                    <ScaleTransform ScaleY="0.8" ScaleX="0.8"/>
                    <SkewTransform/>
                    <RotateTransform Angle="-135"/>
                    <TranslateTransform/>
                </TransformGroup>
            </Image.RenderTransform>
        </Image>
        <Image x:Name="Textures_MAZ_MX5RF_22_Driver_png" Height="600" Source="game:/media/cars/MAZ_MX5RF_22/UI/Textures/MAZ_MX5RF_22_Driver.png" Stretch="Fill" Width="600" RenderTransformOrigin="0.5,0.5" Canvas.Top="62">
            <Image.RenderTransform>
                <TransformGroup>
                    <ScaleTransform ScaleY="0.8" ScaleX="0.8"/>
                    <SkewTransform/>
                    <RotateTransform/>
                    <TranslateTransform/>
                </TransformGroup>
            </Image.RenderTransform>
        </Image>
        <Image x:Name="Textures_MAZ_MX5RF_22_FuelNeedle_png" Height="68" Source="game:/media/cars/MAZ_MX5RF_22/UI/Textures/MAZ_MX5RF_22_FuelNeedle.png" Stretch="Fill" Width="16" Canvas.Left="292" RenderTransformOrigin="0.5,-3.061" Canvas.Top="570.157">
            <Image.RenderTransform>
                <TransformGroup>
                    <ScaleTransform ScaleY="0.8" ScaleX="0.8"/>
                    <SkewTransform/>
                    <RotateTransform Angle="44.999999999999993"/>
                    <TranslateTransform/>
                </TransformGroup>
            </Image.RenderTransform>
        </Image>
        <Image x:Name="Textures_MAZ_MX5RF_22_Center_png" Height="580" Source="game:/media/cars/MAZ_MX5RF_22/UI/Textures/MAZ_MX5RF_22_Center.png" Stretch="Fill" Width="990" RenderTransformOrigin="0.5,0.5" Canvas.Left="440" Canvas.Top="70">
            <Image.RenderTransform>
                <TransformGroup>
                    <ScaleTransform ScaleX="0.65" ScaleY="0.65"/>
                    <SkewTransform/>
                    <RotateTransform/>
                    <TranslateTransform/>
                </TransformGroup>
            </Image.RenderTransform>
        </Image>
        <local:FastTextBlock x:Name="Teext_Odometer" Text="{Binding Odometer}" Height="40" Canvas.Left="250"   Canvas.Top="444.339" Width="145" FontFamily="DG1_ArialBold" Foreground="White" FontSize="36" TextAlignment="Right"/>
        <local:FastTextBlock x:Name="Text_External_Temp" Text="{Binding ExternalTemp}" Height="40" Canvas.Left="75"   Canvas.Top="444.339" Width="145" FontFamily="DG1_ArialBold" Foreground="White" FontSize="36" TextAlignment="Right"/>
		<local:FastTextBlock x:Name="Text_Gear" TextAlignment="Center" Text="{Binding Gear}" Width="100" FontSize="48" Style="{StaticResource TextBlockStyle}" RenderTransformOrigin="0.5,0.5" Canvas.Top="8" Canvas.Left="482" Foreground="White"/>
        <local:FastTextBlock x:Name="Text_Clock" Text="{Binding Time}" Height="30" Canvas.Left="1175"   Canvas.Top="193" Width="80" FontFamily="DG1_ArialBold" Foreground="White" FontSize="24"/>
        <Rectangle x:Name="Start_Up_Mask" Fill="Black" Height="720" Stroke="Black" Width="1280" Opacity="0"/>
        <local:StoryboardController SeekPct="{Binding Fuel}" Target="{StaticResource Fuel Gauge}"/>
    </Canvas>
</Page>