You can get the drop item group in Xamarin.Forms SfListView using DisplayItems.
You can also refer the following article.
C#
Get the group details after dragging in ItemDragging event when the action is Drop. Get the drop item index using NewIndex from ItemDraggingEventArgs.
namespace ListViewXamarin
{
public class Behavior : Behavior<ContentPage>
{
SfListView ListView;
protected override void OnAttachedTo(ContentPage bindable)
{
ListView = bindable.FindByName<SfListView>("listView");
ListView.ItemDragging += ListView_ItemDragging;
base.OnAttachedTo(bindable);
}
private void ListView_ItemDragging(object sender, ItemDraggingEventArgs e)
{
if (e.Action == DragAction.Drop)
{
int dropIndex = e.NewIndex;
var dropItem = ListView.DataSource.DisplayItems[dropIndex];
var dropedGroup = GetGroup(dropItem);
App.Current.MainPage.DisplayAlert("Dropped group", "" + dropedGroup.Key, "Ok");
}
}
public GroupResult GetGroup(object itemData)
{
GroupResult itemGroup = null;
foreach (var item in this.ListView.DataSource.DisplayItems)
{
if (item is GroupResult)
itemGroup = item as GroupResult;
if (item == itemData)
break;
}
return itemGroup;
}
}
}
Output