Hey guys!
I'm trying to do something I thought was rather simple. Before 2.2.0 I had the following code :
var mainPage = new MasterDetailPage
{
MasterBehavior = MasterBehavior.Popover,
Master = menuContentPage,
Detail = detailsContentPage
};
var navigationPage = new NavigationPage(mainPage);
Application.Current.MainPage = mainPage;
The way I reason about this code is "create a NavigationPage with its navigation stack's first child being a MasterDetailPage, so that I can later push other pages on top of the entire MasterDetailpage.". In 2.1.x it used to work fine, on UWP at least (did not test Android / iOS). However, in 2.2.0, the hamburger menu toggle is missing (while working just fine on Android). After no luck with Google, I decided to look inside Charles Petzold's book (great work with this one, by the way!), and found this :
The MasterDetailPage.Master and MasterDetailPage.Detail property elements are set to in-stances of MasterPage and DetailPage, respectively, but with a little difference: The Detail prop-erty is set to a NavigationPage, and the x:Arguments tags specify the DetailPage as the construc-tor argument. This is necessary to enable the user interface that lets the user switch between the mas-ter and detail pages on the Universal Windows Platform.
So I tried that, and indeed it works! However, by doing this, I loose the functionality of pushing new pages on top of the MDP. I need this pages to act and feel "modal", so the user shouldn't have any access to the side menu. I've seen it behaving sort-of right on Android if I push on the NavigationPage wrapper for the details page, in the sense that the drawer turns into a back button, and I could indeed disable the swipe gesture in that case, but it's a messy workaround, and besides, by doing it like this on UWP, both the hamburger toggle and back button show up, which is not what I want.
So my question to you guys is how can I achieve this behaviour? (if even possible)
Note that I need to support Android, iOS and UWP.
Thank you!