Search code examples
windows-phone-8navigationwindows-phone-8.1

Windows Phone 8.1 Navigation from usercontrol


I have control , which has navigation buttons . Please tell me how to navigate from a user control on the page.(The project with UserControl is separate from the project with pages). I tried to use: Frame.Navigate(typeof(SecondPage)); But project can have only one relationship.


Solution

  • Both Worked for me, to navigate from UserControl to Page:

    1. (Window.Current.Content as Frame).Navigate(typeof(MyUserControl));

    2. await Dispatcher.RunAsync(CoreDispatcherPriority.Normal, () => (Window.Current.Content as Frame).Navigate(typeof(MyUserControl)));