ADAdministrator Syncfusion Team July 27, 2004 07:42 AM
The ''Container'' that you refer to has to be an instance of the Essential Diagram Diagram.Controls.Diagram control type in order to process the Diagram Shapes and Symbols objects dropped on it and render these as diagram entities. As demonstrated in the DiagramBuilder sample, symbols can be represented using a SymbolPalette control from which the Symbol items may be dragged and dropped on the Diagram control. As for Shapes, these will have to rendered using the Shape tools triggered via toolbar or other user initiated commands. The DiagramBuilder sample source shows how to create and use the various Diagram tools for drawing shapes.
Another venue that you could explore for implementing a system where both shapes as well as symbols can be dragged off a ''palette type'' control and dropped onto a diagram instance is by using an instance of the diagram control itself to implement the palette. The palette diagram control''s shapes and symbols can be locked in place by setting the appropriate EditStyle property. Upon selecting a Shape or Symbol item on the palette, copy the node onto the clipboard using the Diagram clipboard copy/paste routines (Diagram.Copy(), Diagram.Paste()) and handle the mouse up events in the target diagram control to paste the diagram node onto the target control. The DiagramBuilder sample shows a simple representation of clipboard copy/paste that you can refer to.