We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

swipe left/right

Hi! First, sorry in advance for my poor English.
I started in xamarin programming and had to use syncfusion to implement a left or right swipe system in a listview.

Actually I have created my SfListView, allowing it to display an icon if you swipe it left or right.
I know how to launch a SwipeEnded action, but I am unable to differentiate a left swipe from a right swipe, out I need to do a different action on the case.

I try to search on the forum and via google, But I do not find anything ... I also try different things (such as trying to use "SwipeDirection" in an if, without success...How can I do it?

3 Replies

DB Dinesh Babu Yadav Syncfusion Team August 22, 2017 06:00 AM UTC

Hi FLecointe, 
 
Thank you for using Syncfusion Products 
 
You can achieve the reported requirement “Need to perform different actions for left and right swipe” by loading different views to both left and right swipe by using LeftSwipeTemplate(swiping towards right) and RightSwipeTemplate(swiping towards left). Please refer the following UG documentation link for more information about “Working with swiping” in SfListView. 
 
 
Also, you can find the swiped item’s direction, item data, item index and offset value from SwipeEndedEventArgs and please refer the following UG documentation link for more reference. 
 
 
For your reference, we have attached the working sample which shows Favorite icon in left swipe and Delete icon in right swipe and you can download it from the below link. 
 
 
Please let us know if you require further assistance. 
 
Regards, 
Dinesh Babu Yadav 
 



FL FLecointe August 24, 2017 07:13 AM UTC

that work, thanx :)



DB Dinesh Babu Yadav Syncfusion Team August 25, 2017 02:15 AM UTC

Hi FLecointe, 
 
Thanks for the update. 
 
Regards, 
Dinesh Babu Yadav 
 


Loader.
Live Chat Icon For mobile
Up arrow icon