Transparent Content in Webbrowser

My task is to show HTML content with translucent elements in a WPF application. Transparency should go through the Webbrowser and the window. Webbrowser should not be translucent. So I need HTML content and I need to see the desktop through it.

Is there a way to do something like this?

Thanks.

PS: Sorry for my English.

+4
source share
3 answers

Awesomium and Awesomium.NET are an HTML UI engine that supports just that.

Check out WPF WebControl . You can set WebControl.IsTransparent to true and load some content using the word body { background-color: transparent; } body { background-color: transparent; } (you can even specify custom CSS code for all loaded pages using WebSession ).

+3
source

This is currently not possible; this is due to the way the web browser control is rendered. This is actually not a real WPF control, but a WPF wrapper around a COM component. This limits the functionality available and causes other problems, such as the inability to float WPF controls on top of it.

I believe that a new WebView control has appeared for Windows 8.1 applications (demo at Build 2013). This can provide more flexibility, although I'm not sure if this application is for Windows 8.1 or it will also be available for WPF applications as part of .NET 4.5.1.

+1
source

The WPF web browser control is a technically wrapped WinForms WebBrowser control, so it appears at the WinForms level, which is always above the WPF level. You can use Awesomium.NET Browser instead of IE browser or convert HTML code to Xmal and show it in Flow Document WPF Flow Document for beginners

0
source

Source: https://habr.com/ru/post/1489541/


All Articles