How can I use the Microsoft Edge WebView2 control in C# windows application

孤街浪徒 提交于 2020-06-27 08:05:02

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!