Frage

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)

War es hilfreich?

Lösung

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

(Application.Current.RootVisual as PhoneApplicationFrame).Navigate(new Uri(ReloadUri +"?no-cache="+Guid.NewGuid(), UriKind.Relative));
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top