-
Notifications
You must be signed in to change notification settings - Fork 1.9k
[Enhancement] Support drag-and-drop reordering in CollectionView #4676
Comments
As a side note, we have built custom renderers for XF 3.3/3.4 to bring this functionality to |
Also: Drag and drop onto another item Being able to drag and drop onto another item and having an event triggered that provides a references to the item that was dragged and the element that was dropped onto would be great as well. Thus: drag item -> drop onto other item -> trigger event Use case:
Having drag and drop and the corresponding event when dropping would allow a developer to do this. |
@bbl-Laobu I'm working on a nuget for this feature here DragNDrop. Working on the iOS implementation now. |
I believe this should be supported by XF (i.e. no need for a separate Nuget). |
@adrianknight89 Agree |
@velocitysystems You could go ahead and submit a PR if you have it working already. I don't see a reason against this feature. I'd change the property name though. Other things to keep in mind:
|
This would be a great addon to a CollectionView. |
I hope this will be supported on all 3 platforms (UWP, iOS, and Android) in Xamarin.Forms |
Any Status Update - this would be great !! |
What about raising a reward for someone who will do it ? 🍡 |
Did you get anywhere with iOS Peter? |
Do you have any links to examples of doing this? |
yup it's implemented in my Component here: |
I cannot thank you enough. Much appreciated. One question. When in Grid Layout mode with a single column is it also possible to have any form of grouping? With a group header view? If not, I wonder where would be a good place to start on adding that feature IYO? |
maybe it would be good idea to open a feature issue on the Sharpnado's repo and discuss it there cause I'm afraid we would mess this issue if we continue our discussion. |
Just an update - with the announcement of Maui, I'm a little hesitant to put too much time into new feature work on XF now, but just focusing on bug fixes. Perhaps in the meantime, would be best to focus on implementing this in a separate NuGet package which can be bolted onto XF. |
This would be soooo cool to have! And I see there is a lot of traction on this. I've put it on a list to make sure we have a look at this for .NET MAUI. Sadly, it won't happen for Forms anymore. If you have any detailed ideas about this, make sure to open a request on the .NET MAUI repo with all the details that you have on how you would like to use this. Thanks everyone for the time and effort that you put into this! |
I completed implementations for this in both Xamarin Forms & .NET MAUI. Here's the spec & pull request I submitted for .NET MAUI: @jfversluis would you be at all interested in having me submit this into the Xamarin Forms repo as well? Perhaps a new branch that way you have it just in case? I've got it ready to go here: Here are some standalone packages I wrote that everyone can use for the time being: |
@billvenhaus you're the GOAT! This stuff is amazing, thank you for pouring this into specs and even code. Like stated: I would love to have this in Forms, but at this time we can't add anything new because that will only add to the load of maintaining this while that is something that we want to phase out. I think this will be a great addition to .NET MAUI though, so let's see how it goes there :) |
Summary
Support drag-and-drop reordering in
CollectionView
.API Changes
When ReorderMode is set to Enabled, the view supports drag-and-drop reordering.
Upon dragging an item in the collection, the Move() method on the
ObservableCollection<T>
is called to signal the change to the dataset.Intended Use Case
Reordering a collection of elements ie. tasks, reminders, photos, tracks in a playlist etc.
Other Notes
Supported in iOS 9 and above+ in
UICollectionView
.https://github.com/xamarin/ios-samples/tree/master/ios9/CollectionView
Supported on Android in
RecyclerView
usingItemTouchHelper
.Supported on UWP in
GridView
usingCanReorderItems="true"
andReorderMode
.The text was updated successfully, but these errors were encountered: