I am developing XF app for iOS and Andorid. I need to use Menu in my project. I followed this article to use MasterDetail navigation page - https://www.syntaxismyui.com/xamarin-forms-masterdetail-page-navigation-recipe/. And it is working fine.
But now I need to use navigation page before using MasterDetails page. Let me explain with an example -
*** LoginPage.cs is a simple content page that will be shown when app starts. After successful login app will show Menu (using MasterDetail navigation page).
In my App.cs file I have used
MainPage = new LoginPage ();
In LoginPage after successfully login, I am using the code to load Menu (MasterDetails page)
Application.Current.MainPage = new RootPage () // RootPage is a subclass of MasterDetail page
But problem is - after showing Menu, app is crashing without not showing any message in application log. I investigated and debug and found that app is crashing due to "Application.Current.MainPage = new RootPage ()". Though this code should be work.
So, my question is what is the best practice to use MasterDetail page after using normal navigation page ( MainPage = new LoginPage (); ).
Any suggestion will be highly appreciable!