Reputation: 2763
I need to refresh a page in wp7. Searched in google and get this
NavigationService.Navigate(new Uri(NavigationService.Source + "?Refresh=true", UriKind.Relative));
but when I am using this there is an error, ie the application breaks.
How can I refresh the current page in wp7?
Upvotes: 4
Views: 7910
Reputation: 11
Try this:
NavigationService.Navigate(new Uri( "/Game.xaml?Refresh=true", UriKind.Relative) );
Upvotes: 1
Reputation: 69372
Just provide a unique URL ID and it will reload the same page. You can generate a random number, but the easiest way is probably with a GUID.
NavigationService.Navigate(new Uri(string.Format(NavigationService.Source +
"?Refresh=true&random={0}", Guid.NewGuid()));
Upvotes: 9