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 : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

how to find node type

Thread ID:

Created:

Updated:

Platform:

Replies:

98323 Feb 21,2011 09:48 AM UTC Feb 24,2011 05:34 AM UTC WPF 1
loading
Tags: Diagram
trinadh
Asked On February 21, 2011 09:48 AM UTC

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?


Maria Amal Raj T [Syncfusion]
Replied On 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.


CONFIRMATION

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.

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

;