Forum General

Disable Swipe functionality in particular page

tamalausttamalaust Member ✭✭

Hello, I have a page which captures signature. The issue is when user trying to sign, for swiping gestures left menus (sliding menus) are coming out.
Now , I want to disable swiping gesture for this particular page, not for whole application. Some solutions I am seeing regarding "IsGestureEnabled=false" in master detail page , seems like it is going to disable swiping activity in whole app (if I am not getting it wrong), not in any particular page.

If someone can provide a suggestion or insight for what I am trying to achieve, that would be a great help.

Have a wonderful day.

Tagged:

Best Answer

  • tamalausttamalaust Member ✭✭
    Accepted Answer

    Found solution work for me :smile:
    protected override void OnAppearing()
    {
    base.OnAppearing();
    (Application.Current.MainPage as RootPage).IsGestureEnabled = false;
    }

        protected override void OnDisappearing()
        {
            base.OnDisappearing();
            (Application.Current.MainPage as RootPage).IsGestureEnabled = true;
        }
    

Answers

  • tamalausttamalaust Member ✭✭
    Accepted Answer

    Found solution work for me :smile:
    protected override void OnAppearing()
    {
    base.OnAppearing();
    (Application.Current.MainPage as RootPage).IsGestureEnabled = false;
    }

        protected override void OnDisappearing()
        {
            base.OnDisappearing();
            (Application.Current.MainPage as RootPage).IsGestureEnabled = true;
        }
    
Sign In or Register to comment.