<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.LEX_LC500_21">

    <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" HasTachMem="False" HasClock="True" HasExternalTemp="True" UseDegreesF="True" UseMPH="True" UsePsi="True" MinBoost="0" MaxBoost="0" MaxSpeed="90.82" 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="00" MinGear="-1" MaxGear="10" MaxRpm="8500.0"></local:DigitalGaugeConfig>

        <Storyboard x:Key="Tach">
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)" Storyboard.TargetName="Textures_LEX_LC500_21_Main_Needle_png">
                <EasingDoubleKeyFrame KeyTime="0" Value="0"/>
                <EasingDoubleKeyFrame KeyTime="0:0:1" Value="256.712"/>
            </DoubleAnimationUsingKeyFrames>
            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Textures_LEX_LC500_21_Main_RLRPM_png">
                <DiscreteObjectKeyFrame KeyTime="0" Value="{x:Static Visibility.Hidden}"/>
                <DiscreteObjectKeyFrame KeyTime="0:0:0.853" Value="{x:Static Visibility.Visible}"/>
            </ObjectAnimationUsingKeyFrames>
        </Storyboard>
        <Storyboard x:Key="Fuel Gauge">
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)" Storyboard.TargetName="Fuel_Mask">
                <EasingDoubleKeyFrame KeyTime="0" Value="1"/>
                <EasingDoubleKeyFrame KeyTime="0:0:1" Value="-0.009"/>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)" Storyboard.TargetName="Fuel_Mask">
                <EasingDoubleKeyFrame KeyTime="0" Value="0"/>
                <EasingDoubleKeyFrame KeyTime="0:0:1" Value="-76"/>
            </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:0.1" Value="1"/>
                <EasingDoubleKeyFrame KeyTime="0:0:0.2" Value="0"/>
            </DoubleAnimationUsingKeyFrames>
            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Start_Up_Mask">
                <DiscreteObjectKeyFrame KeyTime="0:0:0.2" Value="{x:Static Visibility.Visible}"/>
                <DiscreteObjectKeyFrame KeyTime="0:0:0.8" Value="{x:Static Visibility.Hidden}"/>
            </ObjectAnimationUsingKeyFrames>
        </Storyboard>
    </Page.Resources>

    <local:EventFire.FzTriggers>
        <local:EventFireTrigger Event="StartUp" Storyboard="{StaticResource Start Up Animation}"/>
    </local:EventFire.FzTriggers>

    <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" Stroke="Black" Width="1280" Canvas.Left="0" Canvas.Top="0" />
        <Rectangle Fill="#FF252525" Height="36" Canvas.Left="249.5" Width="864.625"/>
        <Rectangle Fill="#FF252525" Height="523" Canvas.Left="1109.125" Width="170.875"/>
        <Rectangle Fill="#FF252525" Height="523" Width="254"/>
        <Image x:Name="Textures_LEX_LC500_21_Center_png" Height="165.977" Source="game:/media/cars/LEX_LC500_21/UI/Textures/LEX_LC500_21_Center.png" Stretch="Fill" Width="398.602" Canvas.Left="871.398" Canvas.Top="544.023" RenderTransformOrigin="0.5,0.5"/>
        <Canvas x:Name="MainDisplayGroup" Height="720" Width="1280" Canvas.Left="182" RenderTransformOrigin="0.5,0.5">
            <Canvas.RenderTransform>
                <TransformGroup>
                    <ScaleTransform ScaleX="0.9" ScaleY="0.9"/>
                    <SkewTransform/>
                    <RotateTransform/>
                    <TranslateTransform/>
                </TransformGroup>
            </Canvas.RenderTransform>
            <Canvas x:Name="Main_Display" Height="720" Width="1280" RenderTransformOrigin="0.5,0.5">
                <Canvas.RenderTransform>
                    <TransformGroup>
                        <ScaleTransform ScaleX="0.75" ScaleY="0.75"/>
                        <SkewTransform/>
                        <RotateTransform/>
                        <TranslateTransform X="-160" Y="-90"/>
                    </TransformGroup>
                </Canvas.RenderTransform>
                <Image x:Name="Textures_LEX_LC500_21_Main_Fuel_png" Height="720" Source="game:/media/cars/LEX_LC500_21/UI/Textures/LEX_LC500_21_Main_Fuel.png" Stretch="Fill" Width="1280"/>
                <Rectangle x:Name="Fuel_Mask" Fill="Black" Height="150.667" Canvas.Left="951.333" Stroke="Black" Canvas.Top="398" Width="116.667" RenderTransformOrigin="0.5,0.5">
                    <Rectangle.RenderTransform>
                        <TransformGroup>
                            <ScaleTransform/>
                            <SkewTransform/>
                            <RotateTransform/>
                            <TranslateTransform/>
                        </TransformGroup>
                    </Rectangle.RenderTransform>
                </Rectangle>
                <Image x:Name="Textures_LEX_LC500_21_Main_Backface_png" Height="720" Source="game:/media/cars/LEX_LC500_21/UI/Textures/LEX_LC500_21_Main_Backface.png" Stretch="Fill" Width="1280"/>
                <Image x:Name="Textures_LEX_LC500_21_Main_png" Height="720" Source="game:/media/cars/LEX_LC500_21/UI/Textures/LEX_LC500_21_Main.png" Stretch="Fill" Width="1280"/>
                <Image x:Name="Textures_LEX_LC500_21_Main_RLRPM_png" Height="720" Source="game:/media/cars/LEX_LC500_21/UI/Textures/LEX_LC500_21_Main_RLRPM.png" Stretch="Fill" Width="1280" Visibility="Hidden"/>
                <Image x:Name="Textures_LEX_LC500_21_Main_Needle_png" Height="250" Source="game:/media/cars/LEX_LC500_21/UI/Textures/LEX_LC500_21_Main_Needle.png" Stretch="Fill" Width="25" Canvas.Left="628" Canvas.Top="382" RenderTransformOrigin="0.48,-0.108">
                    <Image.RenderTransform>
                        <TransformGroup>
                            <ScaleTransform/>
                            <SkewTransform/>
                            <RotateTransform/>
                            <TranslateTransform/>
                        </TransformGroup>
                    </Image.RenderTransform>
                </Image>
            </Canvas>
            <Canvas x:Name="Text" Height="720" Width="1280">
                <local:FastTextBlock x:Name="Text_Speed" Height="42" Text="{Binding Speed}" Canvas.Left="429.666"   Canvas.Top="140.87" Width="101.667" FontFamily="DG1_Arial" Foreground="White" FontSize="40" TextAlignment="Center"/>
                <local:FastTextBlock x:Name="Text_Gear" Height="56" Text="{Binding Gear}" Canvas.Left="453"   Canvas.Top="195.463" Width="56" FontFamily="DG1_Arial" FontSize="42" Foreground="White" TextAlignment="Center"/>
                <local:FastTextBlock x:Name="Text_Odometer" Height="22.5" Text="{Binding Odometer}" Canvas.Left="705"   Canvas.Top="260.5" Width="110.5" Foreground="White" FontFamily="DG1_Arial" FontSize="18" TextAlignment="Right"/>
                <local:FastTextBlock x:Name="Text_External_Temp" Height="23.5" Text="{Binding ExternalTemp}" Canvas.Left="188.5"   Canvas.Top="100.25" Width="51.75" Foreground="White" FontFamily="DG1_Arial" FontSize="20" TextAlignment="Right"/>
                <local:FastTextBlock x:Name="Text_Clock" Height="23.5" Text="{Binding Time}" Canvas.Left="681.834"   Canvas.Top="100.25" Width="73.083" Foreground="White" FontFamily="DG1_Arial" FontSize="20" TextAlignment="Center"/>
            </Canvas>
        </Canvas>
        <Rectangle x:Name="Start_Up_Mask" Fill="Black" Height="668" Stroke="Black" Width="1186" Canvas.Left="58" Canvas.Top="53" Opacity="0"/>

        <!-- Storyboard binding controllers -->
        <local:StoryboardController SeekPct="{Binding Tach}" Target="{StaticResource Tach}"/>
        <local:StoryboardController SeekPct="{Binding Fuel}" Target="{StaticResource Fuel Gauge}"/>
    </Canvas>
</Page>