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

How to determine which SymbolPaletteItem was dropped on the view?

Thread ID:





80666 Apr 21,2009 02:37 PM UTC Apr 21,2009 07:25 PM UTC WPF 1
Tags: Diagram
Kevin Ashley
Asked On April 21, 2009 02:37 PM UTC

Hi, can you recommend the best way to determine what shape (SymbolPaletteItem) was dropped on the view? Thanks!

Nikhil A [Syncfusion]
Replied On April 21, 2009 07:25 PM UTC

Hi Kevin ,

I have explained this in the other thread in which you asked about adding a label to the item. However for your convenience I have posted the response in this thread too.

In our upcoming release(Volume 2) of EssentialDiagram which is scheduled to be in the next week, we have provided the support to identify the nodes being dropped on the page. The Name property of the SymbolPaletteItem can be used to identify the dropped node in the NodeDrop event as it becomes the name of the node on the page. This is particularly useful when you have to identify the item which was dropped and perform some operation on the node before it gets added to the view.

A name can be assigned to the item:

SymbolPaletteItem ss = new SymbolPaletteItem();
Label l = new Label();
l.Content = "Label";
ss.Content = l;

The NodeDrop event can be declared:

diagramView.NodeDrop += new NodeDroppedEventHandler(diagramView_NodeDrop);

Event Handler:

void diagramView_NodeDrop(object sender, NodeDroppedRoutedEventArgs evtArgs)
//user specifeid code


In this way identifying an item based on its name allows us to change the content or perform any operation on the node before it gets added to the page.

Please let us know if you have any queries or concerns.



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

or the page will be automatically redirected to 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