Forum Xamarin.Forms

MasterDetail: Hamburger icon no visible on UWP

Ben.2646Ben.2646 USMember ✭✭
edited January 2017 in Xamarin.Forms

The hamburger icon is not visible when the master part of MasterDetail view is closed in UWP project.
You can reproduce the bug with this sample:
https://github.com/xamarin/xamarin-forms-samples/tree/master/Navigation/MasterDetailPage

How can I make this icon reappear?
You can see this bug on the attached screenshot.

Best Answer

Answers

  • ainsophicalainsophical USMember ✭✭
    edited May 2017

    @DStenroejl I can confirmed this works! Thank you so much!

    However, Device.OS is obsolete. Use:

    if (Device.RuntimePlatform == Device.Windows) { Master.Icon = "swap.png"; MasterBehavior = MasterBehavior.Popover; }

  • AlbertoMandlateAlbertoMandlate USMember
    edited July 2017

    I just put this code and it works... Thank you guys.

    public MainPage()
    {
    InitializeComponent();

            if (Device.RuntimePlatform == Device.Windows )
            {
                MasterBehavior = MasterBehavior.Popover; // Added this line of code
            }
        }
    
Sign In or Register to comment.