VS.NET桌面程序集成EO.WebBrowser.WebView组件,免弹框版

VS.NET桌面程序集成EO.WebBrowser.WebView组件,免弹框版@[toc]

概要

背景需求:需要在VS.NET桌面程序中引入Web控件,实现在.NET桌面程序中集成h5页面,并呈现良好的显示效果。
方案分析:
1、 Visual Studio 2010、2015、2022等自带WeBrowser控件,但是支持IE内核的网页,通用性比较差,集成后h5显示效果不理想。
2、 .NET 4.6及以上版本支持WebView2控件,该组件基于IE Edge,显示效果较好,但是开发环境配置比较麻烦。
3、 EO.WebBrowser基于谷歌内核,并且不需要安装运行环境,.NET集成比较简单,支持JavaScript、支持.NET与H5之间传递复杂数据,界面显示效果较好。
综上所述,本方案选择EO.WebBrowser组件,实现在.NET桌面应用程序中集成H5页面。

整体架构流程

1、 下载EO组件库,地址:https://www.essentialobjects.com/download。安装完成后,在路径“C:\Program Files\Essential Objects\EO.Total 2024\Samples”下包含组件的使用案例,包含C#和VB.NET案例,为WPF项目。
2、 通过NuGet安装EO组件,
(1)选中项目,右键->“管理解决方案的NuGet程序包”

  • 21
    点赞
  • 15
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
Chrome based Browser Engine for .NET EO.WebBrowser is a web browser engine based on Google's Chromium project but with native .NET programming interface --- don't worry, it's not a wrapper around the Chrome browser installed on your machine. In fact EO.WebBrowser has the whole browser engine embedded inside a single .NET DLL. In another word, it has zero external dependency. Just reference and use. Why use EO.WebBrowser? • Based on Google's Chrome Project EO.WebBrowser uses the same core Google's Chrome and Apple Safari uses. It does not rely on IE. The engine is much faster and safer. • Zero External Dependency What if user updates/uninstall their browser? What if user disables JavaScript in Internet Explorer's settings dialog? These questions does not exist with EO.WebBrowser because everything is embedded inside our DLL files. • Native .NET components written in C# Because it's written in .NET, you can use it with any .NET based language/development tool. The same DLL works for both 32 bit and 64 bit environments; • Easy to use Programming Interface EO.WebBrowser offers core components that can be used in any Windows application, as well as wrapper controls for both Windows Forms applications and WPF applications; • Extensive Customization Options EO.WebBrowser offers extensive customization options that allow you to customize context menu, hot keys, JavaScript dialogs, file dialogs, focus and window control. Together these features allow you to seamlessly integrate the browser engine into your application; • .NET code -> JavaScript code Turn any web page into an integral part of your application -- both visually and programmatically. You can execute JavaScript code and access all the JavaScript objects directly from your .NET code. Access their properties or even call a JavaScript function are all different options available to you; • JavaScript code -> .NET code Things always go both ways --- and this is reflected in our programming interface as well. You can call JavaScript code from .NET code, and the other way around is also true --- you can call .NET code from your JavaScript code. This allows your Web page to seamlessly interact with the host application; • Custom Resource Handler Want to keep an eye on everything? Or want to keep everything to yourself? We got you covered. EO.WebBrowser offers ability to intercept and modify all requests that originate from the browser engine. For example, you can automatically deny all request sent to a specific host. It also offers you the ability to implement custom protocols or custom resource handlers. For example, you can implement a custom request handler to load images from your database instead of a Web server;
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值