<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_iX_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="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="7200"></local:DigitalGaugeConfig>

        <Storyboard x:Key="Speed Analog">
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)" Storyboard.TargetName="Textures_BMW_i4_22_SpeedoNeedle_png">
                <EasingDoubleKeyFrame KeyTime="0" Value="201.025"/>
                <EasingDoubleKeyFrame KeyTime="0:0:1" Value="-10.25"/>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)" Storyboard.TargetName="Textures_BMW_i4_22_SpeedoBar_png">
                <EasingDoubleKeyFrame KeyTime="0" Value="-0.001"/>
                <EasingDoubleKeyFrame KeyTime="0:0:1" Value="0.7"/>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)" Storyboard.TargetName="Textures_BMW_i4_22_SpeedoBar_png">
                <EasingDoubleKeyFrame KeyTime="0" Value="105.75"/>
                <EasingDoubleKeyFrame KeyTime="0:0:1" Value="0"/>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)" Storyboard.TargetName="Textures_BMW_i4_22_TachNeedle_png">
                <EasingDoubleKeyFrame KeyTime="0" Value="136.853"/>
                <EasingDoubleKeyFrame KeyTime="0:0:0.025" Value="-10"/>
                <EasingDoubleKeyFrame KeyTime="0:0:0.7" Value="-10"/>
                <EasingDoubleKeyFrame KeyTime="0:0:1" Value="32.957"/>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)" Storyboard.TargetName="Textures_BMW_i4_22_TachBar_png">
                <EasingDoubleKeyFrame KeyTime="0" Value="0.212"/>
                <EasingDoubleKeyFrame KeyTime="0:0:0.025" Value="0.7"/>
                <EasingDoubleKeyFrame KeyTime="0:0:0.7" Value="0.7"/>
                <EasingDoubleKeyFrame KeyTime="0:0:1" Value="0.557"/>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)" Storyboard.TargetName="Textures_BMW_i4_22_TachBar_png">
                <EasingDoubleKeyFrame KeyTime="0" Value="73.833"/>
                <EasingDoubleKeyFrame KeyTime="0:0:0.025" Value="0"/>
                <EasingDoubleKeyFrame KeyTime="0:0:0.7" Value="0"/>
                <EasingDoubleKeyFrame KeyTime="0:0:1" Value="21.583"/>
            </DoubleAnimationUsingKeyFrames>
        </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"/>
        <Storyboard x:Key="Gear Analog">
            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Textures_BMW_i4_22_GearD_png">
                <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="Textures_BMW_i4_22_GearN_png">
                <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="Textures_BMW_i4_22_GearR_png">
                <DiscreteObjectKeyFrame KeyTime="0" Value="{x:Static Visibility.Visible}"/>
                <DiscreteObjectKeyFrame KeyTime="0:0:0.5" Value="{x:Static Visibility.Hidden}"/>
            </ObjectAnimationUsingKeyFrames>
        </Storyboard>

    </Page.Resources>
    <Page.Triggers>
        <EventTrigger RoutedEvent="FrameworkElement.Loaded" SourceName="LayoutRoot">
            <BeginStoryboard Storyboard="{StaticResource Fuel 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_Black" Fill="Black" Height="720" Width="1280" Canvas.Left="0" Canvas.Top="0"/>
        <Image x:Name="Textures_BMW_i4_22_DriverBG_png" Height="500" Source="game:/media/cars/BMW_iX_22/UI/Textures/BMW_i4_22_DriverBG.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>
        <Canvas x:Name="Speedo" Height="302" Canvas.Left="151.5" Canvas.Top="-42.3" Width="270">
            <Image x:Name="Textures_BMW_i4_22_TachBar_png" Height="302" Source="game:/media/cars/BMW_iX_22/UI/Textures/BMW_i4_22_TachBar.png" Stretch="Fill" Width="178" RenderTransformOrigin="0.5,0.5" Canvas.Left="565.25" Canvas.Top="67.3">
                <Image.RenderTransform>
                    <TransformGroup>
                        <ScaleTransform ScaleY="0.7" ScaleX="0.7"/>
                        <SkewTransform/>
                        <RotateTransform/>
                        <TranslateTransform/>
                    </TransformGroup>
                </Image.RenderTransform>
            </Image>
            <Image x:Name="Textures_BMW_i4_22_TachNeedle_png" Height="100" Source="game:/media/cars/BMW_iX_22/UI/Textures/BMW_i4_22_TachNeedle.png" Stretch="Fill" Width="270" RenderTransformOrigin="0.5,0.5" Canvas.Top="72.3" Canvas.Left="519.5">
                <Image.RenderTransform>
                    <TransformGroup>
                        <ScaleTransform ScaleY="0.7" ScaleX="0.7"/>
                        <SkewTransform/>
                        <RotateTransform/>
                        <TranslateTransform/>
                    </TransformGroup>
                </Image.RenderTransform>
            </Image>
            <Image x:Name="Textures_BMW_i4_22_SpeedoBar_png" Height="302" Source="game:/media/cars/BMW_iX_22/UI/Textures/BMW_i4_22_TachBar.png" Stretch="Fill" Width="178" RenderTransformOrigin="0.5,0.5" Canvas.Left="233" Canvas.Top="67.3">
                <Image.RenderTransform>
                    <TransformGroup>
                        <ScaleTransform ScaleY="0.7" ScaleX="0.7"/>
                        <SkewTransform/>
                        <RotateTransform/>
                        <TranslateTransform/>
                    </TransformGroup>
                </Image.RenderTransform>
            </Image>
            <Image x:Name="Textures_BMW_i4_22_SpeedoNeedle_png" Height="100" Source="game:/media/cars/BMW_iX_22/UI/Textures/BMW_i4_22_TachNeedle.png" Stretch="Fill" Width="270" RenderTransformOrigin="0.5,0.5" Canvas.Top="72.3" Canvas.Left="187.25">
                <Image.RenderTransform>
                    <TransformGroup>
                        <ScaleTransform ScaleY="0.7" ScaleX="0.7"/>
                        <SkewTransform/>
                        <RotateTransform/>
                        <TranslateTransform/>
                    </TransformGroup>
                </Image.RenderTransform>
            </Image>
        </Canvas>
        <Image x:Name="Textures_BMW_i4_22_Driver_png" Height="500" Source="game:/media/cars/BMW_iX_22/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_i4_22_Center_png" Height="500" Source="game:/media/cars/BMW_iX_22/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>
        <Canvas x:Name="Gears" Height="28" Canvas.Left="629.25" Canvas.Top="249.75" Width="22">
            <Image x:Name="Textures_BMW_i4_22_GearD_png" Height="28" Source="game:/media/cars/BMW_iX_22/UI/Textures/BMW_i4_22_GearD.png" Stretch="Fill" Width="22" RenderTransformOrigin="0.5,0.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_GearN_png" Height="28" Source="game:/media/cars/BMW_iX_22/UI/Textures/BMW_i4_22_GearN.png" Stretch="Fill" Width="22" RenderTransformOrigin="0.5,0.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_GearR_png" Height="28" Source="game:/media/cars/BMW_iX_22/UI/Textures/BMW_i4_22_GearR.png" Stretch="Fill" Width="22" RenderTransformOrigin="0.5,0.5">
                <Image.RenderTransform>
                    <TransformGroup>
                        <ScaleTransform ScaleX="0.7" ScaleY="0.7"/>
                        <SkewTransform/>
                        <RotateTransform/>
                        <TranslateTransform/>
                    </TransformGroup>
                </Image.RenderTransform>
            </Image>
        </Canvas>
        <local:FastTextBlock x:Name="Text_Clock1" Text="{Binding Time}" Height="16.125" Canvas.Left="380"   Canvas.Top="295" Width="63.125" FontFamily="DG1_Arial" Foreground="White" FontSize="14" TextAlignment="Right"/>
        <local:FastTextBlock x:Name="Text_Clock2" Text="{Binding Time}" Height="16.125" Canvas.Left="990"   Canvas.Top="383.875" Width="63.125" FontFamily="DG1_Arial" Foreground="White" FontSize="14" TextAlignment="Right"/>
        <local:FastTextBlock x:Name="Text_External_Temp" Text="{Binding ExternalTemp}" Height="16.125" Canvas.Left="795.75"   Canvas.Top="295" Width="63.125" FontFamily="DG1_Arial" Foreground="White" FontSize="14" TextAlignment="Right"/>
        <local:FastTextBlock x:Name="Text_Speed" Text="{Binding Speed}" Height="75" Canvas.Left="562.004"   Canvas.Top="118.006" Width="155" FontFamily="DG1_Arial" TextAlignment="Center" Foreground="White" FontSize="72"/>
        <Rectangle x:Name="Start_Up_Mask" Fill="Black" Height="720" Stroke="Black" Width="1280" Opacity="0"/>
        <local:StoryboardController SeekPct="{Binding AnalogSpeed}" Target="{StaticResource Speed Analog}"/>
        <local:StoryboardController SeekPct="{Binding AnalogGear}" Target="{StaticResource Gear Analog}"/>
    </Canvas>
</Page>