How do you control the sensivity (or turn off) of a swipe gesture in Swipe View?

70 Views Asked by At

I have searched for all the open issues on this and did not find anything conclusive.

My use case is pretty simple: I have a SwipeView, and I want it to open/close it programmatically based on a button click event. It works very well, but the "sliding" recognition of the SwipeView interferes, and when you slightly touch the screen it triggers the sliding animation (and cancels it right away if its below a certain treshold).

I have tried to work with the Swipe events:

    SwipeStarted += SwipeViewSwipeStarted;
    SwipeChanging += SwipeViewSwipeChanging;
    SwipeEnded += SwipeViewSwipeEnded;

But the issue is that whenever SwipeStarted is raised, it is already too late to do anything because the recognized swipe gesture already triggered the sliding animation.

I tried to work with setting IsEnabled/Disabled, but the issue is that the button opening the SwipeView being child of a SwipeViewItem, it is disabled as well.

Isn't there any workaround this or should I open another issue on the GitHub for that? Thanks a lot for your input.

0

There are 0 best solutions below