This topic has not yet been rated - Rate this topic

NavigationService Class

March 22, 2012

Provides methods, properties, and events to support navigation within a Silverlight application.

System.Object
  System.Windows.Navigation.NavigationService

Namespace:  System.Windows.Navigation
Assembly:  Microsoft.Phone (in Microsoft.Phone.dll)
public sealed class NavigationService

The NavigationService type exposes the following members.

  Name Description
Public property BackStack Gets an IEnumerable that you use to enumerate the entries in the back navigation history.
Public property CanGoBack Gets a value that indicates whether there is at least one entry in the back navigation history.
Public property CanGoForward Gets a value that indicates whether there is at least one entry in the forward navigation history.
Public property CurrentSource Gets the uniform resource identifier (URI) of the content that is currently displayed.
Public property Source Gets or sets the uniform resource identifier (URI) of the current content or the content that is being navigated to.
Top
  Name Description
Public method Equals (Inherited from Object.)
Protected method Finalize (Inherited from Object.)
Public method GetHashCode (Inherited from Object.)
Public method GetType (Inherited from Object.)
Public method GoBack Navigates to the most recent entry in the back navigation history, or throws an exception if no entry exists in back navigation.
Public method GoForward Navigates to the most recent entry in the forward navigation history, or throws an exception if no entry exists in forward navigation. For Windows Phone, this method will always throw an exception because there is no forward navigation stack.
Protected method MemberwiseClone (Inherited from Object.)
Public method Navigate Navigates to the content specified by the uniform resource identifier (URI).
Public method RemoveBackEntry This method is used to remove the most recent entry from the back stack, or throws an InvalidOperationException if there are no more entries to remove. If you want to remove more than one item, you call this method multiple times. This API is synchronous and must be called from the UI thread.
Public method StopLoading Stops asynchronous navigations that have not yet been processed.
Public method ToString (Inherited from Object.)
Top
  Name Description
Public event FragmentNavigation Occurs when navigation to a content fragment begins.
Public event JournalEntryRemoved This event is raised during a RemoveBackEntry() operation or during a normal back navigation after the Navigated event has been raised.
Public event Navigated Occurs when the content that is being navigated to has been found and is available.
Public event Navigating Occurs when a new navigation is requested.
Public event NavigationFailed Occurs when an error is encountered while navigating to the requested content.
Public event NavigationStopped Occurs when the StopLoading method is called, or when a new navigation is requested while the current navigation is in progress.
Top

Windows Phone OS

Supported in: 7.1, 7.0

Windows Phone

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Did you find this helpful?
(1500 characters remaining)