Add a handler for NavigationWindow.Navigating or NavigationService.Navigating . In your handler:
void NavigationService_Navigating(object sender, NavigatingCancelEventArgs e) { if (e.NavigationMode == NavigationMode.Back) { e.Cancel = true;
NavigatingCancelEventArgs contains all the information about the navigation request that you need to control the state of the page.
sellmeadog
source share