<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.KTM_Xbow_13">
	
    <Page.Resources>
        <Style x:Key="TextBlockStyle" TargetType="{x:Type TextBlock}">
            <Setter Property="FontFamily" Value="DG2_LCD"/>
            <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="False" HasStmLight="False" HasTcsLight="False" HasGAccelX="False" HasGAccelY="False" HasShiftLights="True" HasTextTach="True" HasLapPlaceInfo="True" HasTextBoost="False" HasTextGAccel="False" HasTextOdometer="False" HasTextFuel="False" MaxFuel="20" MaxGear="8" MaxRpm="8500"></local:DigitalGaugeConfig>
        
		<Storyboard x:Key="Tach">
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)" Storyboard.TargetName="Tach_Slider_Body">
				<EasingDoubleKeyFrame KeyTime="0" Value="0"/>
				<EasingDoubleKeyFrame KeyTime="0:0:1" Value="568.284"/>
			</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="Shift Lights Progress">
			<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Red_On">
				<DiscreteObjectKeyFrame KeyTime="0" Value="{x:Static Visibility.Hidden}"/>
				<DiscreteObjectKeyFrame KeyTime="0:0:0.75" Value="{x:Static Visibility.Visible}"/>
				<DiscreteObjectKeyFrame KeyTime="0:0:0.767" Value="{x:Static Visibility.Hidden}"/>
			</ObjectAnimationUsingKeyFrames>
			<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="FLASHING">
				<DiscreteObjectKeyFrame KeyTime="0" Value="{x:Static Visibility.Hidden}"/>
				<DiscreteObjectKeyFrame KeyTime="0:0:0.767" Value="{x:Static Visibility.Visible}"/>
			</ObjectAnimationUsingKeyFrames>
		</Storyboard>
		<Storyboard x:Key="Shift Lights Flash" RepeatBehavior="Forever">
			<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Red_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>
	</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>
        <Rectangle x:Name="Background_Grey" Fill="#FFFB642B" Height="720" Width="1280" Canvas.Left="0" Canvas.Top="0"/>

        <Canvas x:Name="Tach" Canvas.Left="18.667" Canvas.Top="93.5" Height="557.5" Width="1240">
        	<Rectangle x:Name="Tach_Base" Fill="#FF612711" Height="182.667" Canvas.Left="307.002" Canvas.Top="65.995" Width="597.666"/>
		
		
        	<Canvas x:Name="Tach_Slider_Body" Height="110" Canvas.Left="228.612" Canvas.Top="67.287" Width="900" RenderTransformOrigin="0.5,0.5">
        		<Canvas.RenderTransform>
        			<TransformGroup>
        				<ScaleTransform/>
        				<SkewTransform/>
        				<RotateTransform/>
        				<TranslateTransform/>
        			</TransformGroup>
        		</Canvas.RenderTransform>
        		<Image x:Name="Tach_Gradient" Height="110" Source="game:/media/cars/KTM_Xbow_13/UI/Textures/KTM_Xbow_13_Tach_Gradient.png" Stretch="Fill" Width="188"/>
        		<Rectangle x:Name="Tach_Slider_Color" Fill="#FFFB642B" Height="110" Canvas.Left="187.333" Width="550"/>
        	</Canvas>
		
        	<Image x:Name="TachMask" Height="434" Canvas.Left="303" Source="game:/media/cars/KTM_Xbow_13/UI/Textures/KTM_Xbow_13_TachMask.png" Stretch="Fill" Canvas.Top="59" Width="604"/>
		</Canvas>
		<Canvas x:Name="Text" Height="720" Width="1280">
            <TextBlock x:Name="Text_Tach" Canvas.Left="738.5" Canvas.Top="322" Text="{Binding TachText}" Width="170" FontSize="34.667" Style="{StaticResource TextBlockStyle}" Foreground="Black" RenderTransformOrigin="0.5,0.5">
            	<TextBlock.RenderTransform>
            		<TransformGroup>
            			<ScaleTransform ScaleX="1.2"/>
            			<SkewTransform/>
            			<RotateTransform/>
            			<TranslateTransform/>
            		</TransformGroup>
            	</TextBlock.RenderTransform>
            </TextBlock>
			<TextBlock x:Name="Text_Current_Lap" Canvas.Left="760" Canvas.Top="373" Text="{Binding CurLapTime}" Width="150" FontSize="34.667" Style="{StaticResource TextBlockStyle}" Foreground="Black" RenderTransformOrigin="0.5,0.5">
				<TextBlock.RenderTransform>
					<TransformGroup>
						<ScaleTransform ScaleX="1.2"/>
						<SkewTransform/>
						<RotateTransform/>
						<TranslateTransform/>
					</TransformGroup>
				</TextBlock.RenderTransform>
			</TextBlock>
			<TextBlock x:Name="Text_Last_Lap" Canvas.Left="760" Canvas.Top="424" Text="{Binding LastLapTime}" Width="150" FontSize="34.667" Style="{StaticResource TextBlockStyle}" Foreground="Black" RenderTransformOrigin="0.5,0.5">
				<TextBlock.RenderTransform>
					<TransformGroup>
						<ScaleTransform ScaleX="1.2"/>
						<SkewTransform/>
						<RotateTransform/>
						<TranslateTransform/>
					</TransformGroup>
				</TextBlock.RenderTransform>
			</TextBlock>
			<TextBlock x:Name="Text_Best_Lap" Canvas.Left="760" Canvas.Top="474" Text="{Binding BestLapTime}" Width="150" FontSize="34.667" Style="{StaticResource TextBlockStyle}" Foreground="Black" RenderTransformOrigin="0.5,0.5">
				<TextBlock.RenderTransform>
					<TransformGroup>
						<ScaleTransform ScaleX="1.2"/>
						<SkewTransform/>
						<RotateTransform/>
						<TranslateTransform/>
					</TransformGroup>
				</TextBlock.RenderTransform>
			</TextBlock>
		
		
            <TextBlock x:Name="Text_Speed" Canvas.Left="312.5" Canvas.Top="276" Text="{Binding Speed}" Width="220" FontSize="112" Style="{StaticResource TextBlockStyle}" Foreground="Black"/>
			<TextBlock x:Name="Text_Clock" Canvas.Left="382" Canvas.Top="424.5" Text="{Binding Time}" Width="150" FontSize="48" Style="{StaticResource TextBlockStyle}" Foreground="Black"/>
			<TextBlock x:Name="Text_Temperature" Canvas.Left="412" Canvas.Top="508" Text="{Binding ExternalTemp}" Width="120" FontSize="48" Style="{StaticResource TextBlockStyle}" Foreground="Black"/>
			<TextBlock x:Name="Text_Tach_Background" Text="88,888" Width="170" FontSize="34.667" Style="{StaticResource TextBlockStyle}" Foreground="Black" Opacity="0.1" Canvas.Left="738.5" Canvas.Top="322" RenderTransformOrigin="0.5,0.5">
				<TextBlock.RenderTransform>
					<TransformGroup>
						<ScaleTransform ScaleX="1.2"/>
						<SkewTransform/>
						<RotateTransform/>
						<TranslateTransform/>
					</TransformGroup>
				</TextBlock.RenderTransform>
			</TextBlock>
			<TextBlock x:Name="Text_Temp_Background" Canvas.Left="412" Canvas.Top="508" Text="88.8" Width="120" FontSize="48" Style="{StaticResource TextBlockStyle}" Foreground="Black" Opacity="0.1"/>
			<TextBlock x:Name="Text_Current_Background" Canvas.Left="760" Canvas.Top="373" Text="88:88.888" Width="150" FontSize="34.667" Style="{StaticResource TextBlockStyle}" Foreground="Black" Opacity="0.1" RenderTransformOrigin="0.5,0.5">
				<TextBlock.RenderTransform>
					<TransformGroup>
						<ScaleTransform ScaleX="1.2"/>
						<SkewTransform/>
						<RotateTransform/>
						<TranslateTransform/>
					</TransformGroup>
				</TextBlock.RenderTransform>
			</TextBlock>
			<TextBlock x:Name="Text_Clock_Background" Canvas.Left="382" Canvas.Top="424.5" Text="88:88" Width="150" FontSize="48" Style="{StaticResource TextBlockStyle}" Foreground="Black" Opacity="0.1"/>
			<TextBlock x:Name="Text_Last_Background" Canvas.Left="760" Canvas.Top="424" Text="88:88.888" Width="150" FontSize="34.667" Style="{StaticResource TextBlockStyle}" Foreground="Black" Opacity="0.1" RenderTransformOrigin="0.5,0.5">
				<TextBlock.RenderTransform>
					<TransformGroup>
						<ScaleTransform ScaleX="1.2"/>
						<SkewTransform/>
						<RotateTransform/>
						<TranslateTransform/>
					</TransformGroup>
				</TextBlock.RenderTransform>
			</TextBlock>
			<TextBlock x:Name="Text_Best_Background" Canvas.Left="760" Canvas.Top="474" Text="88:88.888" Width="150" FontSize="34.667" Style="{StaticResource TextBlockStyle}" Foreground="Black" Opacity="0.1" RenderTransformOrigin="0.5,0.5">
				<TextBlock.RenderTransform>
					<TransformGroup>
						<ScaleTransform ScaleX="1.2"/>
						<SkewTransform/>
						<RotateTransform/>
						<TranslateTransform/>
					</TransformGroup>
				</TextBlock.RenderTransform>
			</TextBlock>
			<TextBlock x:Name="Text_Speed_Background" Canvas.Left="312.5" Canvas.Top="276" Text="888" Width="220" FontSize="112" Style="{StaticResource TextBlockStyle}" Foreground="Black" Opacity="0.1"/>
		</Canvas>
		<Canvas x:Name="Shift_Lights" Height="100" Canvas.Left="18.667" Canvas.Top="26" Width="105" Background="Black">
			<Canvas x:Name="OFF">
				<Image x:Name="Red_Off" Height="84" Source="game:/media/cars/KTM_Xbow_13/UI/Textures/KTM_Xbow_13_ShiftLight_OFF.PNG" Stretch="Fill" Canvas.Top="8.75" Width="84" Canvas.Left="11.5"/>
			</Canvas>
			<Canvas x:Name="ON">
				<Image x:Name="Red_On" Height="84" Source="game:/media/cars/KTM_Xbow_13/UI/Textures/KTM_Xbow_13_ShiftLight_ON.png" Stretch="Fill" Canvas.Top="8.75" Width="84" Canvas.Left="11.5" Visibility="Hidden"/>
			</Canvas>
			<Canvas x:Name="FLASHING" Visibility="Hidden">
				<Image x:Name="Red_Flashing" Height="84" Source="game:/media/cars/KTM_Xbow_13/UI/Textures/KTM_Xbow_13_ShiftLight_ON.png" Stretch="Fill" Canvas.Top="8.75" Width="84" Canvas.Left="11.5"/>
			</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 Tach}" Target="{StaticResource Shift Lights Progress}"/>
		
	</Canvas>
</Page>