<Page xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      xmlns:System="clr-namespace:System;assembly=mscorlib"
      xmlns:local="clr-namespace:ForzaUI;assembly="
      x:Class="ForzaUI.A_Hud"
      x:Name="Page"
      WindowTitle="Page"
      FlowDirection="LeftToRight"
      Style="{StaticResource A_Style_Page_Generic}"
      DataContext="{Binding RelativeSource={x:Static RelativeSource.Self}}">

    <local:UIPageTransitionManager.TransitionManager>
        <local:UIPageTransitionManager Preset="{StaticResource A_UIPageTransitionManagerPreset_Hud}" />
    </local:UIPageTransitionManager.TransitionManager>

    <Grid Style="{StaticResource A_Style_FrameworkElement_FadeOnlyTransition_0}">
        <!-- screen space shadow -->
        <local:FZMaterial Preset="{StaticResource A_FZMaterialPresetScreenShadow_ARUI}" />

        <Grid x:Name="LayoutRoot"
              Style="{StaticResource A_Style_FrameworkElement_LayoutRoot}"
              HorizontalAlignment="Stretch"
              VerticalAlignment="Stretch"
              Height="Auto"
              Width="Auto">
            <Grid x:Name="AdjustableSafeFrame"
                  Margin="{Binding SafeFrameMargin}">

                <!-- HUD Controls -->
                <StackPanel Orientation="Vertical"
                    HorizontalAlignment="Left"
                    VerticalAlignment="Bottom"
                    Margin="0,0,0,349">
                    <local:HUDActivationControl x:Name="HUDStatusActivation"
                        Margin="0,0,0,24"
                        PinnedChallengeHeight="{Binding PinnedChallengeHeight, Mode=OneWayToSource}"/>
                    <Viewbox MinHeight="134"
                        MaxHeight="235"
                        Stretch="Uniform"
                        StretchDirection="DownOnly"
                        HorizontalAlignment="Left"
                        VerticalAlignment="Bottom">
                        <local:HUDPinnedChallengeControl x:Name="HUDStatusPinnedChallenge"
                            Margin="0,0,0,0"
                            local:AttachedRoutedEventCommand.Command="{Binding OnPinnedChallengeSizeChanged, ElementName=HUDStatusActivation, FallbackValue={x:Null}}"
                            local:AttachedRoutedEventCommand.RoutedEvent="FrameworkElement.SizeChanged"/>
                    </Viewbox>
                </StackPanel>

                <!--Always On-->
                <local:HUDAnnaControl x:Name="HUDStatusAnna" />
                <local:HUDSpeedometerControl x:Name="HUDStatusSpeedometer" />
                <local:HUDRadioControl x:Name="HUDStatusRadio" />
                <local:HUDActivityInvitationControl x:Name="HUDStatusActivityInvitation" />

                <local:HUDInfoFeedControl x:Name="HUDStatusInfoFeed" />

                <Decorator DataContext="{Binding DataContext, ElementName=HUDStatusSpeedometer}"
                           Style="{StaticResource A_Style_FrameworkElement_WaitSpinnerPositioner}">
                    <local:HUDWaitSpinnerControl x:Name="HUDStatusWaitSpinner" />
                </Decorator>
                <local:HUDSkillControl x:Name="HUDStatusSkill" />
                <local:HUDSkillTokenControl x:Name="HUDStatusSkillToken"/>
                <local:HUDSkillSongControl x:Name="HUDStatusSkillSong"/>

                <!--SimpleStatusControls-->
                <local:HUDWrongWayControl x:Name="HUDStatusWrongWay"
                                          Margin="0,243,0,0"
                                          VerticalAlignment="Top" />

                <local:HUDEliminatorProgressControl x:Name="HUDStatusEliminatorProgress"
                                                VerticalAlignment="Top"/>

                <!--Race Controls-->
                <StackPanel HorizontalAlignment="Left"
                            VerticalAlignment="Top"
                            Orientation="Vertical">
                  <local:HUDRaceProgressControl x:Name="HUDStatusRaceProgress"
                                                VerticalAlignment="Top"/>
                  <local:HUDInstructionControl x:Name="HUDStatusInstruction"
                                               VerticalAlignment="Top"
                                               Visibility="{Binding IsVisibilityOptionEnabled, Converter={StaticResource A_FZBooleanToVisibilityConverter}}"/>
                </StackPanel>

                <StackPanel>
                    <local:HUDEliminatorCarGradeControl x:Name="HUDStatusEliminatorCarGrade" />
                    <local:HUDMiniLeaderboardControl x:Name="HUDStatusMiniLeaderboard" />
                </StackPanel>

                <!-- Notifications and Transient Controls -->
                <local:HUDMajorNotificationControl x:Name="HUDStatusMajorNotification" />

                <local:HUDBrickChallengeCompletedControl x:Name="HUDStatusBrickChallengeCompleted" />

                <local:HUDRaceVersusControl x:Name="HUDStatusRaceVersus" />

                <local:HUDXPAwardControl x:Name="HUDStatusXPAward"/>

                <!-- Network Controls -->
                <local:HUDNetworkStatusControl x:Name="HUDStatusNetworkStatus"/>

                <local:HUDDriveToEventControl x:Name="HUDStatusNetworkRoadTripDestinationDrive"/>
                <StackPanel VerticalAlignment="Bottom">
                    <local:HUDRaceFinishCountdownControl x:Name="HUDStatusRaceCountdown" />
                    <Decorator Style="{StaticResource A_Style_FrameworkElement_SubtitlesSpaceMaker}" />
                </StackPanel>

                <local:HUDChallengeControl x:Name="HUDStatusChallenge"/>

                <local:HUDTrackChallengeControl x:Name="HUDStatusTrackChallenge" />

                <StackPanel VerticalAlignment="Bottom">
                    <local:HUDMinorNotificationControl x:Name="HUDStatusMinorNotification" />
                    <Decorator Style="{StaticResource A_Style_FrameworkElement_SubtitlesSpaceMaker}" />
                </StackPanel>

                <StackPanel VerticalAlignment="Bottom">
                    <local:HUDStuntPartyProgressControl x:Name="HUDStatusStuntPartyProgress" />
                    <Decorator Style="{StaticResource A_Style_FrameworkElement_SubtitlesSpaceMaker}" />
                </StackPanel>

                <StackPanel VerticalAlignment="Bottom">
                    <local:HUDEliminatorUpgradeChoiceControl x:Name="HUDStatusEliminatorUpgradeChoiceBase"/>
                    <local:HUDRivalsEverywhereControl x:Name="HUDStatusRivalsEverywhere" Margin="0,0,0,0"/>
                    <StackPanel Margin="0,0,0,-7">
                        <local:HUDPressButtonControl x:Name="HUDStatusPressButton" Margin="0"/>
                        <Decorator Style="{StaticResource A_Style_FrameworkElement_SubtitlesSpaceMaker}" />
                    </StackPanel>
                </StackPanel>

                <!--Not actually in HUD status'-->
                <Decorator x:Name="HUDStatusDummyNotInHUD"/>
                <Decorator x:Name="HUDStatusDummyEliminatorAnnouncement"/>
            </Grid>
        </Grid>
    </Grid>
</Page>
