<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.FOR_FiestaST_14"
	DataContext="{Binding RelativeSource={x:Static RelativeSource.Self}}">
	
    <Page.Resources>
        <Style x:Key="TextBlockStyle" TargetType="{x:Type TextBlock}">
            <Setter Property="FontFamily" Value="DG5_QuartzMS"/>
            <Setter Property="Foreground" Value="#FFAEE9FB"/>
            <Setter Property="TextWrapping" Value="NoWrap"/>
            <Setter Property="TextAlignment" Value="Right"/>
        </Style>
		
		<local:DigitalGaugeConfig x:Key="Config" HasClock="False" HasExternalTemp="True" UseDegreesF="True" UseMPH="True" 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="8000.0"></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="Shift Lights Progress">
			<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="FLASHING">
				<DiscreteObjectKeyFrame KeyTime="0" Value="{x:Static Visibility.Hidden}"/>
				<DiscreteObjectKeyFrame KeyTime="0:0:0.852" Value="{x:Static Visibility.Visible}"/>
			</ObjectAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="Shift_Arrow1">
				<EasingDoubleKeyFrame KeyTime="0:0:0.75" Value="0"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.767" Value="1"/>
			</DoubleAnimationUsingKeyFrames>
			<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Shift_Arrow1">
				<DiscreteObjectKeyFrame KeyTime="0:0:0.767" Value="{x:Static Visibility.Visible}"/>
				<DiscreteObjectKeyFrame KeyTime="0:0:0.85" Value="{x:Static Visibility.Hidden}"/>
			</ObjectAnimationUsingKeyFrames>
		</Storyboard>
		<Storyboard x:Key="Shift Lights Flash" RepeatBehavior="Forever">
			<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Shift_Arrow">
				<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.Visible}"/>
			</ObjectAnimationUsingKeyFrames>
		</Storyboard>
	</Page.Resources>
	<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>
        <Canvas x:Name="Text" Height="720" Width="1280" Canvas.Left="0" Canvas.Top="0" Background="Black">
            <TextBlock x:Name="Text_External_Temp" Canvas.Left="493" Canvas.Top="284" Text="{Binding ExternalTemp}" Width="230" FontSize="34.667" Style="{StaticResource TextBlockStyle}" RenderTransformOrigin="0.5,0.5" Foreground="#FF1AFFFF">
            	<TextBlock.RenderTransform>
            		<TransformGroup>
            			<ScaleTransform ScaleX="0.9"/>
            			<SkewTransform/>
            			<RotateTransform/>
            			<TranslateTransform/>
            		</TransformGroup>
            	</TextBlock.RenderTransform>
            </TextBlock>
            <TextBlock x:Name="Text_TripOdo" Canvas.Left="493" Canvas.Top="326" Text="{Binding TripMeter}" Width="230" FontSize="34.667" Style="{StaticResource TextBlockStyle}" RenderTransformOrigin="0.5,0.5" Foreground="#FF1AFFFF">
            	<TextBlock.RenderTransform>
            		<TransformGroup>
            			<ScaleTransform ScaleX="0.9"/>
            			<SkewTransform/>
            			<RotateTransform/>
            			<TranslateTransform/>
            		</TransformGroup>
            	</TextBlock.RenderTransform>
            </TextBlock>
		</Canvas>
        <Image x:Name="Txt_MI" Height="30" Canvas.Left="719" Source="game:/media/cars/FOR_FiestaST_14/UI/Textures/FOR_FiestaST_14_MI.png" Stretch="Fill" Canvas.Top="334" Width="30"/>
        <Image x:Name="Txt_Temperature" Height="30" Canvas.Left="709" Source="game:/media/cars/FOR_FiestaST_14/UI/Textures/FOR_FiestaST_14_Temp.png" Stretch="Fill" Canvas.Top="285" Width="30"/>
        <Canvas x:Name="Shift_Light" Height="126" Canvas.Left="485" Canvas.Top="264" Width="281">
        	<Canvas x:Name="ON" Height="118" Canvas.Left="8" Width="199">
        		<Image x:Name="Shift_Arrow1" Height="30" Canvas.Left="91" Source="game:/media/cars/FOR_FiestaST_14/UI/Textures/FOR_FiestaST_14_Shift.png" Stretch="Fill" Canvas.Top="28" Width="28" Opacity="0"/>
        	</Canvas>
        	<Canvas x:Name="FLASHING" Height="118" Canvas.Left="8" Width="199" Visibility="Hidden">
        		<Image x:Name="Shift_Arrow" Height="30" Canvas.Left="91" Source="game:/media/cars/FOR_FiestaST_14/UI/Textures/FOR_FiestaST_14_Shift.png" Stretch="Fill" Canvas.Top="28" Width="28"/>
        	</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 Shift Lights Progress}"/>
	</Canvas>
</Page>