Xamarin Forms Prism - navigation stops working when you change RootPage too many times

Steps to reproduce (according to attached sample):

  • Run app,
  • Navigate to Login Page (_navigationService.NavigateAsync("app:///Login") <- Login page is our RootPage
  • Hit Login
  • Navigates to master-detail MainPage (_navigationService.NavigateAsync("app:///Index/Navigation/Items") <- Index page is our RootPage
  • Navigate to About page
  • Go back
  • Hit Logout <- navigates back to Login Page (_navigationService.NavigateAsync("app:///Login") <- Login page is our RootPage
  • Hit Login
  • Navigates to master-detail MainPage (_navigationService.NavigateAsync("app:///Index/Navigation/Items") <- Index page is our RootPage
    [ISSUE] There is no possible to navigate to About page

Steps are the same after changing RootPage but _navigationService.GetNavigationUriPath(); is different doing it 1st time and in the next time ?

I do something wrong or there is a bug in Prism ?

I have checked NavigationStack and is ok.

Best Answer

  • SeRgI.8537SeRgI.8537 PL ✭✭
    Accepted Answer

    Ok, I have found - I shouldn't register MenuViewModel as a Singleton :disappointed:

Answers

  • SeRgI.8537SeRgI.8537 PLMember ✭✭
    Accepted Answer

    Ok, I have found - I shouldn't register MenuViewModel as a Singleton :disappointed:

Sign In or Register to comment.