且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

我可以将IE嵌入到我的wpf应用程序中并与之交互触发事件吗

更新时间:2023-12-06 15:02:04

下面是WPF的Web浏览器控件的链接,该控件不是WPF初始发行版的一部分,它是在3.5 SP1中添加的.只要您以3.5 SP1为目标,就可以使用此控件并与其中的内容进行交互.我有一个确实使用此控件的WPF应用程序,并且通过在WPF画布上绘制并将该信息发送到Web浏览器控件的内容API,我们与浏览器中的内容进行了大量的JavaScript交互.

Below is the link to the web browser control for WPF, this control was not part of the initial release of WPF, and was added in 3.5 SP1. As long as you are targeting 3.5 SP1 you can use this control and interact with the content in it. I have a WPF application that does use this control and we do a lot of JavaScript interactivity with the content from the browser by drawing on a WPF canvas and sending that information to the content API of the web browser control.

如果您需要一个示例,我可以从应用程序中查找一些代码示例,然后按照您的方式发送它们.

If you need an example I can look up some code samples from the application and send them your way.