Hi Christian,
Thanks for your interest in Syncfusion products.
We suggest you to use the Diagram’s ‘NodeSelected/Deselected’ event and Diagram.View’s ‘SelectionList’ property to find whether the given node is selected or not. Please refer the below code snippet to achieve your requirement.
Here is the code:
[C#]
diagram1.EventSink.NodeSelected += new Syncfusion.Windows.Forms.Diagram.NodeSelectedEventHandler(EventSink_NodeSelected);
diagram1.EventSink.NodeDeselected += new NodeSelectedEventHandler(EventSink_NodeDeselected);
void EventSink_NodeSelected(Syncfusion.Windows.Forms.Diagram.NodeSelectedEventArgs evtArgs)
{
if (diagram1.View.SelectionList[0] is CustomNode)
{
listBox1.Items.Clear();
listBox1.Items.Add("custom Node selected");
}
}
Here is the sample:
F102820-225975699.zipPlease try the above sample and let us know if you have any queries.
Regards,
Amsath Ali. M