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

Is it possible to arrange/re-arrange the diagram nodes automatically in some standard manner?

Platform: WinForms |
Control: Diagram |
Published Date: April 30, 2011 |
Last Revised Date: July 10, 2014


The various diagram layout managers that are shipped with the Diagram can be used to arrange/layout the nodes in the specified format. Please refer the samples under Diagram Samples/Layout Managers category to get the details about the various layout mangers and how to use this in a diagram application to arrange the nodes.

Below code snippet shows how to apply the layout mechanism on the diagram nodes.


LayoutManager manager = new DirectedTreeLayoutManager(this.diagram.Model, 0,60,80 );

this.diagram.LayoutManager = manager;


Private manager As LayoutManager = New DirectedTreeLayoutManager(Me.diagram.Model, 0,60,80)

Me.diagram.LayoutManager = manager

Once the layout manager has been assigned to the diagram, we can use either the LayoutManager.UpdateLayout() or LayoutManager.AutoLayout() to arrange the nodes in the specified layout.

The following code snippet shows how to arrange the nodes that are added/present in the diagram.




this.diagram.LayoutManager.Nodes.AddRange(this.diagram.Model.Nodes );

// Updates the layout of the nodes in the model.







'' Updates the layout of the nodes in the model.



The following code snippet shows how to arrange the nodes as soon as that are added to the diagram.


this.diagram.LayoutManager.AutoLayout = true;


Me.diagram.LayoutManager.AutoLayout = True

Syncfusion Inc.

2X faster development

The ultimate WinForms UI toolkit to boost your development speed.
You must log in to leave a comment

Please sign in to access our KB

This page will automatically be redirected to the sign-in page in 10 seconds.

Up arrow icon

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

Live Chat Icon For mobile