<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_BucketListChallengeCreationHud"
      x:Name="Page"
      WindowTitle="Page"
      FlowDirection="LeftToRight"
      Style="{StaticResource A_Style_Page_Generic}"
      DataContext="{Binding RelativeSource={x:Static RelativeSource.Self}}">

    <Page.Resources>
        <ResourceDictionary>

            <local:LinearTransformConverter x:Key="A_TransformConverter_LengthRatio" Scale="356"/>

            <Style x:Key="A_Style_FZRun_HIGHLIGHT" TargetType="{x:Type local:FZRun}">
                <Setter Property="Color" Value="{StaticResource A_Color_HUD_HighlightText}"/>
            </Style>

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

    <Grid x:Name="LayoutRoot">
        <ContentControl Style="{StaticResource A_Style_ButtonBar}">
            <local:ControllerButtonPanel x:Name="HelpPanel"
                           Style="{StaticResource A_Style_ControllerButtonPanel_Default}">
            <local:ControllerButtonControl InputOverride="{local:Input Command=INPUTCMD_UI_BACK_PRESS, Context=INPUTCONTEXT_UI}"
                               Description="{local:Loc HelpButtons.IDS_PropPlacement_Mode}" />                           
            <local:ControllerButtonControl InputOverride="{local:Input Command=INPUTCMD_PAUSE_GAME, Context=INPUTCONTEXT_RACING}"
                               Description="{local:Loc HelpButtons.IDS_BucketListBlueprintOptions}" />
            <local:ControllerButtonControl InputOverride="{local:Input Command=INPUTCMD_MULLIGAN, Context=INPUTCONTEXT_RACING}"
                               Description="{local:Loc HelpButtons.IDS_Mulligan}" 
                               Visibility="{Binding CanRewind, Converter={StaticResource A_FZBooleanToVisibilityConverter}}"/>
            <local:ControllerButtonControl InputOverride="{local:Input Command=INPUTCMD_ACTIVATE, Context=INPUTCONTEXT_RACING}"
                               Description="{local:Loc BucketListBlueprint.IDS_BucketListBlueprint_Revalidate}" 
                               Visibility="{Binding TestPropMode, Converter={StaticResource A_FZBooleanToVisibilityConverter}}"/>                               

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

            <Grid Style="{StaticResource A_Style_FrameworkElement_LayoutRoot}">
                <Grid x:Name="AdjustableSafeFrame"
                      Margin="{Binding SafeFrameMargin}">

                    <Decorator HorizontalAlignment="Left"
                               VerticalAlignment="Bottom"
                               Margin="0,0,0,83">
                        <local:HUDAnnaControl x:Name="HUDStatusAnna" />
                    </Decorator>

                    <local:HUDSpeedometerControl x:Name="HUDStatusSpeedometer" />

                    <Decorator HorizontalAlignment="Left"
                               VerticalAlignment="Bottom" 
                               Margin="0,0,0,49">
                        <local:HUDRadioControl x:Name="HUDStatusRadio" />
                    </Decorator>

                    <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"/>

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


                    <local:HUDMajorNotificationControl x:Name="HUDStatusMajorNotification" />

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

                    <!-- Network Controls -->
                    <local:HUDNetworkStatusControl x:Name="HUDStatusNetworkStatus" />
                        
                    <Decorator x:Name="HUDStatusChallengeWrapper" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="0,0,0,83"
                               Visibility="{Binding TestPropMode, Converter={StaticResource A_FZBooleanToVisibilityConverter_Inverse}}">
                        <local:HUDChallengeControl x:Name="HUDStatusChallenge" />                            
                    </Decorator> 
                    
                    <Decorator x:Name="HUDTestPropMode" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="0,0,0,83"
                               Visibility="{Binding TestPropMode, Converter={StaticResource A_FZBooleanToVisibilityConverter}}">
                        <StackPanel Orientation="Horizontal">                                                                                  
                            <local:FZTextBlock Style="{StaticResource A_Style_FZTextBlock_HudMedium}" VerticalAlignment="Center"                                                                 
                                   Text="{local:Loc HelpButtons.IDS_BucketList_TestMode_Prefix}"/>
                            
                            <local:ControllerButtonControl x:Name="ActivationButtonImage" Style="{StaticResource A_Style_ControllerButtonControl_ActivationButton}" Margin="10,0,10,0"/>
                            
                            <local:FZTextBlock Style="{StaticResource A_Style_FZTextBlock_HudMedium}" VerticalAlignment="Center"                                                                 
                                   Text="{local:Loc HelpButtons.IDS_BucketList_TestMode_Postfix}"/>  
                        </StackPanel>
                    </Decorator>                    

                    <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:HUDRivalsEverywhereControl x:Name="HUDStatusRivalsEverywhere" Margin="0,0,0,0"/>
                        <StackPanel>
                            <local:HUDPressButtonControl x:Name="HUDStatusPressButton" Margin="0,0,0,0"/>
                            <Decorator Style="{StaticResource A_Style_FrameworkElement_SubtitlesSpaceMaker}" />
                        </StackPanel>
                    </StackPanel>
                </Grid>
            </Grid>
        </Grid>
    </Grid>
</Page>
