The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
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)
MJMano J Syncfusion Team 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);
Is there any event for diagram to capture the object being droped on it in Windows application?
GMGowri Manohari D Syncfusion Team 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 }