Created
May 31, 2014 19:32
-
-
Save detroitpro/eadddec2911b03a442ac to your computer and use it in GitHub Desktop.
Can I disable master in Xamarin.Forms MasterDetailPage
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment