Different SwipeOffset for left and right swipe

Is it possible for an item in an sfListView with AllowSwiping set to true to have two different SwipeOffset values? In other words, I'd like to have the maximum width of the area uncovered by swiping be different on the left and right. Is this possible?

Thanks in advance

4 Replies

RS Rawoof Sharief Muthuja Sherif Syncfusion Team June 14, 2018 07:13 AM UTC

 
Thanks for contacting Syncfusion support. 
 
We have checked the reported query “Need different swipe offset for left and right swipe” from our end. We would like to let you know that you can achieve your requirement by finding the direction of swiping from the Swiping event of SfListView like below code snippet. 
 
Code example[C#]: 
public partial class SwipingPage : ContentPage 
    { 
        public SwipingPage() 
        { 
            InitializeComponent(); 
            listView.Swiping += ListView_Swiping; 
 
        } 
private void ListView_Swiping(object sender, SwipingEventArgs e) 
        { 
            if (e.SwipeDirection == SwipeDirection.Right) 
                listView.SwipeOffset = 300; 
            else 
                listView.SwipeOffset = 100; 
        } 
 
For your reference we have attached the sample and you can download it from the below link. 
 
 
Please let us know if you require further assistance. 
 
Regards, 
Rawoof M. 
 
 



BU Burton June 14, 2018 09:40 PM UTC

That worked! Thank you so much!


DB Dinesh Babu Yadav Syncfusion Team June 18, 2018 01:49 AM UTC

Hi Burton, 
  
Thanks for the update. 
  
Regards,  
Yuvaraj C 



YC Yuvaraj Chandrasekaran Syncfusion Team June 18, 2018 04:07 AM UTC

Hi Burton, 
  
Thanks for the update. 
  
Regards,  
Yuvaraj C 


Loader.
Up arrow icon