30
Jan
0
Silverlight – Make a Silverlight Application Transparent, See the HTML behind Silverlight
If you want to make your application transparent there are only 3 lines to change… but it is not easy to find which one to modify.
Then your application will use your real html page as a background.
For What?!
If you want your silverlight application to be transparent (or to have the opacity you set in your .xaml file) you need to modify the html that uses your .xap.
- In your .xaml make the background to “transparent” to your user_control or to your Grid/Canvas.
- Build your project to generate the .html file.
- Open the .html file from the bin directory, and find :
<param name=”background” value=”white” />
- Replace with :
<param name=”background” value=”Transparent” />
<param name=”windowless” value=”true” />
<param name=”background” value=”#00FFFFFF” />
<param name=”pluginbackground” value=”Transparent” />
And that’s all.
Enjoyed reading this post?
Subscribe to the RSS feed and have all new posts delivered straight to you.
Subscribe to the RSS feed and have all new posts delivered straight to you.
