punker76 / gong-wpf-dragdrop

The GongSolutions.WPF.DragDrop library is a drag'n'drop framework for WPF
BSD 3-Clause "New" or "Revised" License
2.25k stars 392 forks source link

Is it possible for dropped item to replace empty placeholder item in target list, instead of being just inserted #484

Open neyc00 opened 4 months ago

neyc00 commented 4 months ago

What steps will reproduce this issue?

Drag and drop ListBox item from one list to another.

Expected outcome

Is it possible to drag an item to a list which has some empty placeholder objects and when item is dropped on placeholder, this object is replaced by the dropped object and the source list gets the empty placeholder, so the number of items on each list remains the same.

I attached a gif, which shows two lists with same number of items. When item is dragged and dropped, it is moved from one list to another. What I would like to achieve is how to handle the drop so the placeholder item from one list is just replaced by the dropped item from other list.

Current behaviour: gif2

Wanted behaviour: Gif_correct

yunofuture commented 2 weeks ago

I also want to know if there is a way to achieve this.