Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Refreshing a page

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?

like image 528
Nelson T Joseph Avatar asked Dec 28 '22 07:12

Nelson T Joseph


1 Answers

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()));
like image 75
keyboardP Avatar answered Feb 24 '23 07:02

keyboardP