Hide or show the master page according to the page size

rc183rc183 CAMember
edited August 2018 in Xamarin.Forms
Hi,

In my xamarin app for UWP I try to hide I use a msster-detail page and I want to hide the master page if the width of the app is lower than 800px so in my constructor I bind a function to the sizechanged event and I change the MasterBehavior property to Popover or default according to the resolution but nothing change visually.

Have I missed something ?

Thanks !
Tagged:

Answers

  • ColeXColeX Member, Xamarin Team Xamurai
    edited August 2018

    Try to modify MasterDetailPage.IsPresented to hide or show the master page.

    Refer https://forums.xamarin.com/discussion/60223/how-to-programmatically-hide-master-page-in-masterdetailview-in-ios

  • rc183rc183 CAMember
    edited August 2018

    Hi,

    Thank you for your message.

    Yes, if I change the MasterBehavior property to Popover and set the IsPresented to false, the master page disapear but the burger top left button does not appears like it should do so it's impossible to open the master page again...

    I have tried to override the ShouldShowToolbarButton() method too but this method is never called by xamarin framework...

    I can't beleive there is no easy way to achieve that ?

Sign In or Register to comment.