<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="DigitalGauge.BMW_M3GTS_10"
	 >
	
    <Page.Resources>
        <Style x:Key="TextBlockStyle" TargetType="{x:Type local:FastTextBlock}">
            <Setter Property="FontFamily" Value="DG5_QuartzMS"/>
            <Setter Property="Foreground" Value="#FFF57670"/>
             
            <Setter Property="TextAlignment" Value="Right"/>
        </Style>
		
		<local:DigitalGaugeConfig x:Key="Config" HasClock="True" HasExternalTemp="True" UseDegreesF="False" UseMPH="False" UsePsi="True" MaxBoost="0" MinBoost="0" MaxSpeed="00" HasAbsLight="False" HasStmLight="False" HasTcsLight="False" HasGAccelX="False" HasGAccelY="False" HasShiftLights="True" HasTextTach="False" HasLapPlaceInfo="False" HasTextBoost="False" HasTextGAccel="False" HasTextOdometer="True" HasTextFuel="False" MaxFuel="00" MinGear="0" MaxGear="0" MaxRpm="9500"></local:DigitalGaugeConfig>
        
		<Storyboard x:Key="Shift Lights Progress">
			<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Block_1_On">
				<DiscreteObjectKeyFrame KeyTime="0" Value="{x:Static Visibility.Hidden}"/>
				<DiscreteObjectKeyFrame KeyTime="0:0:0.633" Value="{x:Static Visibility.Visible}"/>
			</ObjectAnimationUsingKeyFrames>
			<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Block_2_On">
				<DiscreteObjectKeyFrame KeyTime="0" Value="{x:Static Visibility.Hidden}"/>
				<DiscreteObjectKeyFrame KeyTime="0:0:0.683" Value="{x:Static Visibility.Visible}"/>
			</ObjectAnimationUsingKeyFrames>
			<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Block_3_On">
				<DiscreteObjectKeyFrame KeyTime="0" Value="{x:Static Visibility.Hidden}"/>
				<DiscreteObjectKeyFrame KeyTime="0:0:0.733" Value="{x:Static Visibility.Visible}"/>
			</ObjectAnimationUsingKeyFrames>
			<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Block_4_On">
				<DiscreteObjectKeyFrame KeyTime="0" Value="{x:Static Visibility.Hidden}"/>
				<DiscreteObjectKeyFrame KeyTime="0:0:0.783" Value="{x:Static Visibility.Visible}"/>
			</ObjectAnimationUsingKeyFrames>
			<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Block_5_On">
				<DiscreteObjectKeyFrame KeyTime="0" Value="{x:Static Visibility.Hidden}"/>
				<DiscreteObjectKeyFrame KeyTime="0:0:0.85" Value="{x:Static Visibility.Visible}"/>
			</ObjectAnimationUsingKeyFrames>
		</Storyboard>
		<Storyboard x:Key="Shift Lights Flash" RepeatBehavior="Forever"/>
		<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>
	<local:EventFire.FzTriggers>
        <local:EventFireTrigger Event="StartUp" Storyboard="{StaticResource Start Up Animation}"/>
    </local:EventFire.FzTriggers>
	<Page.Triggers>
		<EventTrigger RoutedEvent="FrameworkElement.Loaded" SourceName="LayoutRoot">
			<BeginStoryboard Storyboard="{StaticResource Shift Lights Flash}"/>
		</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" Canvas.Left="0" Canvas.Top="0" Width="1280"/>
        <Image x:Name="Graphics" Height="126" Canvas.Left="528.999" Source="game:/media/cars/BMW_M3GTS_10/UI/Textures/BMW_M5_09_Graphics.png" Stretch="Fill" Canvas.Top="416.002" Width="220"/>
        <Canvas x:Name="Shift_Lights" Height="136" Canvas.Left="277" Canvas.Top="212" Width="728" Background="Black">
        	<Canvas x:Name="ON" Height="195" Canvas.Left="-84" Canvas.Top="-34" Width="918">
        		<Rectangle x:Name="Block_1_On"
            Fill="#FFFF8200" Height="10" Width="4.5" Canvas.Left="464.584" Canvas.Top="327.834" Visibility="Hidden"/>
        		<Rectangle x:Name="Block_2_On"
        			Fill="#FFFF8200" Height="10.747" Width="4.5" Canvas.Left="472.752" Canvas.Top="327.087" Visibility="Hidden"/>
        		<Rectangle x:Name="Block_3_On"
        			Fill="#FFFF8200" Height="11.743" Width="4.5" Canvas.Left="481.252" Canvas.Top="326.091" Visibility="Hidden"/>
        		<Rectangle x:Name="Block_4_On"
        			Fill="#FFFF8200" Height="13.66" Width="4.5" Canvas.Left="490.333" Canvas.Top="324.68" Visibility="Hidden"/>
        		<Rectangle x:Name="Block_5_On"
        			Fill="#FFFF8200" Height="14.814" Width="4.5" Canvas.Left="499.248" Canvas.Top="323.02" Visibility="Hidden"/>
        	</Canvas>
        	<Canvas x:Name="Flashing" Height="195" Canvas.Left="-84" Canvas.Top="-34" Width="918" Visibility="Hidden">
        		<Rectangle x:Name="Block_1_Flash"
        			Fill="#FFFF8200" Height="10" Width="4.5" Canvas.Left="464.584" Canvas.Top="327.834"/>
        		<Rectangle x:Name="Block_2_Flash"
        			Fill="#FFFF8200" Height="10.747" Width="4.5" Canvas.Left="472.752" Canvas.Top="327.087"/>
        		<Rectangle x:Name="Block_3_Flash"
        			Fill="#FFFF8200" Height="11.743" Width="4.5" Canvas.Left="481.252" Canvas.Top="326.091"/>
        		<Rectangle x:Name="Block_4_Flash"
        			Fill="#FFFF8200" Height="13.66" Width="4.5" Canvas.Left="490.333" Canvas.Top="324.68"/>
        		<Rectangle x:Name="Block_5_Flash"
        			Fill="#FFFF8200" Height="14.814" Width="4.5" Canvas.Left="499.248" Canvas.Top="323.02"/>
        	</Canvas>
        	
        </Canvas>
		<Canvas x:Name="Text" Height="720" Width="1280" Canvas.Top="181">
            <local:FastTextBlock x:Name="Text_Gear" Canvas.Left="573.352" Canvas.Top="268.664" Text="{Binding Gear}" Width="120" FontSize="72" Style="{StaticResource TextBlockStyle}" Foreground="#FFFF8200" RenderTransformOrigin="0.5,0.5" TextAlignment="Center" FontFamily="DG1_Arial"/>
            <local:FastTextBlock x:Name="Text_Clock" Canvas.Left="522" Canvas.Top="183.153" Text="{Binding Time}" Width="150" FontSize="24" TextAlignment="Right" Style="{StaticResource TextBlockStyle}" RenderTransformOrigin="0.5,0.5" Foreground="#FFFF8200" FontFamily="DG1_Arial"/>
            <local:FastTextBlock x:Name="Text_External_Temp" Canvas.Left="503.75" Canvas.Top="214.749" Text="{Binding ExternalTemp}" Width="150" FontSize="24" TextAlignment="Right" Style="{StaticResource TextBlockStyle}" RenderTransformOrigin="0.5,0.5" Foreground="#FFFF8200" FontFamily="DG1_Arial"/>
            <local:FastTextBlock x:Name="Text_Odometer" Canvas.Left="561" Canvas.Top="356.707" Text="{Binding Odometer}" Width="150" FontSize="21.333" TextAlignment="Left" Style="{StaticResource TextBlockStyle}" RenderTransformOrigin="0.5,0.5" Foreground="#FFFF8200" FontFamily="DG1_Arial">
            	<local:FastTextBlock.RenderTransform>
            		<TransformGroup>
            			<ScaleTransform ScaleX="0.9"/>
            			<SkewTransform/>
            			<RotateTransform/>
            			<TranslateTransform/>
            		</TransformGroup>
            	</local:FastTextBlock.RenderTransform>
            </local:FastTextBlock>
            <local:FastTextBlock x:Name="Text_Trip_Odo" Canvas.Left="615.25" Canvas.Top="355.707" Text="{Binding TripMeter}" Width="100" FontSize="21.333" TextAlignment="Right" Style="{StaticResource TextBlockStyle}" RenderTransformOrigin="0.5,0.5" Foreground="#FFFF8200" FontFamily="DG1_Arial">
            	<local:FastTextBlock.RenderTransform>
            		<TransformGroup>
            			<ScaleTransform ScaleX="0.9"/>
            			<SkewTransform/>
            			<RotateTransform/>
            			<TranslateTransform/>
            		</TransformGroup>
            	</local:FastTextBlock.RenderTransform>
            </local:FastTextBlock>
            <Image x:Name="Glyph" Height="24" Canvas.Left="655.352" Source="game:/media/cars/BMW_M3GTS_10/UI/Textures/BMW_M5_09_txt_temp.png" Stretch="Fill" Canvas.Top="219" Width="24"/>
		</Canvas>
        <Rectangle x:Name="Start_Up_Mask" Fill="Black" Height="720" Stroke="Black" Width="1280" Canvas.Left="0" Canvas.Top="0" Opacity="0" />

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