Skip to main content

OptionsItemText.TextAlignMode Property

Gets or sets the alignment settings of the controls which are displayed in the LayoutControl.

Namespace: DevExpress.XtraLayout

Assembly: DevExpress.XtraLayout.v24.1.dll

NuGet Package: DevExpress.Win.Navigation

Declaration

[DefaultValue(TextAlignMode.AlignInLayoutControl)]
public TextAlignMode TextAlignMode { get; set; }

Property Value

Type Default Description
TextAlignMode AlignInLayoutControl

A TextAlignMode value which specifies the current alignment mode.

Available values:

Name Description
AlignInLayoutControl

Controls are auto-aligned throughout the LayoutControl.

AlignInGroups

Controls are auto-aligned independently within each layout group.

AlignInGroupsRecursive

For internal use.

AutoSize

The auto-size feature is enabled. The text regions of layout items are automatically resized to the minimum width that allows the text to be displayed in it entirety.

CustomSize

Enables custom size mode, in which the size of the text regions of all layout items must be specified manually via the BaseLayoutItem.TextSize property.

Property Paths

You can access this nested property as listed below:

Object Type Path to TextAlignMode
LayoutControl
.OptionsItemText .TextAlignMode

Remarks

Use this property to specify the alignment settings of the controls displayed in the LayoutControl. The TextAlignMode property allows you to choose whether the controls must be aligned throughout the LayoutControl or independently within groups. Additionally, you can enable the text auto-size feature or prevent the text region size from being controlled automatically. See the TextAlignMode topic for more information on the available options.

For each group you can override the LayoutControl’s TextAlignMode property setting via its OptionsItemTextGroup.TextAlignMode property which can be accessed via the LayoutGroup.OptionsItemText property.

In addition, for each layout item you can override the alignment settings of its parents using the LayoutControlItem.TextAlignMode property.

See Also