We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Getting an event when dropping a Symbol from a PaletteGroupView

Thread ID:





89312 Aug 21,2009 03:03 PM UTC Sep 3,2009 06:36 AM UTC WinForms 3
Tags: Diagram
Stephane Guerillot
Asked On August 21, 2009 03:03 PM UTC

This is my last question, thank you for your patience.

I've got a Diagram on the left side of my application (SyncFusion.Windows.Forms.Diagram.Controls.Diagram), and a PaletteGroupView (SyncFusion.Windows.Forms.Diagral.Controls.PaletteGroupView) on the right side. The Palette is dynamically filled with Nodes (BitmapNode to be precise), but the Diagram will only contain Rectangles (Syncfusion.Windows.Forms.Diagram.Rectangle).
I would like, when I drag&drop a Symbol from the Palette to the Diagram, to raise an event allowing me to delete the BitmapNode, and creating a Rectangle at the same place.
But it seems that the drop isn't done by a Tool, and I can't catch a MouseUp event or something approaching. The best I could do is to overrid the Clone function in the BitmapNode class. But I still need an event when the Node is dropped. Where could I find it ?

By the way, is there an event I could catch just before dropping a Node on the Diagram ? (to avoid Nodes intersecting each other for example)

Thanks again for your help.

Mano J [Syncfusion]
Replied On August 25, 2009 10:01 AM UTC

Hi Stephane,

Did you try NodeDropFromPalette event?. This event will trigger when you drag and drop a node from the palette to diagram web control.

DiagramWebControl1.NodeDropFromPalette += new Syncfusion.Web.UI.WebControls.Diagram.NodeDropFromPaletteEventHandler(DiagramWebControl1_NodeDropFromPalette);

void DiagramWebControl1_NodeDropFromPalette(object sender, Syncfusion.Web.UI.WebControls.Diagram.NodeDropFromPaletteEventArgs e)
// do something here.

Please let me know if you have any questions.

Best Regards,

Replied On September 2, 2009 03:56 PM UTC

Is there any event for diagram to capture the object being droped on it in Windows application?

Gowri Manohari D [Syncfusion]
Replied On September 3, 2009 06:36 AM UTC

Hi Joseph,

Diagram does not have direct event for your requirement. We can achieve it through some indirect method. Please refer the below code snippet. You can use either DragDrop event or NodeCollectionChanged event.

diagram1.Model.EventSink.NodeCollectionChanged+=new CollectionExEventHandler(EventSink_NodeCollectionChanged);
void EventSink_NodeCollectionChanged(CollectionExEventArgs e)
// Do something here

diagram1.DragDrop+=new DragEventHandler(diagram1_DragDrop);
void diagram1_DragDrop(object sender, DragEventArgs e)
// Do something here



This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon