Reputation: 379
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
Upvotes: 0
Views: 5247
Reputation: 15004
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);
}
Upvotes: 1
Reputation: 379
Solved it. Use
protected override void OnNavigatedTo( System.Windows.Navigation.NavigationEventArgs e) { //INSERT RELOAD METHOD HERE }
In the PhoneApplicationPage part of every page
Upvotes: 6