[Blog Mirrored from http://silverlight.net/blogs/msnow/default.aspx]
In order to make your Silverlight control transparent to the background of your web site you have to do two things.
From an ASPX page:
Example:
<asp:Silverlight PluginBackground="Transparent" Windowless="true" ID="Xaml1" runat="server" Source="~/ClientBin/SilverlightApplication4.xap" MinimumVersion="2.0.30523" />
From an HTML page:
<object data="data:application/x-silverlight," type="application/x-silverlight-2-b2" > <param name="source" value="ClientBin/SilverlightApplication4.xap"/> <param name="onerror" value="onSilverlightError" /> <param name="pluginbackground" value="Transparent" /> <param name="windowless" value="true" /> </object>
Notes: By default your Silverlight control takes up the entire page. This is because the Width and Height are set to 100%. If you want the control to only consume part of the page change these values to represent what you want. For example, to make the control 400x400 pixels on the page you can set it like this:
<asp:Silverlight Width="400px" Height="400px" PluginBackground="Transparent" Windowless="true" ID="Xaml1" runat="server" Source="~/ClientBin/SilverlightApplication4.xap" MinimumVersion="2.0.30523" />
Thank you, --Mike Snow Subscribe in a reader
PingBack from http://www.tmao.info/silverlight-tip-of-the-day-11-%e2%80%93-how-to-make-your-silverlight-control-transparent/