Using xamarin forms prism:
My intention is to have the user enter a pw when trying to navigate back from "View3" and allow the navigation only if pw is correct.
I have the following stack: MasterDetail/Navigation1/View1/View2/Navigation2/View3
When i try to navigate from view2 to navigation2, I use modal navigation. So I dont have 2 navbars..
Navigation2 has a custom "exit" button. When pressed, I want to navigate back to View2 so my stack will be: MasterDetail/Navigation/View1/View2
But when I try the following code, nothing happens:
_navigationService.GoBackAsync(useModalNavigation: false);
_navigationService.GoBackAsync(useModalNavigation: true);
_navigationService.GoBackToRootAsync();
And when I use _navigationService.NavigateAsync("MasterDetail/Navigation/View1/View2", useModalNavigation:true); it works but then it re-initialized the views, which i want to avoid.
What could be causing this? Am I doing something wrong? thanks for any input!