Condividi tramite


Silverlight Plug-in Object Reference

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

The Silverlight plug-in is an object that can be used with several programming models and access models. Members of the plug-in class can be accessed through the HTML DOM and through the object element object that is defined in order to host the Silverlight plug-in on an HTML page. The same functionality can also be accessed through APIs that produce the HTML page object tag as their output, such as the functions in the Silverlight.js library. Some Silverlight plug-in functionality can be accessed at run time by using one of the Silverlight programming models (the JavaScript API or managed code).

The topics in this section describe the core functionality of the Silverlight plug-in object. They provide the syntax for each programming model and access model. If functionality is available to only some access models, that information is noted in the topic.

The topic name is based on the name of the property or parameter for the object element. Some topics describe functionality that is not available for the object element as described here. In these cases, the topics are included because they describe ways to program the Silverlight plug-in object directly.

Note the following about the topics in this section:

  • For the JavaScript syntax, the placeholder silverlightObject is used. You can get a reference to the silverlightObject object from the JavaScript API by calling GetHost on most Silverlight objects. Alternatively, you can get the silverlightObject instance from the DOM by calling Document.GetElementByID and specifying the ID of the object element that instantiates the Silverlight plug-in.

  • The Silverlight.js syntax is based on the Silverlight.js functions that are current as of the release of this documentation. The Silverlight.js library might be updated by Microsoft. If so, the syntax might change, which includes parameter names and parameter order.

  • For the COM syntax, the relevant interface and member are indicated. However, for more information, see COM Reference.