Skip to content

Dustbin - Copy or Move

A drag source can describe whether it should be copied or moved. Here the copy box can be dropped any number of times, while the move box is removed from the palette once it has been accepted by the dustbin (using the OnEnd callback and its DidDrop). Each box also sets its DropEffect, so the cursor shows whether it will be copied or moved. Released anywhere but the bin - or cancelled with Escape - the drag ends with DidDrop false, and the move box stays where it was.

Dropped 0 item(s)
Glass (keep) (copy)
Banana (take) (move)
An unhandled error has occurred. Reload 🗙