Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

DiagramOptionsSugiyamaLayout.LayersAlignment Property

Gets or sets the alignment of the diagram depending on its direction.

Namespace: DevExpress.XtraDiagram.Options

Assembly: DevExpress.XtraDiagram.v24.2.dll

NuGet Package: DevExpress.Win.Diagram

#Declaration

[DefaultValue(Alignment.Near)]
[DiagramCategory(DiagramCategory.Layout)]
public virtual Alignment LayersAlignment { get; set; }

#Property Value

Type Default Description
Alignment Near

A Alignment enumeration value that specifies the diagram alignment.

Available values:

Name Description
Near

In a left-to-right layout, items are aligned to the left from the layout axis. In a right-to-left layout, items are aligned to the right.

Center

Items are aligned along the layout axis.

Far

In a left-to-right layout, items are aligned to the right from the layout axis. In a right-to-left layout, items are aligned to the left.

#Property Paths

You can access this nested property as listed below:

Object Type Path to LayersAlignment
DiagramControl
.OptionsSugiyamaLayout .LayersAlignment

#Remarks

Use the LayersAlignment property to specify the alignment of the layered diagram on the canvas. The resulting diagram position will differ depending on the DiagramOptionsSugiyamaLayout.Direction property value.

The following table describes the effect of the LayersAlignment property. Gray arrows indicate the layout direction. The diagram is aligned along the red axis.

DiagramOptionsSugiyamaLayout.Direction property value Alignment
TopToBottom SugiyamaColumnsAlignmentTB
BottomToTop SugiyamaColumnsAlignmentBT
LeftToRight SugiyamaColumnsAlignmentLR
RightToLeft SugiyamaColumnsAlignmentRL

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the LayersAlignment property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also