Tuesday, 1 July 2014

How to Reload/Refresh Page in Windows Phone

void ReloadPage()
{
NavigationService.Navigate(new Uri(NavigationService.Source + "?retry=true", UriKind.Relative));
}

 protected override void OnNavigatedTo(NavigationEventArgs e)
  {
     if (NavigationContext.QueryString.ContainsKey("retry"))
        {
            NavigationService.RemoveBackEntry();
         }
      base.OnNavigatedTo(e);
   }

Note:-Call ReloadPage() whenever you need to refresh/reload page.





No comments:

Post a Comment