Skip to main content

HamburgerMenu.GoBackCommand Property

Gets or sets the command which is invoked when the parent’s back button is clicked.

Namespace: DevExpress.Xpf.WindowsUI

Assembly: DevExpress.Xpf.Controls.v23.2.dll

NuGet Package: DevExpress.Wpf.Controls

Declaration

public ICommand GoBackCommand { get; set; }

Property Value

Type Description
ICommand

An ICommand object specifying the command which is invoked when the parent’s back button is clicked.

Remarks

If the menu’s parent supports the back navigation (for instance, the ThemedWindow supports this feature; see ThemedWindow.NavigateBackCommand), you can synchronize the menu’s back command with the parent’s back command by enabling the HamburgerMenu.SyncWithWindowBackButton option.

By default, the back command navigates back to the previously displayed navigation page. Using the GoBackCommand property, you can provide a custom back command.

xmlns:dxwui="http://schemas.devexpress.com/winfx/2008/xaml/windowsui"

<Window.CommandBindings>
    <CommandBinding Command="NavigationCommands.BrowseBack"
                    CanExecute="CommandBinding_CanExecute"
                    Executed="CommandBinding_Executed"/>
</Window.CommandBindings>

<dxwui:HamburgerMenu x:Name="menu"
                     AllowBuiltInNavigation="True" 
                     GoBackCommand="NavigationCommands.BrowseBack"
                     SyncWithWindowBackButton="True"
                     IsWindowBackButtonVisible="True">
</dxwui:HamburgerMenu>
See Also