We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

how can add a rectangle to diagram

I could add diagram programatically in UI.
But how can I add nodes like rectangle/ellipse etc to a diagram?

give me ur valuable suggestions

Thanks
Jiss


1 Reply

AD Administrator Syncfusion Team May 9, 2008 07:32 AM UTC

Hi Jiss,

Thank you for using Syncfusion products.

You can use Ellipse and Rectangle classes for creating diagram shapes ellipse and rectangle.

Please use the following code snippet.

[C#]

// Creating Ellipse
Ellipse ell = new Ellipse(30, 30, 150, 50); this.diagram1.Model.AppendChild(ell);

// Creating Rectangle
Syncfusion.Windows.Forms.Diagram.Rectangle rec = new Syncfusion.Windows.Forms.Diagram.Rectangle(90, 190, 70, 70); this.diagram1.Model.AppendChild(rec);

Sample reference :

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

Please also refer the shipped sample from the below location on creating shapes.

..\My Documents\Syncfusion\EssentialStudio\ 6.2.0.40\Windows\Diagram.Windows\Samples\2.0\Designing Symbols\SimpleFlow

Please let me know if this helps you.

Regards,
Jaya


Loader.
Live Chat Icon For mobile
Up arrow icon