#WebView2Ex - UWP and WinUI 3 reimplementation of WebView2 Control

1 messages · Page 1 of 1 (latest)

astral compass
#

Want transparent WebView2 in WinUI 3? Now you can!

Thanks to WASDK 1.4 Experimental API ContentExternalOutputLink, I can finally port my UWP WebView2Ex library to WinUI 3.

Source code released soon™️

#

Thanks @tacit beacon for the help

#

Known limitations:

  • Full cursor shape support for WebView2 that is shipped with WASDK
  • Externally installed nuget package for WebView2 works with this as well (meaning you can go ahead and upgrade WebView2 to newer stable or preview version to try new feature, yay!). However, there is no support for custom mouse cursor shape. I'm too lazy to do cursor shape translation to WinUI cursor (help would be appreciated)
hollow fox
opaque oar
#

@astral compass when will you release source code webview2ex

astral compass
#

Well,Whenever I am in front of pc and feel like it then

opaque oar
#

@astral compass okay this is my new browser setup any thoughts

astral compass
#

I never made OOBE so I can't comment much

If you mean the 5 bullet point list then it sounds good

opaque oar
#

The whole setup will have design like that

astral compass
opaque oar
#

Does it have same capalitys as webview2

astral compass
#

Not all, but most of the things you can find in WebView2 class you can find in CoreWebView2 class

#

I didn't reimplement those since we can just get from CoreWebView2

#

Other than that, it has a bit of different format, but the format that is the most similar you can find in the sample that creates a simplified wrapper class

#

just copy this part of MainWindow.cs to your project and you will get automatic initialization

#

(the design choice here was different because the intention is to allow WebView2Runtime to be swappable)

#

meaning you can do this

var wv1 = new WebView2ExSimplified();
var wv2 = new WebView2ExSimplified();

// when both of them are already initialized

// yes you can actually do this to swap the position of the runtime
(wv1.WebView2Runtime, wv2.WebView2Runtime) = (wv2.WebView2Runtime, wv1.WebView2Runtime);
#

you can also think of WebView2Runtime as a "Model" and WebView2Ex as "View Model"

opaque oar
#

Nice

astral compass
#

okay....

#

so... it happens that someone tested this and it's not actually transparent

#

it will only appear transparent as of the background

#

so, basically it can have desktop Mica/Acrylic background

#

but if you put WinUI 3 control below the webview it cannot be seen through

astral compass
#

Ghost notification?