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.
Asked
Active
Viewed 350 times
0
-
What does, `The project with UserControl is separate from the project with pages` mean? – Kulasangar Mar 21 '15 at 16:55
-
I have two projects: 1 - have .cs files, 2 - have views (xaml+.cs) – Georgy Mar 21 '15 at 16:56
-
Is that within the same solution? – Kulasangar Mar 21 '15 at 16:57
-
yes. first project for user controls and classes, second for views – Georgy Mar 21 '15 at 17:00
-
this one might help you. http://stackoverflow.com/questions/20420182/how-to-navigate-to-another-project-inside-same-solution – Kulasangar Mar 21 '15 at 17:04
-
Dear Kulasangar, it's work only on WP 8.0 and WP 8.1 Silverlight, I have WP 8.1 project – Georgy Mar 21 '15 at 17:06
-
The answer which is right below talks about WP8.1 http://stackoverflow.com/questions/20420182/how-to-navigate-to-another-project-inside-same-solution#answer-27639612 – Kulasangar Mar 21 '15 at 17:14
-
Thanks, I'm sorry, but I do not know very well English, I 'm trying to find a ready example on my question – Georgy Mar 21 '15 at 17:20
1 Answers
1
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)));

karan
- 3,319
- 1
- 35
- 44
-
welcome Georgy Gazaryan... if it worked. just give one up vote to my answer. ;) – karan Aug 18 '15 at 12:58