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
close icon

Objects Alignment in Diagram

Hi,

I would like to align the graphical objects selected in the diagram control in top, middle and botton (vertically and horizontally) of the grid.

Could you help on this ?

Regards,

Rabah Toulaït


3 Replies

AA Amsath Ali M Syncfusion Team May 2, 2013 05:17 AM UTC

Hi Rabah,

 

Thanks for your interest in Syncfusion products.

 

If your intention is to align the nodes using certain layout, then we suggest you to refer our dashboard samples under the category “Layout Algorithm” which demonstrates the alignment of nodes using default layout managers in the diagram control.

You can also find the sample in the below location:

..\..\AppData\Local\Syncfusion\EssentialStudio\{installedVersion}\ Windows\Diagram.Windows\Samples\2.0\Layout Algorithm

You can also run the samples through dashboard using the below steps:

Run the Dashboard-> Windows Forms-> Run the Samples -> Diagram-> Layout Algorithm

 

Please let us know if you have any queries.

 

Regards,

Amsath Ali. M



RT rtoulait May 2, 2013 04:36 PM UTC

Hi Ali,
 
Thanks for your answer.
My need was not about a tree orientation (TopToBottom, BottomToTop, LeftToRight or RightToLeft).
We have in the diagram control some objects in differents shapes (circle, points, .. ).
When i select some of them, i would like to align them to TopAndLeft, TopAndMiddle, TopANdRight, BottomANdLeft, ..etc. in the diagram control.
Was there a way (properties) to do it easily like in visio (see attached image) ?
 
Best regards,
Rabah Toulaït


How_to_Align_Several_Shapes_at_once_in_Microsoft_Visio_004_d17a6650.zip


AA Amsath Ali M Syncfusion Team May 3, 2013 12:25 PM UTC

Hi Rabah,

 

Thanks for your update.

 

We suggest you to use the diagram’s ‘AlignLeft/Right/Center/Top/Bottom/Middle methods to achieve your requirement.  Please refer our dashboard sample “Commands” under the category “Getting Started” which demonstrates the alignment of nodes in the diagram control.

You can also find the sample in the below location:

..\..\AppData\Local\Syncfusion\EssentialStudio\{installedVersion}\ Windows\Diagram.Windows\Samples\2.0\Getting Started\Commands

 

You can also run the samples through dashboard using the below steps:

Run the Dashboard-> Windows Forms-> Run the Samples -> Diagram-> Getting Started -> Commands

 

Please let us know if you have any queries.

 

Regards,

 

Amsath Ali. M


Loader.
Live Chat Icon For mobile
Up arrow icon