WPF Web 浏览器最近的页面
只是想知道是否有办法访问 WPF WebBrowser 中最近访问过的页面。它显然会跟踪页面,正如 Go[前进/后退] 函数所证明的那样。我计划创建一个数据库来跟踪它,但如果这样做毫无意义,我不想做额外的工作。我猜这些细节是故意向用户隐藏的。
Just wondering if there is a way to access the recent pages visited in the WPF WebBrowser. It obviously keeps track of the pages, as evidenced by by the Go[Forward/Back] functions. I am planning on making a database to keep track of it, but I didn't want to do extra work if it was pointless to do so. I am guessing those details are purposely hidden to the user.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
不,我认为这是不可能的,只有 GoForward/GoBack 方法可以使用。 WebBrowser 控件中的历史记录似乎与 Windows 相关联(因此在 WebBrowser 中打开 URL 会将其添加到 IE 历史记录中,反之亦然),我想这就是他们限制对其访问的原因。编写自己的方式来跟踪可能会有些重复的工作,但在这种情况下这是可行的方法。
No I don't think that's possible, there's just the GoForward/GoBack methods to use. The history in the WebBrowser control seems to be tied into Windows (so opening a URL in your WebBrowser adds it to IE history and vice-versa), I guess that's why they've restricted access to it. Writing your own way to keep track may be a bit of duplicated effort, but it's the way to go in this case.
导航控制由 NavigationService 类处理,似乎仅支持“下一个”和“上一个”功能。
我没有看到任何直接的方法来访问整个访问页面链。
Navigation control is handled by the NavigationService class and it appears that there is only a "Next" and "Previous" functionality supported.
I don't see any direct way of getting access to the whole chain of visited pages.