<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.FER_F430Scuderia_07">
	
    <Page.Resources>
        <Style x:Key="TextBlockStyle" TargetType="{x:Type TextBlock}">
            <Setter Property="FontFamily" Value="Moire"/>
            <Setter Property="Foreground" Value="White"/>
            <Setter Property="TextWrapping" Value="Wrap"/>
            <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="120" HasAbsLight="True" HasStmLight="True" HasTcsLight="True" HasGAccelX="True" HasGAccelY="True" HasShiftLights="True" HasTextTach="True" HasLapPlaceInfo="True" HasTextBoost="True" HasTextGAccel="True" HasTextOdometer="True" HasTextFuel="True" MaxFuel="20" MaxGear="8" MaxRpm="10000"></local:DigitalGaugeConfig>
		<Storyboard x:Key="Fuel Gauge">
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)" Storyboard.TargetName="Fuel_Fill">
				<EasingDoubleKeyFrame KeyTime="0" Value="1"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.1" Value="1.533"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.2" Value="2.129"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.3" Value="2.631"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.4" Value="3.227"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.5" Value="3.823"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.6" Value="4.356"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.7" Value="4.921"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.8" Value="5.517"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.9" Value="6.05"/>
			</DoubleAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)" Storyboard.TargetName="Fuel_Fill">
				<EasingDoubleKeyFrame KeyTime="0" Value="0"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.1" Value="5.667"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.2" Value="12"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.3" Value="17.333"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.4" Value="23.666"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.5" Value="29.999"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.6" Value="35.666"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.7" Value="41.666"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.8" Value="47.999"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.9" Value="53.666"/>
			</DoubleAnimationUsingKeyFrames>
		</Storyboard>
		<Storyboard x:Key="Shift Lights Progress">
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="Red_Light_1_On">
				<EasingDoubleKeyFrame KeyTime="0:0:0.575" Value="0"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.6" Value="1"/>
			</DoubleAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="Red_Light_2_On">
				<EasingDoubleKeyFrame KeyTime="0:0:0.625" Value="0"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.65" Value="1"/>
			</DoubleAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="Red_Light_3_On">
				<EasingDoubleKeyFrame KeyTime="0:0:0.675" Value="0"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.7" Value="1"/>
			</DoubleAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="Red_Light_4_On">
				<EasingDoubleKeyFrame KeyTime="0:0:0.725" Value="0"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.75" Value="1"/>
			</DoubleAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="Red_Light_5_On">
				<EasingDoubleKeyFrame KeyTime="0:0:0.775" Value="0"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.8" Value="1"/>
			</DoubleAnimationUsingKeyFrames>
			<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="FLASHING">
				<DiscreteObjectKeyFrame KeyTime="0" Value="{x:Static Visibility.Hidden}"/>
				<DiscreteObjectKeyFrame KeyTime="0:0:0.825" Value="{x:Static Visibility.Visible}"/>
			</ObjectAnimationUsingKeyFrames>
			<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Red_Light_1_On">
				<DiscreteObjectKeyFrame KeyTime="0:0:0.6" Value="{x:Static Visibility.Visible}"/>
				<DiscreteObjectKeyFrame KeyTime="0:0:0.825" Value="{x:Static Visibility.Hidden}"/>
			</ObjectAnimationUsingKeyFrames>
			<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Red_Light_2_On">
				<DiscreteObjectKeyFrame KeyTime="0:0:0.65" Value="{x:Static Visibility.Visible}"/>
				<DiscreteObjectKeyFrame KeyTime="0:0:0.825" Value="{x:Static Visibility.Hidden}"/>
			</ObjectAnimationUsingKeyFrames>
			<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Red_Light_3_On">
				<DiscreteObjectKeyFrame KeyTime="0:0:0.7" Value="{x:Static Visibility.Visible}"/>
				<DiscreteObjectKeyFrame KeyTime="0:0:0.825" Value="{x:Static Visibility.Hidden}"/>
			</ObjectAnimationUsingKeyFrames>
			<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Red_Light_4_On">
				<DiscreteObjectKeyFrame KeyTime="0:0:0.75" Value="{x:Static Visibility.Visible}"/>
				<DiscreteObjectKeyFrame KeyTime="0:0:0.825" Value="{x:Static Visibility.Hidden}"/>
			</ObjectAnimationUsingKeyFrames>
			<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Red_Light_5_On">
				<DiscreteObjectKeyFrame KeyTime="0:0:0.8" Value="{x:Static Visibility.Visible}"/>
				<DiscreteObjectKeyFrame KeyTime="0:0:0.825" Value="{x:Static Visibility.Hidden}"/>
			</ObjectAnimationUsingKeyFrames>
		</Storyboard>
		<Storyboard x:Key="Shift Lights Flash" RepeatBehavior="Forever">
			<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Red_Light_1_Flashing">
				<DiscreteObjectKeyFrame KeyTime="0" Value="{x:Static Visibility.Visible}"/>
				<DiscreteObjectKeyFrame KeyTime="0:0:0.25" Value="{x:Static Visibility.Hidden}"/>
				<DiscreteObjectKeyFrame KeyTime="0:0:0.5" Value="{x:Static Visibility.Hidden}"/>
			</ObjectAnimationUsingKeyFrames>
			<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Red_Light_2_Flashing">
				<DiscreteObjectKeyFrame KeyTime="0" Value="{x:Static Visibility.Visible}"/>
				<DiscreteObjectKeyFrame KeyTime="0:0:0.25" Value="{x:Static Visibility.Hidden}"/>
				<DiscreteObjectKeyFrame KeyTime="0:0:0.5" Value="{x:Static Visibility.Hidden}"/>
			</ObjectAnimationUsingKeyFrames>
			<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Red_Light_3_Flashing">
				<DiscreteObjectKeyFrame KeyTime="0" Value="{x:Static Visibility.Visible}"/>
				<DiscreteObjectKeyFrame KeyTime="0:0:0.25" Value="{x:Static Visibility.Hidden}"/>
				<DiscreteObjectKeyFrame KeyTime="0:0:0.5" Value="{x:Static Visibility.Hidden}"/>
			</ObjectAnimationUsingKeyFrames>
			<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Red_Light_4_Flashing">
				<DiscreteObjectKeyFrame KeyTime="0" Value="{x:Static Visibility.Visible}"/>
				<DiscreteObjectKeyFrame KeyTime="0:0:0.25" Value="{x:Static Visibility.Hidden}"/>
				<DiscreteObjectKeyFrame KeyTime="0:0:0.5" Value="{x:Static Visibility.Hidden}"/>
			</ObjectAnimationUsingKeyFrames>
			<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Red_Light_5_Flashing">
				<DiscreteObjectKeyFrame KeyTime="0" Value="{x:Static Visibility.Visible}"/>
				<DiscreteObjectKeyFrame KeyTime="0:0:0.25" Value="{x:Static Visibility.Hidden}"/>
				<DiscreteObjectKeyFrame KeyTime="0:0:0.5" Value="{x:Static Visibility.Hidden}"/>
			</ObjectAnimationUsingKeyFrames>
		</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>
	</Page.Resources>
	<Page.Triggers>
		<EventTrigger RoutedEvent="FrameworkElement.Loaded" SourceName="LayoutRoot">
			<BeginStoryboard Storyboard="{StaticResource Shift Lights Flash}"/>
		</EventTrigger>
	</Page.Triggers>
	
    <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_Grey" Fill="#FF393939" Height="720" Width="1280" Canvas.Left="0" Canvas.Top="0"/>
        <Rectangle x:Name="Background_Gear_Black" Fill="Black" Height="128" Canvas.Left="598" Canvas.Top="240" Width="98"/>
        <Rectangle x:Name="Background_Shift_Lights" Fill="Black" Height="200" Width="700" Canvas.Left="289.5" Canvas.Top="20"/>
        <Rectangle x:Name="Background_Odometer" Fill="Black" Height="50" Width="180" Canvas.Left="980" Canvas.Top="352"/>
        <Rectangle x:Name="Background_Clock" Fill="#FF70353B" Height="128" Width="128" Canvas.Left="669" Canvas.Top="442"/>
        <Image x:Name="Background_Gear" Height="128" Canvas.Left="617" Source="game:/media/cars/FER_F430Scuderia_07/UI/Textures/FER_F430Scuderia_07_GearBckgd.png" Stretch="Fill" Canvas.Top="240" Width="64"/>
        <Canvas x:Name="Fuel" Canvas.Left="1072.999" Canvas.Top="587.666" Height="150" Width="200">
            <Rectangle x:Name="Background_Fuel" Fill="Black" Height="96.5" Canvas.Left="22" Canvas.Top="27" Width="149"/>
            <Rectangle x:Name="Fuel_Fill" Fill="#FF8AC90D" Height="96.5" Canvas.Left="22" Canvas.Top="27" Width="21.25" RenderTransformOrigin="0.5,0.5">
            	<Rectangle.RenderTransform>
            		<TransformGroup>
            			<ScaleTransform/>
            			<SkewTransform/>
            			<RotateTransform/>
            			<TranslateTransform/>
            		</TransformGroup>
            	</Rectangle.RenderTransform>
            </Rectangle>
            <Rectangle x:Name="Graphics_Fuel" Height="110" Canvas.Left="17.329" Canvas.Top="19.664" Width="160">
            	<Rectangle.OpacityMask>
            		<ImageBrush ImageSource="game:/media/cars/FER_F430Scuderia_07/UI/Textures/FER_F430Scuderia_07_FuelGraphics.png"/>
            	</Rectangle.OpacityMask>
            	<Rectangle.Fill>
            		<ImageBrush ImageSource="game:/media/cars/FER_F430Scuderia_07/UI/Textures/FER_F430Scuderia_07_FuelGraphics.png"/>
            	</Rectangle.Fill>
            </Rectangle>
		</Canvas>
		<Canvas x:Name="Text" Height="720" Width="1280">
            <TextBlock x:Name="Text_Clock" Canvas.Left="662.164" Canvas.Top="509.5" Text="{Binding Time}" FontSize="24" Style="{StaticResource TextBlockStyle}" Width="110" FontFamily="DG4_PF_Ronda_Seven" Foreground="#FFD29E64" RenderTransformOrigin="0.5,0.5">
            	<TextBlock.RenderTransform>
            		<TransformGroup>
            			<ScaleTransform/>
            			<SkewTransform/>
            			<RotateTransform/>
            			<TranslateTransform/>
            		</TransformGroup>
            	</TextBlock.RenderTransform>
            </TextBlock>
            <TextBlock x:Name="Text_Gear" Canvas.Left="601.192" Canvas.Top="273.209" Text="{Binding Gear}" Width="60" FontSize="42.667" Style="{StaticResource TextBlockStyle}" Foreground="#FFEE091E" FontFamily="DG2_LCD"/>
            <TextBlock x:Name="Text_Odometer" Canvas.Left="979.192" Canvas.Top="366.5" Text="{Binding Odometer}" Width="140" FontSize="26.667" Style="{StaticResource TextBlockStyle}" FontFamily="DG2_LCD" Foreground="#FF8ED308"/>
		</Canvas>
        <Canvas x:Name="Shift_Lights" Height="87" Width="600" Canvas.Left="340" Canvas.Top="64.835">
        	<Canvas x:Name="OFF" Height="87" Width="600">
        		<Image x:Name="Red_Light_1_Off" Height="64" Source="game:/media/cars/FER_F430Scuderia_07/UI/Textures/FER_F430Scuderia_07_RedLight_Off.PNG" Stretch="Fill" Width="64" Canvas.Top="23" Canvas.Left="81" Opacity="0.25"/>
        		<Image x:Name="Red_Light_2_Off" Height="64" Source="game:/media/cars/FER_F430Scuderia_07/UI/Textures/FER_F430Scuderia_07_RedLight_Off.PNG" Stretch="Fill" Width="64" Canvas.Top="10" Canvas.Left="176" Opacity="0.25"/>
        		<Image x:Name="Red_Light_3_Off" Height="64" Source="game:/media/cars/FER_F430Scuderia_07/UI/Textures/FER_F430Scuderia_07_RedLight_Off.PNG" Stretch="Fill" Width="64" Canvas.Top="5" Canvas.Left="268" Opacity="0.25"/>
        		<Image x:Name="Red_Light_4_Off" Height="64" Source="game:/media/cars/FER_F430Scuderia_07/UI/Textures/FER_F430Scuderia_07_RedLight_Off.PNG" Stretch="Fill" Width="64" Canvas.Top="10" Canvas.Left="362" Opacity="0.25"/>
        		<Image x:Name="Red_Light_5_Off" Height="64" Source="game:/media/cars/FER_F430Scuderia_07/UI/Textures/FER_F430Scuderia_07_RedLight_Off.PNG" Stretch="Fill" Width="64" Canvas.Top="23" Canvas.Left="455" Opacity="0.25"/>
        	</Canvas>
        	<Canvas x:Name="ON" Height="87" Width="600">
        		<Image x:Name="Red_Light_1_On" Height="64" Source="game:/media/cars/FER_F430Scuderia_07/UI/Textures/FER_F430Scuderia_07_RedLight_On.PNG" Stretch="Fill" Width="64" Canvas.Top="23" Canvas.Left="81" Opacity="0"/>
        		<Image x:Name="Red_Light_2_On" Height="64" Source="game:/media/cars/FER_F430Scuderia_07/UI/Textures/FER_F430Scuderia_07_RedLight_On.PNG" Stretch="Fill" Width="64" Canvas.Top="10" Canvas.Left="176" Opacity="0"/>
        		<Image x:Name="Red_Light_3_On" Height="64" Source="game:/media/cars/FER_F430Scuderia_07/UI/Textures/FER_F430Scuderia_07_RedLight_On.PNG" Stretch="Fill" Width="64" Canvas.Top="5" Canvas.Left="268" Opacity="0"/>
        		<Image x:Name="Red_Light_4_On" Height="64" Source="game:/media/cars/FER_F430Scuderia_07/UI/Textures/FER_F430Scuderia_07_RedLight_On.PNG" Stretch="Fill" Width="64" Canvas.Top="10" Canvas.Left="362" Opacity="0"/>
        		<Image x:Name="Red_Light_5_On" Height="64" Source="game:/media/cars/FER_F430Scuderia_07/UI/Textures/FER_F430Scuderia_07_RedLight_On.PNG" Stretch="Fill" Width="64" Canvas.Top="23" Canvas.Left="455" Opacity="0"/>
        	</Canvas>
        	<Canvas x:Name="FLASHING" Height="87" Width="600" Visibility="Hidden">
        		<Image x:Name="Red_Light_1_Flashing" Height="64" Source="game:/media/cars/FER_F430Scuderia_07/UI/Textures/FER_F430Scuderia_07_RedLight_On.PNG" Stretch="Fill" Width="64" Canvas.Top="23" Canvas.Left="81"/>
        		<Image x:Name="Red_Light_2_Flashing" Height="64" Source="game:/media/cars/FER_F430Scuderia_07/UI/Textures/FER_F430Scuderia_07_RedLight_On.PNG" Stretch="Fill" Width="64" Canvas.Top="10" Canvas.Left="176"/>
        		<Image x:Name="Red_Light_3_Flashing" Height="64" Source="game:/media/cars/FER_F430Scuderia_07/UI/Textures/FER_F430Scuderia_07_RedLight_On.PNG" Stretch="Fill" Width="64" Canvas.Top="5" Canvas.Left="268"/>
        		<Image x:Name="Red_Light_4_Flashing" Height="64" Source="game:/media/cars/FER_F430Scuderia_07/UI/Textures/FER_F430Scuderia_07_RedLight_On.PNG" Stretch="Fill" Width="64" Canvas.Top="10" Canvas.Left="362"/>
        		<Image x:Name="Red_Light_5_Flashing" Height="64" Source="game:/media/cars/FER_F430Scuderia_07/UI/Textures/FER_F430Scuderia_07_RedLight_On.PNG" Stretch="Fill" Width="64" Canvas.Top="23" Canvas.Left="455"/>
        	</Canvas>
        </Canvas>
		<Image x:Name="Text_Race_Baked" Height="32" Canvas.Left="688" Source="game:/media/cars/FER_F430Scuderia_07/UI/Textures/FER_F430Scuderia_07_txt_Race.png" Stretch="Fill" Canvas.Top="471.5" Width="90"/>
        <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 Shift Lights Progress}"/>
		<local:StoryboardController SeekPct="{Binding Fuel}" Target="{StaticResource Fuel Gauge}"/>
	</Canvas>
</Page>