This is a migrated thread and some comments may be shown as answers.

ListView swipe inside MasterDetailPage

1 Answer 164 Views
ListView
This is a migrated thread and some comments may be shown as answers.
Mikhail
Top achievements
Rank 1
Mikhail asked on 20 Sep 2017, 11:18 PM

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.

1 Answer, 1 is accepted

Sort by
0
Lance | Manager Technical Support
Telerik team
answered on 21 Sep 2017, 03:54 PM
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
Tags
ListView
Asked by
Mikhail
Top achievements
Rank 1
Answers by
Lance | Manager Technical Support
Telerik team
Share this question
or