WPF WebBrowser Recent Pages

不羁岁月 提交于 2019-12-10 18:29:26

问题


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.


回答1:


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.




回答2:


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.



来源:https://stackoverflow.com/questions/8113237/wpf-webbrowser-recent-pages

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!