Articles in this section
Category / Section

Alignment of the Diagram Nodes

1 min read

In WinForms 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.

 

 

 

 

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please sign in to leave a comment
Access denied
Access denied