Fore
Fore

Reputation: 6146

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 extract the history?

Upvotes: 2

Views: 818

Answers (2)

Austin Lamb
Austin Lamb

Reputation: 3116

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.

Upvotes: 1

ChrisF
ChrisF

Reputation: 137198

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.

Upvotes: 2

Related Questions