Reputation: 3966
i'v added some button to my applicationBar, in which a refresh also exist & i attached an event handler onClick
to it, but i'v put this applicationBar in App.xaml & i am including it in my all pages, so now its getting exact uri from which page the refresh button has been clicked (ReloadUri
) with this code--->
private void ReloadBtn_Click(object sender, EventArgs e)
{
var ReloadUri = (((App)Application.Current).RootFrame.Content as PhoneApplicationPage).NavigationService.CurrentSource;
(Application.Current.RootVisual as PhoneApplicationFrame).Navigate(ReloadUri);
}
but in second line of code above the page not navigating (navigation not working)
Upvotes: 4
Views: 931
Reputation: 3966
solved !
fixed the issue using no-cache parameter
--->
(Application.Current.RootVisual as PhoneApplicationFrame).Navigate(new Uri(ReloadUri +"?no-cache="+Guid.NewGuid(), UriKind.Relative));
Upvotes: 2