GoBack Method
Collapse the table of content
Expand the table of content

NavigationService.GoBack Method

Navigates to the most recent entry in the back navigation history, or throws an exception if no entry exists in back navigation.

Namespace:  System.Windows.Navigation
Assembly:  System.Windows.Controls.Navigation (in System.Windows.Controls.Navigation.dll)

public void GoBack()


There are no entries in the back navigation history.

Before calling the GoBack method, check the value of the CanGoBack property to determine if an entry exists in the back navigation history.

The following example shows buttons within a Silverlight page that allow forward and back navigation. The page uses the NavigationService property of the Page class to access the navigation service used by the hosting frame.

private void BackNavButton_Click(object sender, RoutedEventArgs e)
    if (NavigationService.CanGoBack)

private void ForwardNavButton_Click(object sender, RoutedEventArgs e)
    if (NavigationService.CanGoForward)


Supported in: 5, 4, 3

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Community Additions

© 2015 Microsoft