I have 4 racks in the GoView. I want to allow drop only on the racks, so I set the propertie allowdrop of the GoView to false, and I can’t drop the node anywhere. The other idea is in the dragover method when the node is not over a rack “show the icon to avoid the drop”, but I don’t know how to know if is the node is draging over the rack, how can I know that?
Any suggestion?
Thanks in advance!
GoView.AllowDrop has to be true in order to allow any drop at all.
It would be easiest to implement a GoView.BackgroundSelectionDropReject event handler that always set the GoInputEventArgs.InputState to GoInputState.Cancel.
If you have top-level objects other than racks, you’ll need to either implement a GoView.ObjectSelectionDropReject event handler to cancel for those kinds of objects, or override their GoObject.OnSelectionDropReject to return true.
Thank you! it works great! and so easy!