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

    <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="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.X)" Storyboard.TargetName="BMW_X6M_24_Fuel_Fill">
            	<EasingDoubleKeyFrame KeyTime="0" Value="83.333"/>
            	<EasingDoubleKeyFrame KeyTime="0:0:0.1" Value="84.189"/>
            	<EasingDoubleKeyFrame KeyTime="0:0:0.5" Value="84.1886"/>
            	<EasingDoubleKeyFrame KeyTime="0:0:1" Value="91.889"/>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)" Storyboard.TargetName="BMW_X6M_24_Fuel_Fill">
            	<EasingDoubleKeyFrame KeyTime="0" Value="21.445"/>
            	<EasingDoubleKeyFrame KeyTime="0:0:0.1" Value="20.489"/>
            	<EasingDoubleKeyFrame KeyTime="0:0:0.5" Value="0.556"/>
            	<EasingDoubleKeyFrame KeyTime="0:0:1" Value="-24.999"/>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)" Storyboard.TargetName="BMW_X6M_24_Fuel_Fill">
            	<EasingDoubleKeyFrame KeyTime="0" Value="0.375"/>
            	<EasingDoubleKeyFrame KeyTime="0:0:0.1" Value="0.411"/>
            	<EasingDoubleKeyFrame KeyTime="0:0:0.5" Value="1.154"/>
            	<EasingDoubleKeyFrame KeyTime="0:0:1" Value="2.106"/>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)" Storyboard.TargetName="BMW_X6M_24_Fuel_Fill">
            	<EasingDoubleKeyFrame KeyTime="0" Value="1"/>
            	<EasingDoubleKeyFrame KeyTime="0:0:0.1" Value="0.983"/>
            	<EasingDoubleKeyFrame KeyTime="0:0:0.5" Value="0.9832"/>
            	<EasingDoubleKeyFrame KeyTime="0:0:1" Value="0.832"/>
            </DoubleAnimationUsingKeyFrames>
        </Storyboard>
        <Storyboard x:Key="Tach">
            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.VerticalAlignment)" Storyboard.TargetName="BMW_X6M_24_Tach_Fill">
            	<DiscreteObjectKeyFrame KeyTime="0" Value="{x:Static VerticalAlignment.Stretch}"/>
            </ObjectAnimationUsingKeyFrames>
            <PointAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransformOrigin)" Storyboard.TargetName="BMW_X6M_24_Tach_Fill">
            	<EasingPointKeyFrame KeyTime="0" Value="0.5,0"/>
            </PointAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)" Storyboard.TargetName="BMW_X6M_24_Tach_Fill">
            	<EasingDoubleKeyFrame KeyTime="0" Value="320.332"/>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)" Storyboard.TargetName="BMW_X6M_24_Tach_Fill">
            	<EasingDoubleKeyFrame KeyTime="0" Value="180"/>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)" Storyboard.TargetName="BMW_X6M_24_Tach_Fill">
            	<EasingDoubleKeyFrame KeyTime="0" Value="23"/>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.Height)" Storyboard.TargetName="BMW_X6M_24_Tach_Fill">
            	<EasingDoubleKeyFrame KeyTime="0" Value="53.7"/>
            	<EasingDoubleKeyFrame KeyTime="0:0:1" Value="255.7"/>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[1].(SkewTransform.AngleX)" Storyboard.TargetName="BMW_X6M_24_Tach_Fill">
            	<EasingDoubleKeyFrame KeyTime="0" Value="59"/>
            	<EasingDoubleKeyFrame KeyTime="0:0:1" Value="0"/>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[1].(SkewTransform.AngleY)" Storyboard.TargetName="BMW_X6M_24_Tach_Fill">
            	<EasingDoubleKeyFrame KeyTime="0" Value="0"/>
            	<EasingDoubleKeyFrame KeyTime="0:0:1" Value="-1.1"/>
            </DoubleAnimationUsingKeyFrames>
        	<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)" Storyboard.TargetName="BMW_X6M_24_Tach_Line">
        		<EasingDoubleKeyFrame KeyTime="0" Value="0"/>
        		<EasingDoubleKeyFrame KeyTime="0:0:1" Value="111.333"/>
        	</DoubleAnimationUsingKeyFrames>
        	<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)" Storyboard.TargetName="BMW_X6M_24_Tach_Line">
        		<EasingDoubleKeyFrame KeyTime="0" Value="0"/>
        		<EasingDoubleKeyFrame KeyTime="0:0:1" Value="-201.333"/>
        	</DoubleAnimationUsingKeyFrames>
        </Storyboard>

    </Page.Resources>
    <Page.Triggers>
        <EventTrigger RoutedEvent="FrameworkElement.Loaded" SourceName="LayoutRoot">
            <BeginStoryboard Storyboard="{StaticResource Fuel Gauge}"/>
            <BeginStoryboard Storyboard="{StaticResource Tach}"/>
        </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="BMW_X6M_24_Center" Height="277.295" Source="game:/media/cars/BMW_X6M_24/UI/Textures/BMW_X6M_24_Center.png" Stretch="Fill" Width="709.875" Canvas.Top="385" Canvas.Left="242.958"/>
        <Image x:Name="BMW_X6M_24_Main" Height="351.71" Source="game:/media/cars/BMW_X6M_24/UI/Textures/BMW_X6M_24_Main.png" Stretch="Fill" Width="900.375" Canvas.Left="191.125" Opacity="0.995" Canvas.Top="8"/>
        <Image x:Name="BMW_X6M_24_Tach_Fill" Source="game:/media/cars/BMW_X6M_24/UI/Textures/BMW_X6M_24_TachFill.png" Stretch="Fill" Width="363.154" Canvas.Left="544.846" Canvas.Top="19.558" RenderTransformOrigin="0.5,0.5" Height="306.668">
        	<Image.RenderTransform>
        		<TransformGroup>
        			<ScaleTransform/>
        			<SkewTransform/>
        			<RotateTransform Angle="180"/>
        			<TranslateTransform/>
        		</TransformGroup>
        	</Image.RenderTransform>
        </Image>
        <Image x:Name="BMW_X6M_24_Tach_Line" Height="13" Source="game:/media/cars/BMW_X6M_24/UI/Textures/BMW_X6M_24_TachLine.png" Stretch="Fill" Width="110" Canvas.Left="669.333" Canvas.Top="278.667" RenderTransformOrigin="0.5,0.5">
        	<Image.RenderTransform>
        		<TransformGroup>
        			<ScaleTransform/>
        			<SkewTransform/>
        			<RotateTransform/>
        			<TranslateTransform/>
        		</TransformGroup>
        	</Image.RenderTransform>
        </Image>
        <Image x:Name="BMW_X6M_24_Temp_Fill" Height="53.666" Source="game:/media/cars/BMW_X6M_24/UI/Textures/BMW_X6M_24_FuelTempFill.png" Stretch="Fill" Width="101.667" Canvas.Left="799.333" Canvas.Top="257.894"/>
        <Image x:Name="BMW_X6M_24_Fuel_Fill" Height="53.666" Source="game:/media/cars/BMW_X6M_24/UI/Textures/BMW_X6M_24_FuelTempFill.png" Stretch="Fill" Width="101.667" Canvas.Left="799.333" Canvas.Top="257.894" RenderTransformOrigin="0.5,0.5">
        	<Image.RenderTransform>
        		<TransformGroup>
        			<ScaleTransform/>
        			<SkewTransform/>
        			<RotateTransform/>
        			<TranslateTransform/>
        		</TransformGroup>
        	</Image.RenderTransform>
        </Image>
        <Image x:Name="BMW_X6M_24_Overlay" Height="351.71" Source="game:/media/cars/BMW_X6M_24/UI/Textures/BMW_X6M_24_Overlay.png" Stretch="Fill" Width="900.375" Canvas.Left="191.125" Canvas.Top="8"/>
        <local:FastTextBlock x:Name="Text_Gear" Height="85" Text="{Binding Gear}" Canvas.Left="574.741"   Canvas.Top="140.074" Width="85" FontFamily="Moire" Foreground="#FFDBDBDB" FontSize="64" 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="543.417"   Canvas.Top="212.417" 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" Height="24" Canvas.Left="992.667"   Canvas.Top="315.377" Width="48.375" FontFamily="Moire" Foreground="#FFD8DBDD" FontSize="14" TextAlignment="Right"/>
        <local:FastTextBlock x:Name="Text_Clock1" Text="{Binding Time}" Height="15" Canvas.Left="242.958"   Canvas.Top="333.227" Width="48.375" FontFamily="Moire" Foreground="#FFDEDEDE" FontSize="14" TextAlignment="Center"/>
        <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>