项目中碰到此需求.几番比对,此为最好的解决方案,聊做备忘. 1.加入Microsoft Internet Controls引用: 项目右键->添加引用->COM->Microsoft Internet Controls,加入后,其引用名为SHDocVw. 2.扩展WebBrowser控件: public class WebBrowser : System.Windows.Forms.WebBrowser { public delegate void NewWindow3EventHand…
说明:在同一窗口打开链接,只要稍加改造就可以实现,这里实现的是在新Tab页打开链接,并且支持带type="POST" target="_blank"的链接 github和bitbucket上相关问题: 1.WPF empty POST data when using custom popup https://github.com/cefsharp/CefSharp/issues/1267 2.CefLifeSpanHandler, customized OnB…
using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Runtime.InteropServices.WindowsRuntime; using Windows.Foundation; using Windows.Foundation.Collections; using Windows.UI.Xaml; using Windows.UI.Xaml.Cont…