<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.POR_Panamera_17">
	
    <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" HasClock="True" HasExternalTemp="True" UseDegreesF="False" UseMPH="False" UsePsi="False" MaxBoost="5" MinBoost="-0" MaxSpeed="97.3" HasAbsLight="False" HasStmLight="False" HasTcsLight="False" HasGAccelX="False" HasGAccelY="False" HasShiftLights="False" HasTextTach="False" HasLapPlaceInfo="False" HasTextBoost="True" HasTextGAccel="False" HasTextOdometer="True" HasTextFuel="False" MaxFuel="15" MaxGear="8" MaxRpm="10000"></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="Fuel Gauge">
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)" Storyboard.TargetName="Fuel_Fill_White">
				<EasingDoubleKeyFrame KeyTime="0" Value="-36.684"/>
				<EasingDoubleKeyFrame KeyTime="0:0:1" Value="35.927"/>
			</DoubleAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)" Storyboard.TargetName="Fuel_Fill_Red">
				<EasingDoubleKeyFrame KeyTime="0" Value="-35.69"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.146" Value="-26.082794"/>
			</DoubleAnimationUsingKeyFrames>
		</Storyboard>
		<Storyboard x:Key="Boost Analog">
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)" Storyboard.TargetName="Boost_Fill">
				<EasingDoubleKeyFrame KeyTime="0" Value="-53.663"/>
				<EasingDoubleKeyFrame KeyTime="0:0:1" Value="-125.69"/>
			</DoubleAnimationUsingKeyFrames>
		</Storyboard>
		<Storyboard x:Key="Speedo Analog">
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)" Storyboard.TargetName="Needle">
				<EasingDoubleKeyFrame KeyTime="0" Value="67.325"/>
				<EasingDoubleKeyFrame KeyTime="0:0:1" Value="224.902"/>
			</DoubleAnimationUsingKeyFrames>
		</Storyboard>
	</Page.Resources>
	<Page.Triggers>
		<EventTrigger RoutedEvent="FrameworkElement.Loaded">
			<BeginStoryboard Storyboard="{StaticResource Fuel Gauge}"/>
			<BeginStoryboard Storyboard="{StaticResource Boost Analog}"/>
			<BeginStoryboard Storyboard="{StaticResource Speedo Analog}"/>
		</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="Black" Height="720" Width="1280" Canvas.Left="0" Canvas.Top="0"/>
		<Canvas x:Name="Boost_Animation" Height="240" Canvas.Left="744" Canvas.Top="533" Width="240">
			<Rectangle x:Name="Background" Fill="#FF4E4E63" Height="280" Canvas.Left="16" Canvas.Top="-120" Width="200"/>
			<Rectangle x:Name="Boost_Fill" Fill="#FFBEC2E1" Height="140" Canvas.Left="-25.5" Canvas.Top="-121" Width="140" RenderTransformOrigin="1,1">
				<Rectangle.RenderTransform>
					<TransformGroup>
						<ScaleTransform/>
						<SkewTransform/>
						<RotateTransform Angle="-53.663"/>
						<TranslateTransform/>
					</TransformGroup>
				</Rectangle.RenderTransform>
			</Rectangle>
		</Canvas>
        <Canvas x:Name="Fuel_Animation" Height="393" Canvas.Left="657.5" Canvas.Top="355.5" Width="403">
        	<Rectangle x:Name="Fuel_Fill_White" Fill="#FFBEC2E1" Height="140" Canvas.Left="61" Canvas.Top="57.5" Width="140" RenderTransformOrigin="1,1">
        		<Rectangle.RenderTransform>
        			<TransformGroup>
        				<ScaleTransform/>
        				<SkewTransform/>
        				<RotateTransform Angle="-36.684"/>
        				<TranslateTransform/>
        			</TransformGroup>
        		</Rectangle.RenderTransform>
        	</Rectangle>
        	<Rectangle x:Name="Fuel_Fill_Red" Fill="#FFF72724" Height="140" Canvas.Left="61" Canvas.Top="57.5" Width="140" RenderTransformOrigin="1,1">
        		<Rectangle.RenderTransform>
        			<TransformGroup>
        				<ScaleTransform/>
        				<SkewTransform/>
        				<RotateTransform Angle="-35.69"/>
        				<TranslateTransform/>
        			</TransformGroup>
        		</Rectangle.RenderTransform>
        	</Rectangle>
        	<Rectangle x:Name="Mask_Top" Fill="Black" Height="144" Canvas.Left="62.5" Canvas.Top="-78.5" Width="465"/>
        	<Rectangle x:Name="Mask_Left" Fill="Black" Height="424" Canvas.Left="-81.5" Canvas.Top="-78.5" Width="144"/>
        	<Rectangle x:Name="Mask_Boost" Fill="Black" Height="20.5" Canvas.Left="-34.5" Canvas.Top="344" Width="609"/>
        </Canvas>
		<Image x:Name="Graphics_Left" Height="281" Canvas.Left="108.5" Source="game:/media/cars/POR_Panamera_17/UI/Textures/POR_Panamera_17_Graphics_L.png" Stretch="Fill" Canvas.Top="420" Width="465" Opacity="0.985"/>
		<Image x:Name="Graphics_Right" Height="281" Canvas.Left="720" Source="game:/media/cars/POR_Panamera_17/UI/Textures/POR_Panamera_17_Graphics_R.png" Stretch="Fill" Canvas.Top="420" Width="465"/>
		<Image x:Name="Center_Stack_Badge" Height="261" Canvas.Left="269" Source="game:/media/cars/POR_Panamera_17/UI/Textures/POR_MecanTurbo_15_Badge.png" Stretch="Fill" Width="350" RenderTransformOrigin="0.5,0.5" Canvas.Top="58">
			<Image.RenderTransform>
				<TransformGroup>
					<ScaleTransform ScaleX="0.65" ScaleY="0.65"/>
					<SkewTransform/>
					<RotateTransform/>
					<TranslateTransform/>
				</TransformGroup>
			</Image.RenderTransform>
		</Image>
		<Canvas x:Name="Speedo" Height="290" Canvas.Left="287" Canvas.Top="404" Width="290">
			<Image x:Name="Needle" Height="34" Canvas.Left="145" Source="game:/media/cars/POR_Panamera_17/UI/Textures/POR_Panamera_17_needle.png" Stretch="Fill" Canvas.Top="243.5" Width="5" RenderTransformOrigin="0.5,-2.8">
				<Image.RenderTransform>
					<TransformGroup>
						<ScaleTransform/>
						<SkewTransform/>
						<RotateTransform Angle="67.325"/>
						<TranslateTransform/>
					</TransformGroup>
				</Image.RenderTransform>
			</Image>
		</Canvas>
		<Canvas x:Name="Text" Height="720" Width="1280">
			<local:FastTextBlock x:Name="Text_Odometer" Canvas.Left="357" Canvas.Top="556.5" Text="{Binding Odometer}" Width="150" FontSize="17.333" Style="{StaticResource TextBlockStyle}" FontFamily="Moire" RenderTransformOrigin="0.5,0.5" Foreground="White">
				<local:FastTextBlock.RenderTransform>
					<TransformGroup>
						<ScaleTransform ScaleX="0.95"/>
						<SkewTransform/>
						<RotateTransform/>
						<TranslateTransform/>
					</TransformGroup>
				</local:FastTextBlock.RenderTransform>
			</local:FastTextBlock>
			<local:FastTextBlock x:Name="Text_TripMeter" Canvas.Left="357" Canvas.Top="572" Text="{Binding TripMeter}" Width="150" FontSize="17.333" Style="{StaticResource TextBlockStyle}" FontFamily="Moire" RenderTransformOrigin="0.5,0.5" Foreground="White">
				<local:FastTextBlock.RenderTransform>
					<TransformGroup>
						<ScaleTransform ScaleX="0.95"/>
						<SkewTransform/>
						<RotateTransform/>
						<TranslateTransform/>
					</TransformGroup>
				</local:FastTextBlock.RenderTransform>
			</local:FastTextBlock>
			<local:FastTextBlock x:Name="Text_Clock_Dashboard" Canvas.Left="1018" Canvas.Top="112" Text="{Binding Time}" Width="150" FontSize="34.667" Style="{StaticResource TextBlockStyle}" FontFamily="DG5_QuartzMS" RenderTransformOrigin="0.5,0.5" Foreground="White"/>
			<local:FastTextBlock x:Name="Text_Clock_Gauges" Canvas.Left="978" Canvas.Top="573" Text="{Binding Time}" Width="150" FontSize="30.667" Style="{StaticResource TextBlockStyle}" FontFamily="Moire" RenderTransformOrigin="0.5,0.5" Foreground="White"/>
			<local:FastTextBlock x:Name="Text_External_Temp" Canvas.Left="80" Canvas.Top="569" Text="{Binding ExternalTemp}" Width="150" FontSize="21.333" Style="{StaticResource TextBlockStyle}" FontFamily="Moire" RenderTransformOrigin="0.5,0.5" Foreground="White"/>
			<local:FastTextBlock x:Name="Text_Speed" Canvas.Left="960" Canvas.Top="282.923" Text="{Binding Speed}" Width="200" FontSize="48" Style="{StaticResource TextBlockStyle}" FontFamily="Moire" RenderTransformOrigin="0.5,0.5" Foreground="White">
				<local:FastTextBlock.RenderTransform>
					<TransformGroup>
						<ScaleTransform ScaleX="1.2"/>
						<SkewTransform/>
						<RotateTransform/>
						<TranslateTransform/>
					</TransformGroup>
				</local:FastTextBlock.RenderTransform>
			</local:FastTextBlock>
			<local:FastTextBlock x:Name="Text_Gear" Canvas.Left="1159" Canvas.Top="324.733" Text="{Binding Gear}" Width="120" FontSize="26.667" Style="{StaticResource TextBlockStyle}" FontFamily="Moire" RenderTransformOrigin="0.5,0.5" Foreground="#FFC00319" TextAlignment="Center">
				<local:FastTextBlock.RenderTransform>
					<TransformGroup>
						<ScaleTransform ScaleX="1.1"/>
						<SkewTransform/>
						<RotateTransform/>
						<TranslateTransform/>
					</TransformGroup>
				</local:FastTextBlock.RenderTransform>
			</local:FastTextBlock>
			<Image x:Name="Graphics_Gear" Height="64" Canvas.Left="1181" Source="game:/media/cars/POR_Panamera_17/UI/Textures/POR_Panamera_17_Gears.png" Stretch="Fill" Canvas.Top="296" Width="25"/>
			<local:FastTextBlock x:Name="Text_Boost" Canvas.Left="753.332" Canvas.Top="643.33" Text="{Binding BoostText}" Width="100" FontSize="16" Style="{StaticResource TextBlockStyle}" FontFamily="Moire" RenderTransformOrigin="0.5,0.5" Foreground="White">
				<local:FastTextBlock.RenderTransform>
					<TransformGroup>
						<ScaleTransform ScaleX="1.1"/>
						<SkewTransform/>
						<RotateTransform/>
						<TranslateTransform/>
					</TransformGroup>
				</local:FastTextBlock.RenderTransform>
			</local:FastTextBlock>
		</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 AnalogSpeed}" Target="{StaticResource Speedo Analog}"/>
        <local:StoryboardController SeekPct="{Binding BoostAnim}" Target="{StaticResource Boost Analog}"/>
		<local:StoryboardController SeekPct="{Binding Fuel}" Target="{StaticResource Fuel Gauge}"/>
	</Canvas>
</Page>