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.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How do I add a Diagram to a form?

 

Using the designer:

First, make sure you have added both the Syncfusion.Shared (namespace: Syncfusion.Windows.Forms) and Syncfusion.Diagram (namespace: Syncfusion.Windows.Forms.Diagram) controls to your tool box. You do this by right-clicking on your tool box and clicking all the components in these namespaces that you find listed under .NET Framework Components.

Once you have the Diagram components in your tool box, drag-and-drop the Diagram component onto your form. The model, view, and controller objects are available as properties under the MVC category in the Properties window.

From code:

[C#] using Syncfusion.Drawing; using Syncfusion.Windows.Forms.Diagram;        ....    private Syncfusion.Windows.Forms.Diagram.Controls.Diagram diagram1;        ....    // minimal code to create a diagram on a form this.diagram1 = new Syncfusion.Windows.Forms.Diagram.Controls.Diagram();

//add the Diagram control to the Form's control list this.Controls.Add(this.diagram1);

[VB.NET] Imports Syncfusion.Drawing Imports Syncfusion.Windows.Forms.Diagram        ....   Private diagram1 As Syncfusion.Windows.Forms.Diagram.Controls.Diagram        ....   ' minimal code to create a diagram on a form Me.diagram1 = New Syncfusion.Windows.Forms.Diagram.Controls.Diagram()   'add the Diagram control to the Form's control list Me.Controls.Add(Me.diagram1)

Article ID: Published Date: Last Revised Date: Platform: Control:
155 04/30/2011 07/10/2014 Windows Forms Diagram
Tags:
Did you find this information helpful?
Add Comment
You must log in to leave a comment

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon