Using Xamarin Forms, I have a MasterDetailPage whose Master is a list of menu options and Detail is a NavigationPage that contains a ContentPage. If I push a second page onto the Detail's NavigationPage, the icon that used to open the menu becomes a back button. I want to override this behavior so that icon always opens the menu. I have a subheader with a custom back button which is why I need the Detail to be a NavigationPage.
3
votes
3 Answers
0
votes
0
votes
I found there are a lot of ways to make a new screen pop up with the Master Detail Page. The one that stopped the back button from showing up for me was:
((MasterDetailPage)Application.Current.MainPage).Detail = new NavigationPage(page);
where "page" is whatever screen you want to set it to. For example:
((MasterDetailPage)Application.Current.MainPage).Detail = new NavigationPage(new ResultsPage());