将新的 Microsoft Edge 添加到 Web 浏览器控件? [英] Add new Microsoft Edge to web browser control?

查看:73
本文介绍了将新的 Microsoft Edge 添加到 Web 浏览器控件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

带有 Microsoft Edge 的新 Windows 10 已经到来.我想问你,我怎样才能将它添加到我的网络浏览器控件中?我需要它,因为实际的 Web 浏览器控件不允许 JavaScript 和 CSS3.

The new Windows 10 with Microsoft Edge has arrived. I want to ask you, how can I add it to my web browser control? I need it because the actual web browser control doesn't allow JavaScript and CSS3.

我曾经也添加了带有项目 WebKit 和 Awesomium 的 Chrome 浏览器,但他们不记得登录凭据(我的应用程序需要它们)所以我必须使用 I.E.不幸的是.

I used to also add Chrome browser with the projects WebKit and Awesomium but they didn't remember the login credentials (I need them for my app) so I have to use I.E. unfortunately.

推荐答案

2021 年 1 月更新:WebView2 已发布.这可以将基于 Chromium 的 Edge 集成为 Web 控件.不幸的是,它使用起来要复杂得多,但功能要强大得多.适用于 WinForms 或 WPF 或 C++ 应用程序.https://docs.microsoft.com/en-us/microsoft-edge/webview2/

UPDATE Jan 2021: WebView2 has been released. This enables integration of the Chromium based Edge as a web control. It's a lot more complicated to use, unfortunately, but a lot more powerful. Works with WinForms or WPF or C++ apps. https://docs.microsoft.com/en-us/microsoft-edge/webview2/

2018 年 5 月更新:微软终于让它变得简单了.https://blogs.windows.com/msedgedev/2018/05/09/modern-webview-winforms-wpf-apps/

UPDATE May 2018: FINALLY Microsoft has made it easy. https://blogs.windows.com/msedgedev/2018/05/09/modern-webview-winforms-wpf-apps/

目前,新控件位于 Windows Community Toolkit 3.0 中并包含在 Toolkit.Win32.UI.Controls.dll 中,您可能需要手动添加对其的引用.

For now, the new control is in the Windows Community Toolkit 3.0 and contained in Toolkit.Win32.UI.Controls.dll, which you may need to manually add a reference to.

======我希望有人提到这一点,所以我会添加它,因为它看起来不会更新 webbrowser 控件.

====== I wish somebody had mentioned this, so I'll add this because it doesn't look like webbrowser control will ever be updated.

改用 WebView 控件.这使用了 EdgeHTML 渲染引擎.这是 WindowPresentation 层的一部分但可以从 WinForms 和可能的其他应用程序链接.您必须转换为 UWP 应用程序

Use the WebView control instead. This uses EdgeHTML rendering engine. This is part of WindowPresentation layer but it is possible to link from WinForms and presumably other apps. You must convert to a UWP app

import Windows.UI.Xaml.Controls.WebView

示例代码:https://code.msdn.microsoft.com/windowsapps/XAML-WebView-control-sample-58ad63f7

我还没有用 WebView 替换我的 WebBrowser,但是界面看起来很熟悉.

I haven't replaced my WebBrowser with WebView yet, but the interface looks pretty familiar.

这篇关于将新的 Microsoft Edge 添加到 Web 浏览器控件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆