共用方式為


HtmlPage.Plugin Property

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

Gets a reference to the Silverlight plug-in that is defined within an <object> or <embed> tag on the host HTML page.

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

Syntax

'Declaration
Public Shared ReadOnly Property Plugin As HtmlElement
public static HtmlElement Plugin { get; }

Property Value

Type: System.Windows.Browser.HtmlElement
The Silverlight plug-in in the Document Object Model (DOM).

Remarks

If the managed runtime is in a shutdown state, the HtmlElement that is returned from Plugin throws an ObjectDisposedException from all methods and properties. However, the rest of the HTML Bridge API is still functional. Therefore, it is possible to get an HtmlElement from the Plugin property when an application domain shutdown is pending. However, the HtmlElement will not be functional, and all calls against it will fail.

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.