Chromium-Edge HTML渲染器是否有WinForms控件? [英] Is there WinForms control for Chromium-Edge HTML renderer?

查看:171
本文介绍了Chromium-Edge HTML渲染器是否有WinForms控件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Microsoft最近发布了使用Chromium引擎呈现HTML的Edge浏览器.是否有WinForms组件可以将其嵌入桌面应用程序中?

Microsoft has recently released Edge browser which uses Chromium engine to render HTML. Is there a WinForms component which allows to embed it in a desktop application?

我知道WinForms的 CefSharp ,只是在查看是否有本机支持.

I'm aware of CefSharp for WinForms, just looking if there's something supported natively.

推荐答案

WebView2

Microsoft EdgeWebView2 控件使您可以使用Microsoft Edge(Chromium)作为呈现引擎在应用程序中托管Web内容.

WebView2

The Microsoft Edge WebView2 control enables you to host web content in your application using Microsoft Edge (Chromium) as the rendering engine.

该控件在以下编程环境中可用:

The control is available on the following programming environments:

  • Win32 C/C ++(GA)
  • .NET Framework 4.6.2或更高版本
  • .NET Core 3.1或更高版本
  • .NET 5
  1. 在计算机上安装必备软件:

  1. Install prerequisites on your machine:

创建Windows窗体应用程序.

Create a Windows Forms Application.

安装WebView2 NuGet程序包在您的项目中.

Install WebView2 NuGet package in your project.

从表单上的工具箱中删除WebView2的实例.

Drop an instance of the WebView2 from toolbox on your form.

将Source属性设置为有效的URL,例如:Https://bing.com,然后运行应用程序.

Set the Source property to a valid URL like: Https://bing.com and run the application.

更多信息

  • Getting started with WebView2 in Windows Forms apps
  • Sample WinForms Application - GitHub Repository
  • WebView2 class reference.

注意: WebView2 将替换WebView 控件/Microsoft.Toolkit.Win32"rel =" nofollow noreferrer>工具包. WebView 已被标记为过时.

Note: WebView2 will replace the WebView control in the toolkit. WebView has already been marked as obsolete.

这篇关于Chromium-Edge HTML渲染器是否有WinForms控件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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