Search code examples
c#wpfscatterview

Flattening WebBrowser with ScatterViewItem


I have a WebBrowser in a ScatterViewItem. There are also other ScatterViewItems in the ScatterView.

However, I noticed that the WebBrowser doesn't really seem to reside in the ScatterViewItem seemlessly. When I move another ScatterViewItem (containing an Image) over it, the image will appear behind the WebBrowser but in front of the ScatterViewItem holding the WebBrowser. This is the Z-Order:

  1. WebBrowser
  2. Image
  3. Image's SVI
  4. WebBrowser's SVI

Which would look very strange. How do I fix this so that when I move another ScatterViewItem over it, the ScatterViewItem I'm moving will be on top of the WebBrowser?

EDIT: I have screenshot the problem:

https://db.tt/AbnxlnF0


Solution

  • Don't use the WPF browser control. Using something based on Chromium such as the "Chromium Embedded Framework" or "Awesomium" which will render directly into the WPF visual rather than faking it poorly like the WebBrowser control does.

    Btw... in Windows 8.1, modern "metro" apps have access to a new WebView control which does not suffer from the same suckage that WebBrowser has plagued the world with.