<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"
    xmlns:ed="http://schemas.microsoft.com/expression/2010/drawing"
    mc:Ignorable="d"
	x:Class="DigitalGauge.TOY_Altezza_99"
	 >

    <Page.Resources>
        <Style x:Key="TextBlockStyle" TargetType="{x:Type local:FastTextBlock}">
            <Setter Property="FontFamily" Value="DG2_LCD"/>
            <Setter Property="Foreground" Value="#FFF52233"/>
             
            <Setter Property="TextAlignment" Value="Right"/>
        </Style>

        <BooleanToVisibilityConverter x:Key="BoolVisConverter" />

        <local:DigitalGaugeConfig x:Key="Config" HasClock="True" HasExternalTemp="True" UseDegreesF="False" UseMPH="True" UsePsi="False" MaxBoost="10" MinBoost="0" MaxSpeed="250" HasAbsLight="False" HasStmLight="False" HasTcsLight="False" HasGAccelX="False" HasGAccelY="False" HasShiftLights="False" HasTextTach="False" HasLapPlaceInfo="True" HasTextBoost="False" HasTextGAccel="False" HasTextOdometer="True" HasTextFuel="False" MaxFuel="55" MaxGear="6" MaxRpm="8000"/>

        <Storyboard x:Key="Shift Lights Progress"/>
        <Storyboard x:Key="Shift Lights Flashing" 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>
        <Storyboard x:Key="Tach"/>
        <Style x:Key="TextBlockStyle2" TargetType="{x:Type local:FastTextBlock}">
            <Setter Property="FontFamily" Value="Moire"/>
            <Setter Property="Foreground" Value="White"/>
             
            <Setter Property="TextAlignment" Value="Right"/>
        </Style>
    </Page.Resources>
    <Page.Triggers>
        <EventTrigger RoutedEvent="FrameworkElement.Loaded" SourceName="LayoutRoot">
            <BeginStoryboard x:Name="Shift_Lights_Flashing_BeginStoryboard" Storyboard="{StaticResource Shift Lights Flashing}"/>
            <BeginStoryboard Storyboard="{StaticResource Tach}"/>
        </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_Grey" Fill="Black" Height="720" Canvas.Left="0" Canvas.Top="0" Width="1280"/>
        <Image x:Name="TOY_Altezza_99_BG" Height="720" Source="game:/media/cars/TOY_Altezza_99/UI/Textures/TOY_Altezza_99 BG.png" Stretch="Fill" Width="1280" Canvas.Left="4" Canvas.Top="2"/>
        <local:FastTextBlock x:Name="Text_Clock" Text="{Binding Time}" Height="104.666" Canvas.Left="751.61"   Canvas.Top="404.776" Width="234.444" FontFamily="DG2_LCD" Foreground="Black" TextAlignment="Center" LineHeight="26.667" FontSize="86.667"/>
        <local:FastTextBlock x:Name="Text_External_Temp" Text="{Binding ExternalTemp}" Height="67.333" Canvas.Left="548.168"   Canvas.Top="411.666" Width="97.555" FontFamily="DG2_LCD" Foreground="Black" TextAlignment="Center" LineHeight="48" FontSize="64"/>
        <local:FastTextBlock x:Name="Text_Odometer" Text="{Binding Odometer}" Height="55.777" Canvas.Left="569.279"   Canvas.Top="232.334" Width="296.666" FontFamily="DG2_LCD" Foreground="Black" TextAlignment="Right" LineHeight="26.667" FontSize="55   "/>
        <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 Tach}"/>
    </Canvas>
</Page>