Silverlight tip: Transparent application background

A question a lot of developers ask when starting to develop in Silverlight is how do we set a transparent background in the silverlight application? This can be useful if you intend to provide a seamless integration with your website and run the Silverlight application object over html content that you want displayed.

This can easily be done by setting background and IsWindowless properties on the silverlight object, like so:

<param name="background" value="#00FFFFFF" />
<param name="windowless" value="true" />

Notice that the background color value sets the transparency by setting the alpha channel to 00 (first two characters of the ARGB hex code).

Technorati Tags:

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Shout it
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter
Google Buzz (aka. Google Reader)

1 comment so far

  1. 001 Will

    Awesome, this helped me out a bunch, thanks!

    September 28th, 2011

Add a comment