Skip to main content

LayoutViewOptionsItemText.AlignMode Property

Gets or sets the alignment mode for fields’ text labels.

Namespace: DevExpress.XtraGrid.Views.Layout

Assembly: DevExpress.XtraGrid.v24.2.dll

Declaration

[DefaultValue(FieldTextAlignMode.AlignInGroups)]
[XtraSerializableProperty]
public FieldTextAlignMode AlignMode { get; set; }

Property Value

Type Default Description
DevExpress.XtraGrid.Views.Layout.FieldTextAlignMode AlignInGroups

A DevExpress.XtraGrid.Views.Layout.FieldTextAlignMode value that specifies the current alignment mode.

Property Paths

You can access this nested property as listed below:

Object Type Path to AlignMode
LayoutView
.OptionsItemText .AlignMode

Remarks

If the AlignMode property is set to AlignGlobal, all text labels within a card will have the same width, matching the width of the largest label, so all edit boxes displaying field values will be left aligned.

If the AlignMode property is set to AutoSize, the width of text labels is calculated for each card field individually so that the label’s text is displayed in its entirety.

If the AlignMode property is set to CustomSize, the width of text labels must be specified manually via the LayoutViewField.TextSize property (see BaseLayoutItem.TextSize).

For each layout group within a card you can override the AlignMode property setting via its OptionsItemTextGroup.TextAlignMode property, which can be accessed via the LayoutGroup.OptionsItemText property.

In addition, for each field you can override the alignment settings of its parents using the LayoutControlItem.TextAlignMode property (it can be accessed via the LayoutViewColumn.LayoutViewField object).

See Also