AD
Administrator
Syncfusion Team
November 17, 2005 02:59 PM UTC
Hello Andy,
Essential Diagram has built-in support for Undo/Redo and copy/paste operations. Copy/paste can be implemented by responding to the appropriate keyboard events and summoning the Diagram.Controller.Cut/Copy/Paste methods. Please refer to the ''barItemEditCut_Click'', ''barItemEditCopy_Click'' and ''barItemEditPaste_Click'' methods in the MainForm.cs file of the InDepth\DiagramBuilder sample to view the diagram clipboard copy/paste API. In the case of a copy the new node will be a clone of the original node and will thus contain all properties of the original.
As for undo/redo of the copied nodes, this is automatically supported when using the diagram controller''s cut/copy/paste methods as shown in the sample.
For your database I/O, the best way to get notifications of node insertion/removal is by handling the Diagram.ChildrenChanging and ChildrenChangeComplete events. These events will be raised in response to cut/paste operations, and examining the event arguments will let you determine the involved node(s) and the ensuing operation.
I hope this helps. Please let us know if you require further assistance on this issue.
Regards,
Prakash Surendra
Syncfusion Inc.,