Once IsGestureEnabled is set to false, setting it to true again doesn't have any effect on iOS

rarenivarrarenivar USMember ✭✭

I need to toggle the value of my MasterDetailPage property of "IsGestureEnabled" when opening and closing its Master page. To accomplish this, I have an event handler to change the value of this property...

 this.IsPresentedChanged += ((object sender, EventArgs args) =>
            {
                System.Diagnostics.Debug.WriteLine("==> IsPresentedChanged event, this.IsPresented = {0}", this.IsPresented);
                this.IsGestureEnabled = this.IsPresented;
            });

This event handler works as expected, however, once I change the IsGestureEnabled property to false, setting it to true again doesn't have any effect on iOS. I think this is a Xamarin bug since I'm not the only one experiecing this issue (see here).

Is there a workaround for this?

Thanks.

Answers

  • Matthew.4307Matthew.4307 USMember ✭✭✭

    Where are you attaching this gesture? You'd be best off using Commands and setting the CanExecute of the command to only allow execution under the right conditions.

  • PhenmanPhenman USMember ✭✭✭
    edited March 2018

    I have same problem on Android. All nugets had updated. Any updates for that?

  • PhenmanPhenman USMember ✭✭✭

    @Phenman said:
    I have same problem on Android. All nugets had updated. Any updates for that?

    sorry, it was mistake in my code.

Sign In or Register to comment.