cefsharp/CefSharp — pull request #161 by dcartwright (2013-08-29 15:30:49+00:00)
Title: Add support for transparent HTML backgrounds

Currently, CefSharp does not support transparent backgrounds in the rendered document. My application has a requirement that I be able to render several instances of CefSharp WPF WebView controls over a shared background. Each instance has a small snippet of HTML content to render. The WPF background may contain color gradients and/or background images, which are not easily mimicked in the background of the HTML documents.

In my research, I found the following discussion for doing this generically in CEF, which led me to the "CefWindowInfo.SetTransparentPainting()" method:

http://www.magpcss.org/ceforum/viewtopic.php?f=6&t=10504

In addition, in the below CefSharp Google Group discussion, the OP suggested that it might be enough to switch from Bgr32 to Bgra32 rendering of the image in order to preserve transparency:

https://groups.google.com/forum/#!topic/cefsharp/dpJW_8YFFuA

Neither of these is enough on its own, but together, success! In my build of CefSharp with these changes, I can now set a style like this, and the WPF background shines through with rendered HTML content over it:

```
html, body {
background: transparent;
}
```

Please consider making this a main-line feature for the WPF control. My thought is that this is unlikely to be a breaking change for most people, since HTML documents (at least in Chrome) have a white background by default, and this kind of CSS makes no sense in a traditional web browsing scenario.