)
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. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Alignment of the Diagram Nodes

Platform: WinForms |
Control: Diagram |
Published Date: February 23, 2018 |
Last Revised Date: May 31, 2019
Tags: alignment

In diagram Control, we can align the diagram nodes by using Syncfusion.Windows.Forms.Diagram..Model’s “AlignmentType” property. The AlignmentType is as Enum which has two types and its explained in below, 

 

SelectedNode

 

It used to align the node based on the position of the first node contains SelectionList.  

For example:  

If the diagram contains 3 text nodes i.e. TextNode1, TextNode2 and TextNode3.  In the Diagram.View’s “SelectionList” contains the First Node is TextNode2. Then the others nodes aligned based on the TextNode2’s position.  

 

[C#]

 

diagram1.Model.AlignmentType = AlignmentType.SelectedNode;

 

[VB]

 

diagram1.Model.AlignmentType = AlignmentType.SelectedNode

 

 

BoundingRectangle.

 

It is used to align the nodes based on the total bounds area of the selected nodes.  

 

[C#]

 

diagram1.Model.AlignmentType = AlignmentType.BoundingRectangle;

 

[VB]

 

diagram1.Model.AlignmentType = AlignmentType.BoundingRectangle

 

 

 

Note:

The default value of the Syncfusion.Windows.Forms.Diagram..Model’s “AlignmentType” property is SelectedNode.

 

 

 

2X faster development

The ultimate WinForms UI toolkit to boost your development speed.
ADD COMMENT
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
Live Chat Icon