locked
Background transparency for x-ms-webview element in Windows 8.1?

    Question

  • In Windows 8 I could layer an iframe a transparent background such that the body of the containing HTML would show behind the iframe content.

    With the x-ms-webview element in Windows 8.1, it appears that the background of the webview is always solid.  I have tried setting the background-color of the webview using something like "rgba(0, 0, 0, 0)", but the alpha value has no effect.

    Setting the opacity of the webview has the expected effect of allowing the background to show through but also dimming the webview content, which is not what I want.

    It appears that the same behavior exists in C# - I create a Grid component, place an Image and a WebView in it, and though I set DefaultBackgroundColor on the WebView to use transparency, the background is solid.

    Is there any way to get a transparent background on a Windows 8.1 WebView?

    Sunday, July 14, 2013 4:18 PM

Answers

All replies

  • The WebView control does not support rendering the transparent color for C# or HTML/JS apps.

    Monday, July 15, 2013 8:10 PM
  • Would that imply c++ could work? Or is the control incapable? My experiment with c++ suggests it does not work. I'm hoping that I'm wrong. Is there any way to get a full featured webbrowser that supports transparency without using something like the chromium embedded framework? That seems a fundamental requirement for modern webviews
    Sunday, August 04, 2013 1:00 AM
  • Language doesn't matter here. C++, C#, and VB all use the same Xaml controls, and the Xaml and HTML WebView both use the same implementation under the hood.

    --Rob

    Monday, August 05, 2013 12:04 AM
    Moderator
  • Is there any mechanism that is capable of rendering a webpage with transparent background?  Any variation of technologies in the MS box?  Or does this necessitate wrapping libcef?  Thanks.
    Tuesday, August 06, 2013 7:34 PM
  • WebView is the only html rendering control provided in-box.

    --Rob

    Tuesday, August 06, 2013 9:49 PM
    Moderator