How to arrange nodes automatically?

Hi,
Is it possible to rearrange some how the nodes and connections between them automatically for the best representation of the nodes?

1 Reply

MF Meera Fathima Syncfusion Team June 4, 2007 06:25 AM UTC


Hello Olga,

Thank you for your interest in Syncfusion products.

If your intension is to arrange the diagram nodes in some manner automatically, you can use any one of the layout manager that are shipped with the Essential Diagram.

Referring to the samples under the Diagram Samples\Layout managers section will help you how to use diagram layout manager.

Essential Diagram also offers a layout dialog editor which can be used to easily apply different layout mechanism on the diagram nodes at runtime. This is demonstrated in the Diagram samples\In Depth\Diagram Builder sample. Please click Actions/Layout Nodes menu option to open the layout dialog editor.

Also I have attached a sample that uses Directed Tree Layout Manager to arrange the nodes. You can download the sample from the following link - http://websamples.syncfusion.com/samples/Diagram.Windows/F61829/main.htm

Sample Details :

1. Clicking the "Add Member" toolbar button will let you add a new employee node.

2. Clicking the "Link" toolbar button will let you draw directed connector line between two nodes.

3. Clicking the "Update Layout" toolbar button will arrange the nodes automatically that are added to the diagram.

4. Clicking the "Auto Layout" button will arrange the nodes automatically while it is being added.(i.e.) If you set the LayoutManager.AutoLayout property to True value, it automatically arranges the nodes while it is being added to the diagram.

I hope the above details are helpful to you. Please refer the diagram documentation Over View\Layout section if you want any more details regarding the Layout Manager or just let me know your questions. We will provide you the details.

Best Regards,
Meera.

Loader.
Up arrow icon