Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 58056

Disable Master part of MasterDetailPage

$
0
0

I'm using a MasterDetailPage for my RootViewController. When a user is not authenticated I set the Detail to a full screen login page. Is it possible to disable the master (navigation list) so that the Details acts like a Modal?

`
public static Page GetMainPage()
{
var masterDetailPage = new MasterDetailPage ();
masterDetailPage.Master = new MenuPage (masterDetailPage);

        if(User.IsNotAuthenticated){
            //HERE IS WHERE I WOULD LIKE TO DISABLE THE MASTER
            masterDetailPage.Detail = new NavigationPage (new LoginPage ()) { };

            //This does not do anything.
            masterDetailPage.Master.IsEnabled = false;
        } else {
            masterDetailPage.Detail = new NavigationPage (new CreateWantPage ()) { };
        }


        return masterDetailPage;
    }

`

Here is a link to a gist with better formatting.

https://gist.github.com/detroitpro/eadddec2911b03a442ac


Viewing all articles
Browse latest Browse all 58056

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>