locked
UWP MasterDetails shows no hamburger RRS feed

  • Question

  • User215313 posted

    Hi guys, I'm creating an app in Xamarin Forms for all platforms. There is a MasterDetail and when I select an item from the menu in the MainPage, it shows the page in the DetailPage. In iOS and Android it's working but I have a problem with UWP. What can I do? Thanks




    Thursday, August 10, 2017 8:57 AM

Answers

  • User42522 posted

    @EnricoRossini Yes, I see it now. The left menu vanishes on clicking on any menu item. This appears to be a bug. Because when I commented "IsPresented = false", the list doesn't get dismissed. That may be useful on the laptop but not in mobiles.

    Also since Device.RuntimePlatform is set to Device.Windows for UWP, it will not help in Windows Mobile.

    So this is definitely a bug in the default MasterDetailPage template. Now some Xamarin guy should chip in.

    • Marked as answer by Anonymous Thursday, June 3, 2021 12:00 AM
    Thursday, August 10, 2017 2:32 PM

All replies

  • User42522 posted

    @EnricoRossini Do you have any menu items listed in the Master? Because, I have an app that has got 5 menu items in the Master list. On the laptop the UWP app displays the menu list on left and the details page on the right, in a split window. On Windows Mobile the same UWP app displays the hamburger icon.

    Thursday, August 10, 2017 1:48 PM
  • User215313 posted

    Same scenario but I can't see the menu on the left when I change page with

        void NavigateTo(MenuItems menu)
        {
            if (menu == null)
                return;
    
            Page displayPage = (Page)Activator.CreateInstance(menu.TargetType);
            Detail = new NavigationPage(displayPage)
            {
                BarTextColor = Color.White,
                BarBackgroundColor = (Color)App.Current.Resources["MenuBackgroundColor"]
            };
    
            menuPage.Menu.SelectedItem = null;
            IsPresented = false;
        }
    
    Thursday, August 10, 2017 1:52 PM
  • User42522 posted

    @EnricoRossini Yes, I see it now. The left menu vanishes on clicking on any menu item. This appears to be a bug. Because when I commented "IsPresented = false", the list doesn't get dismissed. That may be useful on the laptop but not in mobiles.

    Also since Device.RuntimePlatform is set to Device.Windows for UWP, it will not help in Windows Mobile.

    So this is definitely a bug in the default MasterDetailPage template. Now some Xamarin guy should chip in.

    • Marked as answer by Anonymous Thursday, June 3, 2021 12:00 AM
    Thursday, August 10, 2017 2:32 PM
  • User215313 posted

    Thank @ShantimohanElchuri You are totally right!

    Thursday, August 10, 2017 2:54 PM
  • User167259 posted

    @DavidOrtinau I've encountered this bug as well in the latest stable release of Xamarin Forms. I haven't had the time yet to write up a sample project demonstrating the bug. I've been running into an issue with the back arrow disapearing on me when using the tabbed page and switching back and forth between the tabs.

    Thursday, August 10, 2017 7:10 PM
  • User167259 posted

    I posted the following bug report to bugzilla.
    https://bugzilla.xamarin.com/show_bug.cgi?id=58707

    Thursday, August 10, 2017 7:38 PM
  • User42522 posted

    @"AlmaJensen.9398" and @EnricoRossini This is what I found during the weekend. Thanks to @JohnMiller at a Phili User group meeting.

    In the MasterDetailPage's XAML, set the following:

    MasterBehavior="Popover"
    

    Let me know if you find any issue with this.

    Monday, August 14, 2017 2:49 PM
  • User167259 posted

    Yeah, that popover feature is something new to me. There were some other issues I was having. There are notes and links to other related articles in my bugzilla bug report. But generally the issues I was running into have been resolved in the nightly builds. I just need to get those fixes in a release.

    Monday, August 14, 2017 6:46 PM