<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="ForzaUI.BMW_M2_23">

    <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="True" UsePsi="True" MaxBoost="13" MinBoost="1" MaxSpeed="62.5" 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.0" MinGear="-1" MaxGear="1" MaxRpm="8000"></local:DigitalGaugeConfig>

        <Storyboard x:Key="Speed Analog"/>
        <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)[0].(ScaleTransform.ScaleY)" Storyboard.TargetName="Textures_BMW_M2_23_FuelFill_png">
                <EasingDoubleKeyFrame KeyTime="0" Value="0.128"/>
                <EasingDoubleKeyFrame KeyTime="0:0:1" Value="0.7"/>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)" Storyboard.TargetName="Textures_BMW_M2_23_FuelFill_png">
                <EasingDoubleKeyFrame KeyTime="0" Value="37.156"/>
                <EasingDoubleKeyFrame KeyTime="0:0:1" Value="0"/>
            </DoubleAnimationUsingKeyFrames>
        </Storyboard>
        <Storyboard x:Key="Gear Analog"/>
        <Storyboard x:Key="Tach">
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)" Storyboard.TargetName="Textures_BMW_M2_23_TachBar_png">
                <EasingDoubleKeyFrame KeyTime="0" Value="0.04"/>
                <EasingDoubleKeyFrame KeyTime="0:0:0.125" Value="0.073"/>
                <EasingDoubleKeyFrame KeyTime="0:0:0.25" Value="0.16"/>
                <EasingDoubleKeyFrame KeyTime="0:0:0.375" Value="0.244"/>
                <EasingDoubleKeyFrame KeyTime="0:0:0.5" Value="0.331"/>
                <EasingDoubleKeyFrame KeyTime="0:0:0.625" Value="0.419"/>
                <EasingDoubleKeyFrame KeyTime="0:0:0.75" Value="0.498"/>
                <EasingDoubleKeyFrame KeyTime="0:0:0.875" Value="0.577"/>
                <EasingDoubleKeyFrame KeyTime="0:0:1" Value="0.658"/>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)" Storyboard.TargetName="Textures_BMW_M2_23_TachBar_png">
                <EasingDoubleKeyFrame KeyTime="0" Value="95.688"/>
                <EasingDoubleKeyFrame KeyTime="0:0:0.125" Value="90.977"/>
                <EasingDoubleKeyFrame KeyTime="0:0:0.25" Value="78.293"/>
                <EasingDoubleKeyFrame KeyTime="0:0:0.375" Value="66.182"/>
                <EasingDoubleKeyFrame KeyTime="0:0:0.5" Value="53.54"/>
                <EasingDoubleKeyFrame KeyTime="0:0:0.625" Value="40.78"/>
                <EasingDoubleKeyFrame KeyTime="0:0:0.75" Value="29.343"/>
                <EasingDoubleKeyFrame KeyTime="0:0:0.875" Value="17.796"/>
                <EasingDoubleKeyFrame KeyTime="0:0:1" Value="6.083"/>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)" Storyboard.TargetName="Textures_BMW_M2_23_TachNeedle_png">
                <EasingDoubleKeyFrame KeyTime="0" Value="-0.812"/>
                <EasingDoubleKeyFrame KeyTime="0:0:0.125" Value="4.97625"/>
                <EasingDoubleKeyFrame KeyTime="0:0:0.25" Value="19.2025"/>
                <EasingDoubleKeyFrame KeyTime="0:0:0.375" Value="33.42875"/>
                <EasingDoubleKeyFrame KeyTime="0:0:0.5" Value="47.655"/>
                <EasingDoubleKeyFrame KeyTime="0:0:0.625" Value="61.88125"/>
                <EasingDoubleKeyFrame KeyTime="0:0:0.75" Value="76.1075"/>
                <EasingDoubleKeyFrame KeyTime="0:0:0.875" Value="90.333750000000009"/>
                <EasingDoubleKeyFrame KeyTime="0:0:1" Value="104.56"/>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)" Storyboard.TargetName="Textures_BMW_M2_23_TachNeedle_png">
                <EasingDoubleKeyFrame KeyTime="0" Value="1.333"/>
                <EasingDoubleKeyFrame KeyTime="0:0:0.125" Value="-9.3440000000000012"/>
                <EasingDoubleKeyFrame KeyTime="0:0:0.25" Value="-33.688"/>
                <EasingDoubleKeyFrame KeyTime="0:0:0.375" Value="-58.032000000000004"/>
                <EasingDoubleKeyFrame KeyTime="0:0:0.5" Value="-82.376"/>
                <EasingDoubleKeyFrame KeyTime="0:0:0.625" Value="-106.72"/>
                <EasingDoubleKeyFrame KeyTime="0:0:0.75" Value="-131.064"/>
                <EasingDoubleKeyFrame KeyTime="0:0:0.875" Value="-155.40800000000002"/>
                <EasingDoubleKeyFrame KeyTime="0:0:1" Value="-179.752"/>
            </DoubleAnimationUsingKeyFrames>
        </Storyboard>
        <Storyboard x:Key="FuelGauge"/>

    </Page.Resources>
    <Page.Triggers>
        <EventTrigger RoutedEvent="FrameworkElement.Loaded" SourceName="LayoutRoot">
            <BeginStoryboard Storyboard="{StaticResource Fuel Gauge}"/>
            <BeginStoryboard x:Name="Gear_Analog_BeginStoryboard" Storyboard="{StaticResource Gear Analog}"/>
            <BeginStoryboard Storyboard="{StaticResource Tach}"/>
            <BeginStoryboard Storyboard="{StaticResource FuelGauge}"/>
        </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"/>
        <Image x:Name="Textures_BMW_M2_23_FuelFillBG_png" Height="130" Source="game:/media/cars/BMW_M2_23/UI/Textures/BMW_M2_23_FuelFillBG.png" Stretch="Fill" Width="106" RenderTransformOrigin="0.5,0.5" Canvas.Left="363" Canvas.Top="166">
            <Image.RenderTransform>
                <TransformGroup>
                    <ScaleTransform ScaleX="0.7" ScaleY="0.7"/>
                    <SkewTransform/>
                    <RotateTransform/>
                    <TranslateTransform/>
                </TransformGroup>
            </Image.RenderTransform>
        </Image>
        <Image x:Name="Textures_BMW_M2_23_FuelFill_png" Height="130" Source="game:/media/cars/BMW_M2_23/UI/Textures/BMW_M2_23_FuelFill.png" Stretch="Fill" Width="106" RenderTransformOrigin="0.5,0.5" Canvas.Left="360.25" Canvas.Top="172.5">
            <Image.RenderTransform>
                <TransformGroup>
                    <ScaleTransform ScaleX="0.7" ScaleY="0.7"/>
                    <SkewTransform/>
                    <RotateTransform/>
                    <TranslateTransform/>
                </TransformGroup>
            </Image.RenderTransform>
        </Image>
        <Image x:Name="Textures_BMW_i4_22_Driver_png" Height="500" Source="game:/media/cars/BMW_M2_23/UI/Textures/BMW_i4_22_Driver.png" Stretch="Fill" Width="1280" RenderTransformOrigin="0.5,0.5" Canvas.Top="-72">
            <Image.RenderTransform>
                <TransformGroup>
                    <ScaleTransform ScaleY="0.7" ScaleX="0.7"/>
                    <SkewTransform/>
                    <RotateTransform/>
                    <TranslateTransform/>
                </TransformGroup>
            </Image.RenderTransform>
        </Image>
        <Image x:Name="Textures_BMW_M2_23_TachBar_png" Height="290" Source="game:/media/cars/BMW_M2_23/UI/Textures/BMW_M2_23_TachBar.png" Stretch="Fill" Width="250" RenderTransformOrigin="0.5,0.5" Canvas.Left="659.001" Canvas.Top="18.75">
            <Image.RenderTransform>
                <TransformGroup>
                    <ScaleTransform ScaleX="0.7" ScaleY="0.7"/>
                    <SkewTransform/>
                    <RotateTransform/>
                    <TranslateTransform/>
                </TransformGroup>
            </Image.RenderTransform>
        </Image>
        <Image x:Name="Textures_BMW_i4_22_DriverFront_png" Height="497" Source="game:/media/cars/BMW_M2_23/UI/Textures/BMW_i4_22_DriverFront.png" Stretch="Fill" Width="1280" RenderTransformOrigin="0.5,0.5" Canvas.Top="-70">
            <Image.RenderTransform>
                <TransformGroup>
                    <ScaleTransform ScaleX="0.7" ScaleY="0.7"/>
                    <SkewTransform/>
                    <RotateTransform/>
                    <TranslateTransform/>
                </TransformGroup>
            </Image.RenderTransform>
        </Image>
        <Image x:Name="Textures_BMW_i4_22_Center_png" Height="500" Source="game:/media/cars/BMW_M2_23/UI/Textures/BMW_i4_22_Center.png" Stretch="Fill" Width="1280" Canvas.Top="294.333" RenderTransformOrigin="0.5,0.5">
            <Image.RenderTransform>
                <TransformGroup>
                    <ScaleTransform ScaleY="0.7" ScaleX="0.7"/>
                    <SkewTransform/>
                    <RotateTransform/>
                    <TranslateTransform/>
                </TransformGroup>
            </Image.RenderTransform>
        </Image>
        <Image x:Name="Textures_BMW_M2_23_TachNeedle_png" Height="6" Source="game:/media/cars/BMW_M2_23/UI/Textures/BMW_M2_23_TachNeedle.png" Stretch="Fill" Width="94" RenderTransformOrigin="0.5,0.5" Canvas.Left="681.562" Canvas.Top="250">
            <Image.RenderTransform>
                <TransformGroup>
                    <ScaleTransform ScaleX="0.7" ScaleY="0.7"/>
                    <SkewTransform/>
                    <RotateTransform/>
                    <TranslateTransform/>
                </TransformGroup>
            </Image.RenderTransform>
        </Image>
        <local:FastTextBlock x:Name="Text_Gear" Height="85" Text="{Binding Gear}" Canvas.Left="585"   Canvas.Top="110" Width="80" FontFamily="Moire" Foreground="White" FontSize="72" TextAlignment="Center" RenderTransformOrigin="0.5,0.5">
            <local:FastTextBlock.RenderTransform>
                <TransformGroup>
                    <ScaleTransform ScaleX="0.9" ScaleY="0.9"/>
                    <SkewTransform/>
                    <RotateTransform/>
                    <TranslateTransform/>
                </TransformGroup>
            </local:FastTextBlock.RenderTransform>
        </local:FastTextBlock>
        <local:FastTextBlock x:Name="Text_Speed" Height="30" Text="{Binding Speed}" Canvas.Left="552.75"   Canvas.Top="191.75" Width="90.834" FontFamily="Moire" Foreground="White" FontSize="24" TextAlignment="Right" RenderTransformOrigin="0.5,0.5">
            <local:FastTextBlock.RenderTransform>
                <TransformGroup>
                    <ScaleTransform ScaleX="1.2" ScaleY="1.2"/>
                    <SkewTransform/>
                    <RotateTransform/>
                    <TranslateTransform/>
                </TransformGroup>
            </local:FastTextBlock.RenderTransform>
        </local:FastTextBlock>
        <local:FastTextBlock x:Name="Text_ExternalTemp" Text="{Binding Extermal Temp}" Height="15" Canvas.Left="970"   Canvas.Top="295" Width="48.375" FontFamily="Moire" Foreground="#FF6BB4E4" FontSize="14" TextAlignment="Right"/>
        <local:FastTextBlock x:Name="Text_Clock1" Text="{Binding Time}" Height="15" Canvas.Left="285.625"   Canvas.Top="296.56" Width="48.375" FontFamily="Moire" Foreground="#FF6BB4E4" FontSize="14" TextAlignment="Center"/>
        <local:FastTextBlock x:Name="Text_Clock2" Text="{Binding Time}" Height="15" Canvas.Left="1016.625"   Canvas.Top="385" Width="48.375" FontFamily="Moire" Foreground="#FF6BB4E4" FontSize="14" TextAlignment="Right"/>
        <Rectangle x:Name="Start_Up_Mask" Fill="Black" Height="720" Stroke="Black" Width="1280" Opacity="0"/>
        <local:StoryboardController SeekPct="{Binding Tach}" Target="{StaticResource Tach}"/>
        <local:StoryboardController SeekPct="{Binding Fuel}" Target="{StaticResource Fuel Gauge}"/>
    </Canvas>
</Page>