OnNavigatedTo not firing unless I navigate to NavigationPage #2520
Unanswered
stavroaudi
asked this question in
Xamarin.Forms
Replies: 1 comment 1 reply
-
Hard to say without seeing code, but chances are you're doing something wrong 😄 Also, do not use the Prism navigation service in a view's code-behind. It's not designed to be used there. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have register my pages and NavigationPage in my App.xaml.cs class, and the app works perfectly fine throughout. However, when navigating from MainPage to PageA, OnNavigatedTo isn't fired. But when I go from PageA to PageB and then hit back (prismNav: GoBack), OnNavigatedTo is fired on PageA.
The only way that it's currently working for me is when I navigate from MainPage to PageA like: navigationService.NavigateAsync("NavigationPage/MainPage/PageA", contents);
Right now my navigation is like this:
App.xaml.cs:
NavigationService.NavigateAsync("NavigationPage/MainPage");
MainPageViewModel:
NavigationService.NavigateAsync("PageA", contents);
and OnNavigatedTo isn't fired at all on PageA
Beta Was this translation helpful? Give feedback.
All reactions