Thread ID: |
Created: |
Updated: |
Platform: |
Replies: |
141633 | Dec 21,2018 10:40 PM UTC | Dec 24,2018 08:50 AM UTC | Xamarin.Forms | 1 |
![]() |
Tags: SfListView |
namespace ListViewSample
{
public partial class MainPage : ContentPage
{
public MainPage()
{
listView.SwipeStarted += ListView_SwipeStarted;
listView.ItemDragging += ListView_ItemDragging;
}
private void ListView_ItemDragging(object sender, Syncfusion.ListView.XForms.ItemDraggingEventArgs e)
{
int lastItemIndex = listView.DataSource.DisplayItems.Count-1;
if (e.Action == DragAction.Start && e.NewIndex == lastItemIndex)
e.Cancel = true;
}
private void ListView_SwipeStarted(object sender, Syncfusion.ListView.XForms.SwipeStartedEventArgs e)
{
int lastItemIndex = listView.DataSource.DisplayItems.Count-1;
if (e.ItemIndex == lastItemIndex)
e.Cancel = true;
}
}
}
|
This post will be permanently deleted. Are you sure you want to continue?
Sorry, An error occured while processing your request. Please try again later.
This page will automatically be redirected to the sign-in page in 10 seconds.