Unhandled Exception : System.InvalidOperationException: Can't change IsPresented when setting Popove

HamsterHamster RSMember ✭✭
edited May 4 in General

Hey guys.

When I test my app on Tablet, I get the following error when I try to set IsPresented to false in the MasterDetailPage's constructor :

    public Drawer()
            {
                InitializeComponent();
                this.BindingContext = Storage.AppLanguage;

                mainPage = new NavigationPage(new MainPage());
                Detail = mainPage;
                MasterBehavior = MasterBehavior.Popover;
                IsPresented = false;
            }

The error will show up regardless of MasterBehavior value and it shows only in constructor.
"System.InvalidOperationException: Can't change IsPresented when setting Popover"

This results in Application starting with an open Drawer that is shown until the user taps on any of the Drawer items to set IsPresented to False.

I did some googling and this was brought up in the past, but no one figured out a solution to the issue.

Any thoughts?

edit : can mod please move the topic to Xamarin Forms forum? Posted by mistake here.

Edit 2 :

Even trying to instantiate Drawer and then set IsPresented in the next line doesn't work.
But setting it from a Menu Item callback works.

Sign In or Register to comment.