This topic has not yet been rated - Rate this topic

NavigationService Class

July 26, 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.

  NameDescription
Public propertyBackStackGets an IEnumerable that you use to enumerate the entries in the back navigation history.
Public propertyCanGoBackGets a value that indicates whether there is at least one entry in the back navigation history.
Public propertyCanGoForwardGets a value that indicates whether there is at least one entry in the forward navigation history.
Public propertyCurrentSourceGets the uniform resource identifier (URI) of the content that is currently displayed.
Public propertySourceGets or sets the uniform resource identifier (URI) of the current content or the content that is being navigated to.
Top
  NameDescription
Public methodEquals (Inherited from Object.)
Protected methodFinalize (Inherited from Object.)
Public methodGetHashCode (Inherited from Object.)
Public methodGetType (Inherited from Object.)
Public methodGoBackNavigates to the most recent entry in the back navigation history, or throws an exception if no entry exists in back navigation.
Public methodGoForwardNavigates 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 methodMemberwiseClone (Inherited from Object.)
Public methodNavigateNavigates to the content specified by the uniform resource identifier (URI).
Public methodRemoveBackEntryThis 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 methodStopLoadingStops asynchronous navigations that have not yet been processed.
Public methodToString (Inherited from Object.)
Top
  NameDescription
Public eventFragmentNavigationOccurs when navigation to a content fragment begins.
Public eventJournalEntryRemovedThis event is raised during a RemoveBackEntry() operation or during a normal back navigation after the Navigated event has been raised.
Public eventNavigatedOccurs when the content that is being navigated to has been found and is available.
Public eventNavigatingOccurs when a new navigation is requested.
Public eventNavigationFailedOccurs when an error is encountered while navigating to the requested content.
Public eventNavigationStoppedOccurs 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)
© 2013 Microsoft. All rights reserved.