Div on top of Silverlight

Posted by Corey on June 17, 2008 at 2:19 pm.

Have you tried overlaying a <div> on top of a Silverlight object? The only way to achieve this is by setting the Windowless property on the Silverlight object to true. Otherwise you will get get a result like figure 2.

Figure 1 – Windowless set to true.

 

Figure 2 - Windowless not set or set to false.

4 Responses to “Div on top of Silverlight”

  • Hi, I’m a flash/flex developer just getting started with Silverlight 2 development. When embedding Flash content you can set the WindowMode from “opaque” (default, similar to figure 2) to “transparent”. But this decreases performance dramatically. Do you have any idea how the Windowless setting affects performance in Silverlight applications?

  • 2
    cschuman Says:

    Yes, setting Windowless to true is a HUGE performance hog.

    http://msdn.microsoft.com/en-us/library/system.windows.interop.settings.windowless(VS.95).aspx

    Set the Windowless property to true only when necessary. Performance is seriously impacted when in windowless mode (e.g. tearing in animations). Due to this, media playback is not recommended at all in windowless mode. (Microsoft Windows versions of Silverlight only)

  • this doesn’t seems to work in silverlight 2.0

  • Codem, it should work. I don’t think case sensitivity is an issue, but try making it all lower case.  Also, are you using ASP.NET?  If so, there should be a Windowless option in the <asp:Silverlight> control.

Leave a Reply