Page Refresh

I need to refresh a page in wp7. Search google and get it

NavigationService.Navigate(new Uri(NavigationService.Source + "?Refresh=true", UriKind.Relative)); 

but when I use this, an error occurs, that is, the application breaks.

How to refresh current page in wp7?

+4
source share
2 answers

Just provide a unique URL identifier and reload the same page. You can create a random number, but the easiest way is probably a GUID.

 NavigationService.Navigate(new Uri(string.Format(NavigationService.Source + "?Refresh=true&random={0}", Guid.NewGuid())); 
+9
source

Try the following:

 NavigationService.Navigate(new Uri( "/Game.xaml?Refresh=true", UriKind.Relative) ); 
+1
source

Source: https://habr.com/ru/post/1391828/


All Articles