SilverlightHost.NavigationState Property


Gets or sets a URI fragment that represents the current navigation state.

Namespace:  System.Windows.Interop
Assembly:  System.Windows (in System.Windows.dll)

public string NavigationState { get; set; }

Property Value

Type: System.String
A URI fragment that represents the current navigation state.


When setting this property, the specified value is null.

A URI fragment is the part of a URI that occurs after a pound sign (#). Setting this property causes the browser to update the URI in its address bar and causes the NavigationStateChanged event to occur. The property value will also change (and the event will occur) if a user updates the URI in the address bar. Additionally, the URI with the new fragment is added to the navigation history so that users can navigate back to it.

You can handle NavigationStateChanged event to provide custom application navigation. However, in most cases, you should use the Frame and Page controls to provide application navigation. For more information, see Navigation Overview.


Supported in: 5, 4, 3

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1, Windows Phone OS 7.0

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