WPF Web 浏览器最近的页面

发布于 2024-12-15 09:35:00 字数 128 浏览 5 评论 0原文

只是想知道是否有办法访问 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

小草泠泠 2024-12-22 09:35:00

不,我认为这是不可能的,只有 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.

无所谓啦 2024-12-22 09:35:00

导航控制由 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文