Hi Ahm,
Thanks for using Syncfusion products.
We suggest you to use the Node’d ‘Fillstyle.Color’ and ‘LineStyle.LineWidth’ property to change the clor and linewidth of a node respectively.
Please refer the below code snippet:
[C#]
Syncfusion.Windows.Forms.Diagram.Rectangle rect = new Syncfusion.Windows.Forms.Diagram.Rectangle(100, 100, 75, 50);
rect.FillStyle.Color = Color.Blue;
rect. LineStyle.LineWidth = 2;
To iterate through all the nodes in diagram control on the button click, we suggest you to use the following code snippet:
[C#]
NodeCollection nodes = this.diagram1.Model.Nodes;
foreach(FilledPath node in nodes)
{
if (node.Name == "Rectangle")
{
node.FillStyle.Color = Color.Yellow;
node.LineStyle.LineWidth = 2;
}
}
For your convenience, we have created a simple sample to achieve your requirement.
Please try the below sample and let us know if you have any queries.
forum changing fllstyl on btnclk782123536.zipRegards,
Amsath Ali. M