GoPalette Cut and Paste


is is possible to change the node object when dragged from GoPalette and dropped to GoView?
The dragged object should be different to the dropped object.
Best regards
Georg Mackenbrock

The common thing to do is to implement a GoView.ExternalObjectsDropped event handler. You can examine all of the newly copied GoObjects that were created by the standard GoView.DoExternalDrop method, and modify them or replace them as you see fit. If you really don't want the standard drop behavior to occur, you need to override GoView.DoExternalDrop and maybe GoView.DoExternalDrag. By the way, although this isn't what you are asking for, it is also common to implement toolbars by using other controls and calling Control.DoDragDrop from there, and handling the drop of non-GoObjects in the override of GoView.DoExternalDrop. This is what several of the sample applications do--for example, see OrgCharter\GraphView.cs.