Search code examples
c#mauivisual-studio-2022maui-windows

How to move the elements of a list view by dragging them MAUI


I have a list of ViewCell containing an image and two labels. I have to be able to select an element and move it above or below to change the position to the element, so that you can customize the position of the elements on the list. The Listview is a link to an ObSustacollection that gets the elemners when you enter the page. I tried to replicate this question with the drag and drop but I can't get the same desired result.

I would like to be able to move the elements of the list freely, even with some faces effect


Solution

  • For the original ListView or CollectionView, you can not move the elements by dragging them manually. But you can check this link about the CollectionView Drag & Drop Item Reordering Spec. The auther provide a Nuget package to achieve the effect you want.