Navigates to the most recent entry in back navigation history, if there is one.
Public Sub GoBack
public void GoBack()
public: void GoBack()
member GoBack : unit -> unit
GoBack is called when there are no entries in back navigation history.
Before calling GoBack, the CanGoBack property can be inspected to determine whether there are entries in back navigation history.
The following example navigates to the most recent entry in back navigation history, if one exists.
Private Sub backButton_Click(ByVal sender As Object, ByVal e As RoutedEventArgs) If Me.NavigationService.CanGoBack Then Me.NavigationService.GoBack() End If End Sub
void backButton_Click(object sender, RoutedEventArgs e) { if (this.NavigationService.CanGoBack) { this.NavigationService.GoBack(); } }
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2