Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

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.v24.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.

private void CommandBinding_CanExecute(object sender, CanExecuteRoutedEventArgs e) {
    e.CanExecute = true;
}
private void CommandBinding_Executed(object sender, ExecutedRoutedEventArgs e) {
    MessageBox.Show("Browse Back");
}
See Also