Xamarin.forms using Prism Navigation back is not working in below scenario :
- App.xaml.cs in
OnInitializedNavigationService.NavigateAsync(nameof(LoginView)); - In LoginViewModel once login I am navigating to MainPage
await _navigationService.NavigateAsync(new Uri("MainPage", UriKind.Relative),useModalNavigation:true, animated: false); - MainPaga has a Button once I click in Button it will Popup setting Page navigation Popup like :
await _navigationService.NavigateAsync(new Uri("SettingView", UriKind.Relative), useModalNavigation: true, animated: false); SettingView(Popup) has a Button(LogOut) once I click on Button(LogOut) it has to go back in LoginView here is the code navigating back.
await _navigationService.ClearPopupStackAsync(animated: false); await _navigationService.GoBackAsync(useModalNavigation: true, animated: false);
first I am Clearing Popup then navigating back, but it wont navigate back to LoginView?