开发者

Navigation history in Silverlight navigation application

I would like to be able to get the navigation history from my users of a navigation application. I have a frame and can use canGoBack(), and goBack method. But I would like to be able to see from what page they are navigation from when they enter a new page. How can I ex开发者_开发知识库tract the history?


The NavigationService.CurrentSource Property will tell you your current location.

You could call this before the call to GoBack to store the uri and then query that value once the navigation has completed.

There is also the Page.OnNavigatedFrom Method which takes a NavigationEventArgs Class as it's argument. This might give you the information you need.


There is no way to get the history, you'd have to store it yourself by listening to each instance of Frame.Navigated (or NavigationService.Navigated) and keeping it somewhere.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜