views:

41

answers:

2

Hi there,

When I call NavigationService.GoBack(); it doesn't reload the page.

For example I have Page 1 which is my Login page, then I Navigate to Page 2 to the Settings Page. When I have saved my Settings on Page 2 I wish it to Navigate back to Page 1 and show the new settings that are displayed.

Is there any call I can make where the Navigate Service Goes Back AND forces the page to re-initialise? (ie call the page loaded method).

Thanks

+2  A: 

Solved it. Use

protected override void OnNavigatedTo( System.Windows.Navigation.NavigationEventArgs e) { //INSERT RELOAD METHOD HERE }

In the PhoneApplicationPage part of every page

turtlepower
A: 

When you navigate to next page the previous page is destroyed (if it does not run the background thread). You have a sevral ways to display settings on page nr 1.

When user log in and go to page 2 save your setting to the Isolated Storage and when he presses the back button use

protected override void OnNavigatedTo(System.Windows.Navigation.NavigationEventArgs e)
{

  var settings = LoadMySettingsFromIS();
  if (settings =! null)
  {
    // update it here
  }

  base.OnNavigatedTo(e);

}
lukas