Cusomt Properties

Can custom properties be associated with custom symbols?
If so can the symbols on a diagram be searched to isolate this specific symbol?

1 Reply

RR Ramya R Syncfusion Team April 26, 2007 07:20 AM UTC

Hi Robin,

Yes. It is possible to add custom properties to the Custom Symbols. Kindly take a look at the CustomSymbol sample(Syncfusion\Essential Studio\4.4.0.51\Windows\Diagram.Windows\Samples\Symbol Design\CustomSymbol) which ships with our EssentialDiagram ProductPackage.

This sample demonstrates how to customize the behavior of a symbol designed with the Essential Diagram SymbolDesigner by subclassing it at the application level and also how to add properties and display only specific properties for the CustomSymbol.

If your intention is to know whether a symbol is CustomSymbol or not when it is selected, or when the mouse enters the node etc.. then it can done as shown in the code snippet below. The below given code snippet is used to find whether the symbol is a CustomSymbol or not when it is selected by a mouse click over the node.

private void diagram1_NodeClick(object sender, Syncfusion.Windows.Forms.Diagram.NodeMouseEventArgs evtArgs)
{
if(evtArgs.Node is MySymbol)
{
MessageBox.Show("This is a Custom Symbol");
}
}

Let me know whether this helps you.

Thanks & Regards,
Ramya.

Loader.
Up arrow icon