问题
How can I use the Microsoft Edge WebView2 control in C# windows application using visual studio ?. Thanks
回答1:
Now in 2020 WebView2 supports both WPF and WinForms so you can try to use it in your application.
https://docs.microsoft.com/en-us/microsoft-edge/webview2/
https://docs.microsoft.com/en-us/microsoft-edge/webview2/gettingstarted/wpf
Basically you need to add Nuget package Microsoft.Web.WebView2 and then use WebView2 control.
回答2:
You cannot currently do it without some hacks as it is missing the interfaces. It only support C++ win32 API for the time being. Please see this post for more information https://github.com/MicrosoftEdge/WebViewFeedback/issues/46
来源:https://stackoverflow.com/questions/57853644/how-can-i-use-the-microsoft-edge-webview2-control-in-c-sharp-windows-application