<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.MER_E63SAMG_18">
	
    <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" HasTachMem="False" HasClock="True" HasExternalTemp="True" UseDegreesF="True" UseMPH="True" UsePsi="True" MinBoost="0" MaxBoost="22" MaxSpeed="90.82" HasAbsLight="False" HasStmLight="False" HasTcsLight="False" HasGAccelX="False" HasGAccelY="False" HasShiftLights="False" HasTextTach="False" HasLapPlaceInfo="False" HasTextBoost="False" HasTextGAccel="False" HasTextOdometer="True" HasTextFuel="False" MaxFuel="20.0" MinGear="-1" MaxGear="1" MaxRpm="8000.0"></local:DigitalGaugeConfig>
        
		<Storyboard x:Key="Tach">
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)" Storyboard.TargetName="needle">
				<EasingDoubleKeyFrame KeyTime="0:0:0.5" Value="0"/>
			</DoubleAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)" Storyboard.TargetName="needle">
				<EasingDoubleKeyFrame KeyTime="0" Value="-127.621"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.063" Value="-111.796"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.125" Value="-97.293"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.188" Value="-81.607"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.25" Value="-66.671"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.313" Value="-49.266"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.37" Value="-33.518"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.438" Value="-17.046"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.5" Value="0"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.563" Value="17.178"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.625" Value="35.026"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.688" Value="50.676"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.75" Value="67.035"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.813" Value="81.88"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.875" Value="97.556"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.938" Value="113.495"/>
				<EasingDoubleKeyFrame KeyTime="0:0:1" Value="128.52"/>
			</DoubleAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)" Storyboard.TargetName="bar1_fill">
				<EasingDoubleKeyFrame KeyTime="0" Value="0">
					<EasingDoubleKeyFrame.EasingFunction>
						<ExponentialEase EasingMode="EaseIn"/>
					</EasingDoubleKeyFrame.EasingFunction>
				</EasingDoubleKeyFrame>
				<EasingDoubleKeyFrame KeyTime="0:0:0.813" Value="59.572"/>
				<EasingDoubleKeyFrame KeyTime="0:0:1" Value="59.572"/>
			</DoubleAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)" Storyboard.TargetName="bar1_fill">
				<EasingDoubleKeyFrame KeyTime="0" Value="1">
					<EasingDoubleKeyFrame.EasingFunction>
						<ExponentialEase EasingMode="EaseIn"/>
					</EasingDoubleKeyFrame.EasingFunction>
				</EasingDoubleKeyFrame>
				<EasingDoubleKeyFrame KeyTime="0:0:0.813" Value="51.463"/>
				<EasingDoubleKeyFrame KeyTime="0:0:1" Value="51.463"/>
			</DoubleAnimationUsingKeyFrames>
		</Storyboard>
		<Storyboard x:Key="Fuel Gauge">
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)" Storyboard.TargetName="fuel_fill">
				<EasingDoubleKeyFrame KeyTime="0" Value="0.392"/>
				<EasingDoubleKeyFrame KeyTime="0:0:1" Value="37.966"/>
			</DoubleAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)" Storyboard.TargetName="fuel_fill">
				<EasingDoubleKeyFrame KeyTime="0" Value="-0.802"/>
				<EasingDoubleKeyFrame KeyTime="0:0:1" Value="59.312"/>
			</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="Gear Analog">
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)" Storyboard.TargetName="drive_indcator">
				<EasingDoubleKeyFrame KeyTime="0" Value="0"/>
				<EasingDoubleKeyFrame KeyTime="0:0:0.5" Value="19.25"/>
				<EasingDoubleKeyFrame KeyTime="0:0:1" Value="39.667"/>
			</DoubleAnimationUsingKeyFrames>
		</Storyboard>
		<Storyboard x:Key="Boost Analog">
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)" Storyboard.TargetName="bar0_fill">
				<EasingDoubleKeyFrame KeyTime="0" Value="0.624"/>
				<EasingDoubleKeyFrame KeyTime="0:0:1" Value="60.124"/>
			</DoubleAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)" Storyboard.TargetName="bar0_fill">
				<EasingDoubleKeyFrame KeyTime="0" Value="1.128"/>
				<EasingDoubleKeyFrame KeyTime="0:0:1" Value="51.233"/>
			</DoubleAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)" Storyboard.TargetName="bar0_fill">
				<EasingDoubleKeyFrame KeyTime="0" Value="0.931"/>
			</DoubleAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)" Storyboard.TargetName="bar2_fill">
				<EasingDoubleKeyFrame KeyTime="0:0:1" Value="0">
					<EasingDoubleKeyFrame.EasingFunction>
						<QuadraticEase EasingMode="EaseOut"/>
					</EasingDoubleKeyFrame.EasingFunction>
				</EasingDoubleKeyFrame>
			</DoubleAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)" Storyboard.TargetName="bar2_fill">
				<EasingDoubleKeyFrame KeyTime="0" Value="0">
					<EasingDoubleKeyFrame.EasingFunction>
						<QuinticEase EasingMode="EaseIn"/>
					</EasingDoubleKeyFrame.EasingFunction>
				</EasingDoubleKeyFrame>
				<EasingDoubleKeyFrame KeyTime="0:0:1" Value="59.625">
					<EasingDoubleKeyFrame.EasingFunction>
						<QuadraticEase EasingMode="EaseOut"/>
					</EasingDoubleKeyFrame.EasingFunction>
				</EasingDoubleKeyFrame>
			</DoubleAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)" Storyboard.TargetName="bar2_fill">
				<EasingDoubleKeyFrame KeyTime="0" Value="1">
					<EasingDoubleKeyFrame.EasingFunction>
						<QuinticEase EasingMode="EaseIn"/>
					</EasingDoubleKeyFrame.EasingFunction>
				</EasingDoubleKeyFrame>
				<EasingDoubleKeyFrame KeyTime="0:0:1" Value="51.211">
					<EasingDoubleKeyFrame.EasingFunction>
						<QuadraticEase EasingMode="EaseOut"/>
					</EasingDoubleKeyFrame.EasingFunction>
				</EasingDoubleKeyFrame>
			</DoubleAnimationUsingKeyFrames>
		</Storyboard>
	</Page.Resources>
	<Page.Triggers>
		<EventTrigger RoutedEvent="FrameworkElement.Loaded">
			<BeginStoryboard Storyboard="{StaticResource Gear Analog}"/>
			<BeginStoryboard Storyboard="{StaticResource Boost Analog}"/>
		</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_Black" Fill="Black" Height="720" Stroke="Black" Width="1280" Canvas.Left="0" Canvas.Top="0"/>
        <Image x:Name="BG" Height="720" Canvas.Left="0" Source="game:/media/cars/MER_E63SAMG_18/UI/Textures/MER_E63SAMG_18_Graphics.png" Stretch="Fill" Canvas.Top="1" Width="1280" />
        <Canvas x:Name="Tach_Ahnimation" Height="347.5" Canvas.Left="8.188" Canvas.Top="8.875" Width="952.812" RenderTransformOrigin="0.5,0.5" >
        	<Canvas.RenderTransform>
        		<TransformGroup>
        			<ScaleTransform/>
        			<SkewTransform/>
        			<RotateTransform/>
        			<TranslateTransform/>
        		</TransformGroup>
        	</Canvas.RenderTransform>
        	<Image x:Name="needle" Height="306" Canvas.Left="468.477" Source="game:/media/cars/MER_E63SAMG_18/UI/Textures/MER_E63SAMG_18_needle.png" Stretch="Fill" Canvas.Top="17.792" Width="16" RenderTransformOrigin="0.5,0.5">
        		<Image.RenderTransform>
        			<TransformGroup>
        				<ScaleTransform/>
        				<SkewTransform/>
        				<RotateTransform/>
        				<TranslateTransform/>
        			</TransformGroup>
        		</Image.RenderTransform>
        	</Image>
        </Canvas>
		<Image x:Name="tach_overlay" Height="185" Canvas.Left="389.334" Source="game:/media/cars/MER_E63SAMG_18/UI/Textures/MER_E63SAMG_18_tach_overlay.png" Stretch="Fill" Canvas.Top="84.333" Width="192" />
		<Canvas x:Name="Fuel_Animation" Height="18" Canvas.Top="392" Width="121" Canvas.Left="432" >
			<Rectangle x:Name="fuel_fill" Fill="#FFFFA800" Height="6.5" Canvas.Left="-9.376" Canvas.Top="-68.781" Width="3.209" RenderTransformOrigin="0.5,0.5">
				<Rectangle.RenderTransform>
					<TransformGroup>
						<ScaleTransform/>
						<SkewTransform/>
						<RotateTransform/>
						<TranslateTransform/>
					</TransformGroup>
				</Rectangle.RenderTransform>
			</Rectangle>
			<Image x:Name="fuel_bar" Height="9" Canvas.Left="-11" Source="game:/media/cars/MER_E63SAMG_18/UI/Textures/MER_E63SAMG_18_fuel_bar.png" Stretch="Fill" Canvas.Top="-70" Width="125"/>
		</Canvas>
		<Canvas x:Name="Gear_Animation" Height="216" Canvas.Left="816" Canvas.Top="416" Width="312" >
			<Image x:Name="drive_indcator" Height="21" Canvas.Left="-339" Source="game:/media/cars/MER_E63SAMG_18/UI/Textures/MER_E63SAMG_18_drive_mode_box.png" Stretch="Fill" Canvas.Top="-218.416" Width="24" RenderTransformOrigin="0.5,0.5">
				<Image.RenderTransform>
					<TransformGroup>
						<ScaleTransform/>
						<SkewTransform/>
						<RotateTransform/>
						<TranslateTransform/>
					</TransformGroup>
				</Image.RenderTransform>
			</Image>
		</Canvas>
		<Canvas x:Name="Boost_Animation" Height="192" Canvas.Left="32" Canvas.Top="216" Width="432" >
			<Rectangle x:Name="bar0_fill" Fill="#FFB40D20" Height="14.562" Canvas.Left="713.511" Canvas.Top="-113.791" Width="2.375" RenderTransformOrigin="0.5,0.5">
				<Rectangle.RenderTransform>
					<TransformGroup>
						<ScaleTransform/>
						<SkewTransform/>
						<RotateTransform/>
						<TranslateTransform/>
					</TransformGroup>
				</Rectangle.RenderTransform>
			</Rectangle>
			<Image x:Name="bar0" Height="17" Canvas.Left="712.25" Source="game:/media/cars/MER_E63SAMG_18/UI/Textures/MER_E63SAMG_18_lrg_bar.png" Stretch="Fill" Canvas.Top="-114.917" Width="125" />
			<Rectangle x:Name="bar1_fill" Fill="#FFB40D20" Height="14.229" Canvas.Left="713.977" Canvas.Top="-62.58" Width="2.361" RenderTransformOrigin="0.5,0.5">
				<Rectangle.RenderTransform>
					<TransformGroup>
						<ScaleTransform/>
						<SkewTransform/>
						<RotateTransform/>
						<TranslateTransform/>
					</TransformGroup>
				</Rectangle.RenderTransform>
			</Rectangle>
			<Image x:Name="bar1" Height="17" Canvas.Left="712.25" Source="game:/media/cars/MER_E63SAMG_18/UI/Textures/MER_E63SAMG_18_lrg_bar.png" Stretch="Fill" Canvas.Top="-63.917" Width="125" RenderTransformOrigin="0.5,0.5" >
				<Image.RenderTransform>
					<TransformGroup>
						<ScaleTransform/>
						<SkewTransform/>
						<RotateTransform/>
						<TranslateTransform/>
					</TransformGroup>
				</Image.RenderTransform>
			</Image>
			<Rectangle x:Name="bar2_fill" Fill="#FFB40D20" Height="14.562" Canvas.Left="713.844" Canvas.Top="-9.771" Width="2.375" RenderTransformOrigin="0.5,0.5">
				<Rectangle.RenderTransform>
					<TransformGroup>
						<ScaleTransform/>
						<SkewTransform/>
						<RotateTransform/>
						<TranslateTransform/>
					</TransformGroup>
				</Rectangle.RenderTransform>
			</Rectangle>
			<Image x:Name="bar2" Height="17" Canvas.Left="712.25" Source="game:/media/cars/MER_E63SAMG_18/UI/Textures/MER_E63SAMG_18_lrg_bar.png" Stretch="Fill" Canvas.Top="-10.917" Width="125" RenderTransformOrigin="0.5,0.5" >
				<Image.RenderTransform>
					<TransformGroup>
						<ScaleTransform/>
						<SkewTransform/>
						<RotateTransform/>
						<TranslateTransform/>
					</TransformGroup>
				</Image.RenderTransform>
			</Image>
		</Canvas>
		<Canvas x:Name="Text" Height="720" Width="1280" Canvas.Top="0" Canvas.Left="0" RenderTransformOrigin="0.5,0.5" >
			<local:FastTextBlock x:Name="Text_Speed" Canvas.Left="362.707" Canvas.Top="145.12" Text="{Binding Speed}" Width="250" FontSize="50.667" Style="{StaticResource TextBlockStyle}" TextAlignment="Center" RenderTransformOrigin="0.5,0.5" FontFamily="Moire" Foreground="White">
				<local:FastTextBlock.RenderTransform>
					<TransformGroup>
						<ScaleTransform ScaleX="0.85"/>
						<SkewTransform AngleX="-10"/>
						<RotateTransform/>
						<TranslateTransform/>
					</TransformGroup>
				</local:FastTextBlock.RenderTransform>
			</local:FastTextBlock>
			<local:FastTextBlock x:Name="Text_Temperature" Canvas.Left="190.676" Canvas.Top="24.5" Text="{Binding ExternalTemp}" Width="41.667" FontSize="20" Style="{StaticResource TextBlockStyle}" RenderTransformOrigin="0.5,0.5" Foreground="White" FontFamily="DG1_Arial" Opacity="0.995"/>
			<local:FastTextBlock x:Name="Text_Time" Canvas.Left="682" Canvas.Top="24.5" Text="{Binding Time}" Width="100" FontSize="20" Style="{StaticResource TextBlockStyle}" RenderTransformOrigin="0.5,0.5" Foreground="White" FontFamily="DG1_Arial" HorizontalAlignment="Center"/>
			<local:FastTextBlock x:Name="Text_Time_Nav" Canvas.Left="312" Canvas.Top="378.5" Text="{Binding Time}" Width="100" FontSize="20" Style="{StaticResource TextBlockStyle}" RenderTransformOrigin="0.5,0.5" Foreground="White" FontFamily="DG1_Arial" HorizontalAlignment="Right"/>
			<local:FastTextBlock x:Name="Text_Oddometer" Canvas.Left="114.753" Canvas.Top="183" Text="{Binding Odometer}" Width="96.334" FontSize="20" Style="{StaticResource TextBlockStyle}" RenderTransformOrigin="0.5,0.5" Foreground="White" FontFamily="DG1_Arial" HorizontalAlignment="Left" TextAlignment="Center"/>
			<local:FastTextBlock x:Name="Text_Tripometer" Canvas.Left="114.753" Canvas.Top="126" Text="{Binding TripMeter}" Width="96.334" FontSize="20" Style="{StaticResource TextBlockStyle}" RenderTransformOrigin="0.5,0.5" Foreground="White" FontFamily="DG1_Arial" HorizontalAlignment="Left" TextAlignment="Center"/>
		</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 BoostAnim}" Target="{StaticResource Boost Analog}"/>
        <local:StoryboardController SeekPct="{Binding Tach}" Target="{StaticResource Tach}"/>
		<local:StoryboardController SeekPct="{Binding AnalogGear}" Target="{StaticResource Gear Analog}"/>
		<local:StoryboardController SeekPct="{Binding Fuel}" Target="{StaticResource Fuel Gauge}"/>
	</Canvas>
</Page>