Drawing a node with rounded edges

Hello

I would like to know if a square (or rectangular) node can be drawn having rounded edges.

If the node happens to be a ControlNode with a control inside, would it work?

Thanks a lot.


1 Reply

SR SubhaSheela R Syncfusion Team January 3, 2008 11:43 AM UTC

Hi Emoscosocam,

Thank you for using Syncfusion products.

1. Drawing a node with rounded edges:

A node with rounded edges can be created by using the class RoundRect. Please refer the below code snippet to achieve this:

Syncfusion.Windows.Forms.Diagram.RoundRect rr = new Syncfusion.Windows.Forms.Diagram.RoundRect(100, 100, 200, 100, MeasureUnits.Pixel);
rr.CurveRadius = 20f;
this.diagram1.Model.AppendChild(rr);

Please refer to the below sample that illustrates the same:

http://websamples.syncfusion.com//samples/Diagram.Windows/F70809/main.htm

2. If the node happens to be a ControlNode with a control inside, would it work?

Yes. You can use the controls inside the ControlNode. Please refer to the below browser sample to achieve this:

{Installation Drive}\Documents and Settings\{UserName}\My Documents\Syncfusion\EssentialStudio\6.1.0.34\Windows\ Diagram.Windows\Samples\2.0\Technology\ControlsGalore\cs

Please let me know if you have any questions.

Regards,
Subhasheela R


Loader.
Up arrow icon