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. Image for the cookie policy date

how to find node type

hi,

how to find node type in nodedrop event. support i drag a triangle shape so i want to find the shape name in nodedrop event.. any help?


1 Reply

MA Maria Amal Raj T Syncfusion Team February 24, 2011 05:34 AM UTC

Hi,

Thanks for your interest in Syncfusion Products.

When a Node is dragged and dropped from SymbolPalette, DiagramView’s NodeDrop event will be fired. The Shape of the Node that is dropped can be determined using Shape property as shown in the following code snippet.

Code Snippet :

//Register Node Drop Event
diagramView.NodeDrop += new NodeDroppedEventHandler(diagramView_NodeDrop);

void diagramView_NodeDrop(object sender, NodeDroppedRoutedEventArgs evtArgs)
{
Node n = evtArgs.DroppedNode as Node;
string str = n.Shape.ToString();
MessageBox.Show("The Dropped Node's Shape is : " + str);
}

Here, diagramView is an instance of DiagramView

Please let us know if you have any queries.

Regards,
Maria Amal Raj T,
Diagram WPF&Silverlight Team,
Syncfusion-Chennai.


Loader.
Live Chat Icon For mobile
Up arrow icon