Microsoft recommends using the
<object> tag method of embedding a Silverlight application on a web page.
easy way to provide fallback content if Silverlight isn't installed.
The following example shows the minimum code required to embed the Silverlight plug-in on a web page using the HTML
In most cases, you will want to add additional parameters and HTML elements to provide a complete user experience with increased cross browser support. A more complete sample can be seen at the end of this page.
Below is a list of available parameters that can be passed to the plug-in using the
|allowHtmlPopupWindow||Specifies whether the
|autoUpgrade||Specifies whether the plug-in should attempt to upgrade if
|background||Plug-in background color. Default is
||Color with or without alpha (RGB, ScRGB)|
|enablehtmlaccess||Specifies whether the plug-in has full access to the browser DOM. Defaults to
|initparams||User-defined string of parameters.||String or comma separated string (SL 1.0), comma separated key=value pairs (SL 2)|
|maxframerate||Specifies the maximum number of frames per second that the plug-in can render. The default is 60.||Integer|
|minRuntimeVersion||Specifies the earliest version of the Silverlight plug-in required.||Version number|
|onfullscreenchanged||Function to call when the
|source||Specifies the address or relative path of either an initial XAML file or XAP.||URI|
|splashscreensource||Specifies a XAML page to use as the splash screen.||URI|
|windowless||Specifies the rendering mode for the plug-in for Windows versions of Silverlight. The default is
The following example shows a full web page that embeds the Silverlight plug-in and runs a very simple application. It highlights providing basic alternate content when Silverlight isn't installed and also a workaround to prevent Safari from caching the page.
Related information on the web is listed below.