I would like my app to show a Login page, then a MasterDetail page with a 'hamburger' menu. On the hamburger menu I want a Log Out entry that closes the Master Detail and shows the Login page again. I have all but the log out part working.
I have copied code from the MvvmCross Playgrounds sample, specifically the MixedNavFirstPage (which fakes a login procedure), MixedNavMasterDetailPage (the 'hamburger menu'), and MixedNavMasterRootContentPage.
If I try to close the MixedNavMasterDetailPage with await _navigationService.Close(this)
then I get a null reference exception in MvxFormsPagePresenter.CloseMasterDetailPage()
This question How to Exit (or Navigate out of )a MasterDetail page to a simple ContentPage in Xamarin. Forms? covers what I want to do in straight Xamarin.Forms, I'm just not sure how to do the equivalent in MvvmCross.
_navigationService.Navigate(typeof(LoginViewModel))
- where LoginViewModel is my equivalent of the Playground's MixedNavFirstPage - and that seemed to work in that I got my login page again. But... on logging in a second time I don't get the master detail page again, just a blank page. – PaulDNavigate(typeof(LoginViewModel))
and it seemed to work. Perhaps another example of unreliable VS Mac/Android interaction? – PaulD