Freigeben über


EnableNavigation (Silverlight Plug-in Object)

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Gets or sets a value that indicates whether the hosted content in the Silverlight plug-in can use a HyperlinkButton to navigate to external URIs.

Syntax

object Element

<object ...>
  <param name="enableNavigation" value="value"/>
  ...
</object>

Silverlight.js

If used for initialization, you must use the createObjectEx method's JSON notation. You set the enableNavigation property in the Settings object.

JavaScript

Not available.

COM

Not available.

Managed Code

No direct equivalent; the scenario involves HyperlinkButton.

Property Value

A string that is interpreted by the plug-in code, and is expected to be one of the following values:

all: the hosted content can use HyperlinkButton to navigate to any URI. This is the default value, and is the acting value if no enableNavigation parameter is specified.

none: the hosted content cannot use HyperlinkButton for navigation to an external URI. Relative URIs for internal navigation are still permitted. However, no journal entry is produced.

Remarks

This property can only be set during Silverlight plug-in initialization.

Navigation unloads the entire HTML page that hosts Silverlight. This property allows applications to enable or disable this navigation behavior.

The blocking behavior of this property is at the run-time method level. If the user clicks a HyperlinkButton, and thus invokes the internal method that attempts external navigation, that call internally checks the EnableNavigation value. If that navigation is not allowed, an exception is thrown.

Regardless of the EnableNavigation value, HyperlinkButton restricts all navigation to being user-initiated. For more information, see HyperlinkButton.

Strings other than none are ignored and treated as the default all case.