ListView swipe inside MasterDetailPage

2 posts, 0 answers
  1. Mikhail
    Mikhail avatar
    12 posts
    Member since:
    Jul 2017

    Posted 20 Sep Link to this post

    In application I have MasterDetailPage and Detail page is set to NavigationPage. Several pages under NavigationPage have ListView control with swiping enabled. Swiping works fine with Android. In iOS, however, when I swipe ListView item to the right it swipes the item AND also slides out the Master Detail menu.

    I would rather not set 

    IsGestureEnabled = false;

     

    on MasterDetailPage, because if I am not at the root page in Navigation stack, then there is no way to bring up Master Detail menu (except for navigating back, of course).

    Could you propose any solution for this? Thanks.

  2. Lance | Tech Support Engineer, Sr.
    Admin
    Lance | Tech Support Engineer, Sr. avatar
    419 posts

    Posted 21 Sep Link to this post

    Hello Mikhail,

    You can disable it only when the view that contains the RadListView is loaded. For this, you can use the view's OnAppearing and OnDissappearing overrides.

    I've attached a full demo, run it and select "RadListView Page" from the MasterPage's list. You'll navigate to the page and gestures for the MasterDetail are temporarily disabled. If you navigate pack to "Home Page", the gesture is enabled again.

    Here is the relevant code from "DetailPage2" that contains the RadListView.

    protected override void OnAppearing()
    {
        base.OnAppearing();
     
        App.MasterDetailPage.IsGestureEnabled = false;
    }
     
    protected override void OnDisappearing()
    {
        base.OnDisappearing();
                 
        App.MasterDetailPage.IsGestureEnabled = true;
    }

    Let me know if you have any further questions.

    Regards,
    Lance | Tech Support Engineer, Sr.
    Progress Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top