Silverlight and the object tag

Posted by Corey on October 30, 2008 at 8:12 pm.

I have searched high and low for a good place that details all the parameters available in the object tag for a Silverlight application.  You probably know, but the HTML <object> tag is now used to embed Silverlight applications (known as xaps) into your HTML page.  Sure there is the <asp:Silverlight> tag for ASP.NET 3.5 web applications, however not everyone is running IIS let a lone .NET 3.5 on the server.

So, here is your one stop shop for all the parameters available for Silverlight applications using the <object> tag.  The table is organized into two tiers.  The first tier are common properties I use, or recommend using, and the second tier are the rest of the parameters.

Standard Parameters


Parameter


Description

Source The location of the xap.
OnError A reference to the Javascript function 
Background The background color of the <object> tag
MinRuntimeVersion Defines what the minimum version number is to run the xap.  RTM version of Silverlight 2 is 2.0.3100.5.0
AutoUpgrade Determines whether or not to automatically upgrade if the MinRuntimeVersion is not met.

Useful Parameters


Parameter


Description

EnableRedrawRegions This parameters sets the visibility for regions within Silverlight that are redrawn.  Very valuable when trying to optimize performance.
EnableFrameRateCounter Displays the current frame rate in the HTML status bar.  Just like EnableRedrawRegions, this setting this parameter to true is very handy when optimizing performance.
InitParams These are user defined parameters you can pass into Silverlight when loading.  Very useful for startup parameters.
MaxFrameRate It’s probably not best practice to set this value because Silverlight handles the frame rate for you.  However, this parameter is there if you really need it.
Windowless Windowless mode is just like Transpaency mode for Flash apps.  If you want HTML or Flash ads on top of your Silverlight application set this to True. There are performance implications so try to avoid setting this to true.

Other Parameters

The rest of the parameters can be found at the below MSDN links.  As time permits, I’ll post the rest here.

http://msdn.microsoft.com/en-us/library/cc189089(VS.95).aspx

http://msdn.microsoft.com/en-us/library/cc838259(VS.95).aspx

One Response to “Silverlight and the object tag”

Leave a Reply