<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_RouteBlueprintCheckpointEditor"
      x:Name="Page"
      WindowTitle="Page"
      FlowDirection="LeftToRight"
      Style="{StaticResource A_Style_Page_Generic}"
      DataContext="{Binding RelativeSource={x:Static RelativeSource.Self}}">
    <Page.Resources>
        <ResourceDictionary>
            <Style x:Key="A_Style_ControllerButtonControl_MovementControl" TargetType="local:ControllerButtonControl" BasedOn="{StaticResource A_Style_ControllerButtonControl_Default}">
                <Setter Property="Description" Value="{local:Loc HelpButtons.IDS_RouteBlueprint_Checkpoint_MoveCheckPoint_Left}" />
                <Style.Triggers>
                    <DataTrigger Binding="{Binding IsControllerActiveInput, RelativeSource={RelativeSource AncestorType=Page}}" Value="True">
                        <Setter Property="Description" Value="{local:Loc HelpButtons.IDS_RouteBlueprint_Checkpoint_MoveCheckPoint}" />
                    </DataTrigger>
                </Style.Triggers>
            </Style>
        </ResourceDictionary>
    </Page.Resources>
    <Grid x:Name="LayoutRoot">
        <Grid Style="{StaticResource A_Style_FrameworkElement_LayoutRoot}">
            <Grid x:Name="AdjustableSafeFrame" Margin="{Binding SafeFrameMargin}">

                <!--Do not change visibility! 
                    This control exists so a hud status (not intended to be recreated) does not get removed for not being in the scene, 
                    which is something that RouteBlueprintCheckpointEditor and RouteBlueprintHud does to get rid of inactive status's -->
                <local:HUDAnnaControl x:Name="HUDStatusAnna" Visibility="Collapsed"/>

                <Decorator Margin="0,0,0,24" VerticalAlignment="Bottom">
                    <local:HUDPressButtonControl x:Name="HUDStatusPressButton" Margin="0,0,0,0"/>
                </Decorator>
            </Grid>
        </Grid>

        <ContentControl Style="{StaticResource A_Style_ButtonBar}">
            <local:ControllerButtonPanel x:Name="HelpPanel"
                           Style="{StaticResource A_Style_ControllerButtonPanel_Default}">
                <local:ControllerButtonControl Button="A"/>
                <local:ControllerButtonControl Button="B"/>
                <local:ControllerButtonControl InputOverride="{local:Input Command=INPUTCMD_STEERING, Context=INPUTCONTEXT_RACING}"
                                               Style="{StaticResource A_Style_ControllerButtonControl_MovementControl}" />
                <local:ControllerButtonControl InputOverride="{local:Input Command=INPUTCMD_STEERING, Context=INPUTCONTEXT_RACING}"
                                               UseHighKeyIfLinearCommand="True"
                                               Description="{local:Loc HelpButtons.IDS_RouteBlueprint_Checkpoint_MoveCheckPoint_Right}"
                                               Visibility="{Binding IsControllerActiveInput, RelativeSource={RelativeSource AncestorType=Page}, Converter={StaticResource A_FZBooleanToVisibilityConverter_Inverse}}"/>
                <local:ControllerButtonControl InputOverride="{local:Input Command=INPUTCMD_BRAKE, Context=INPUTCONTEXT_RACING}"
                                               Description="{local:Loc HelpButtons.IDS_RouteBlueprint_Checkpoint_Narrow}"/>
                <local:ControllerButtonControl InputOverride="{local:Input Command=INPUTCMD_GAS, Context=INPUTCONTEXT_RACING}"
                                               Description="{local:Loc HelpButtons.IDS_RouteBlueprint_Checkpoint_Widen}"/>
            </local:ControllerButtonPanel>
        </ContentControl>
    </Grid>
</Page>
