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.
Unfortunately, activation email could not send to your email. Please try again.

how to find node type

Thread ID:





98323 Feb 21,2011 04:48 AM Feb 24,2011 12:34 AM WPF 1
Tags: Diagram
Asked On February 21, 2011 04:48 AM


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?

Maria Amal Raj T [Syncfusion]
Replied On February 24, 2011 12:34 AM


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.

Maria Amal Raj T,
Diagram WPF&Silverlight Team,


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.

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.