If I do this inside a User Control:
NavigationService.Navigate(new Uri("/Alliance.xaml", UriKind.Relative));
it says this error:
An object reference is required for the non-static field, method, or property 'System.Windows.Navigation.NavigationService.Navigate(System.Uri)'
Thank you
Well, I solved passing the normal Page as an argument to the User Control, so I could get the NavigationService.
(Application.Current.RootVisual as PhoneApplicationFrame).Navigate(uri);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With