Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
785
XamWebHtmlViewer and z-index
posted

Hi,

 

I tried to use the XamWebHtmlViewer control to replace an open-source alternative but it wouldn't work as I expect it to.

 

I use the HtmlViewer to display Google maps and PDF reports.

To emulate popup windows and display a Silverlight module on top of the rest of the application (a Silverlight module and the NTML viewer) I create a new DIV with a higher z-index where I put the new Silverlight plugin.

 

The issue I came accross is that the XamWebHtmlViewer appears on top of the new Silverlight popup although the DIV of the Sivlleright plugin has a higher z-index.

It seems that the XamWebHtmlViewer does something to the DOM that makes it come up on top. If I use the DeveloperTools from IE and touch the z-index of the Silverlight popup plugin, then it comes on top as it should.

 

I attached a sample showing the behaviour.

Click on the "Show popup" button. The popup plugin shows behind the XamWebHtmlViewer. Open the DeveloperTools from IE and set the z-index of the plugin DIV to 1000 and the popup gets to the front.

XamWebHtmlViewerZIndexTest.zip