SilverLight and Z-Index

When implementing a new SilverLight custom control, it was blocking menu popups (html / javascript) on the page. I set the z-index of the div and object tags that contained SilverLight to no avail. After a lot of googling, I found the following solution.


Set the Windowless property to true. In the case of manually adding SilverLight to the page, that results in the following child tag of the object tag…

<param name="Windowless" value="true" />

Update: I recently read Professional Silverlight 4 (Wrox Programmer to Programmer) and highly recommend it for developers working with SilverLight. Used copies are pretty affordable.


Posted

in

, , ,

by

Comments

9 responses to “SilverLight and Z-Index”

  1. Asheesh Soni Avatar

    Thanks for the tip. You probably saved me an hour or two.

  2. Bhagirath Patadia Avatar
    Bhagirath Patadia

    Thanks, this is great.. really helpful….

  3. Matt L. Avatar
    Matt L.

    Thank you for this, it saved me a ton of time as the z-indexing was not working for me.

    Matt

  4. Kangkan Avatar

    I have a similar issue with an XBAP. Can you provide some input to that. I came to this page from an answer to my query on stackoverflow http://stackoverflow.com/questions/2698183/wpf-issue-showing-html-div-on-top-of-wpf-app

  5. Tim Avatar
    Tim

    I don’t have much experience with XBAP. Any reason you can’t migrate the app to Silverlight? It’s actually less restrictive of a client requirement. XBAP requires the .Net framework, while Silverlight just requires the client browser plugin.

  6. Kishan Avatar
    Kishan

    Thank you for this, it saved my time.

    Kishan

  7. TJG Avatar
    TJG

    Wow. I was running into the exact same problem with my pop-up menus rendering behind my Silverlight control in Chrome and Safari. They rendered correctly in IE 8 and Firefox 3.6.8. Thanks so much for posting this as you saved me a lot of time and frustation.

  8. joao Avatar
    joao

    thank you so much, you’re the man

  9. Craig Reed Avatar
    Craig Reed

    Thank you very much I was having heck with an autocomplete textbox, the list kept getting hidden beneath my silverlight user control. I tried all sorts of things and this fixed my problem.