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)

有帮助吗?

解决方案

solved !
fixed the issue using no-cache parameter--->

(Application.Current.RootVisual as PhoneApplicationFrame).Navigate(new Uri(ReloadUri +"?no-cache="+Guid.NewGuid(), UriKind.Relative));
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top