Freigeben über


HtmlPage.IsEnabled Property

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

Gets a value that indicates whether the rest of the public surface area of the HTML Bridge feature is enabled.

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

Syntax

'Declaration
Public Shared ReadOnly Property IsEnabled As Boolean
public static bool IsEnabled { get; }

Property Value

Type: System.Boolean
true if the HTML Bridge feature is enabled; otherwise, false.

Remarks

You should use this property if you write code that may be hosted in a non-browser environment such as the Microsoft Expression Blend design tool.

When Silverlight is not hosted in a browser (or in other cases where the HTML Bridge is not available), this property returns false, and all other public methods and properties throw exceptions of type NotSupportedException.

When the HTML Bridge feature is disabled, the following conditions apply:

  • JavaScript entry points for the bridge feature at either the control level or as scriptable entry points are unavailable.

  • Scriptable entry points do not exist.

  • Helpers on scriptable entry points do not exist, because the scriptable entry points are not registered.

  • HTML Bridge services that are exposed through the createObject helper method are unavailable.

Version Information

Silverlight

Supported in: 5, 4, 3

Platforms

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