Symbol Type On diagram

Hi 
I've got an issue 
how can I have type of a symbol that used in a diagram programmatically
for example I need to know that this symbol is a LineConnector or a Contact or something Else!!
FullName property is not my need ! I Need The type 

Thanks 
Best Regards 


1 Reply

DT Deepa Thiruppathy Syncfusion Team December 21, 2022 12:27 PM UTC

Hi Mohammad


Requirement: How to get the symbol type


You can get the symbol type using GetType method. We have shown the node type in the NodeSelected event.


Code snippet:


//Adding NodeSelected event.

diagram1.EventSink.NodeSelected += EventSink_NodeSelected;

private void EventSink_NodeSelected(NodeSelectedEventArgs evtArgs)

{

    //Get and show the type of a node.

    var type = evtArgs.Node.GetType();

    MessageBox.Show(type.Name);

}

 


If we misunderstood your requirement, then please share your requirement with more details.


Regards,

Deepa Thiruppathy


Note: If this post is helpful, please consider Accepting it as the solution so that other members can locate it more quickly.


Loader.
Up arrow icon