Hi,
I am trying to adding WebView2 (edge with chromium) control to Rhino to see if WebAssembly stuffs could work within Rhino.
I have tested WebWiew2 with both WPF and WinForm. It works fine as an independent application (https://docs.microsoft.com/en-us/microsoft-edge/webview2/gettingstarted/wpf). However, it doesn’t work when I add WebView2 to this Rhino’s WPF sample: https://github.com/mcneel/rhino-developer-samples/tree/6/rhinocommon/cs/SampleCsWpf.
What I found the issue is:
WebWiew2.CoreWebView2 is never initiated and remains null in Rhino, couldn’t figure out why it doesn’t work within Rhino. There are several places mentioned that need to add await webView.EnsureCoreWebView2Async(null);
, but it doesn’t work in this case.
I have uploaded my test sample here: https://github.com/MingboPeng/ExperimentalProjects/tree/master/RhinoWebView2
Any insight would be really helpful.
cc @dale
Thanks,
-Mingbo
Notes for testing WebWiew2:
-
Have to use .net framework 4.6+ (I am using 4.7.2)
-
Use prerelease version (this is important!)