Skip to main content

BaseLayoutItem.CaptionAlignMode Property

Gets or sets the alignment settings of a control(s) displayed by a LayoutControlItem object(s). This is a dependency property.

Namespace: DevExpress.Xpf.Docking

Assembly: DevExpress.Xpf.Docking.v24.2.dll

NuGet Package: DevExpress.Wpf.Docking

Declaration

public CaptionAlignMode CaptionAlignMode { get; set; }

Property Value

Type Description
CaptionAlignMode

A CaptionAlignMode value that specifies the caption alignment settings.

Available values:

Name Description
Default

For nested layout items, this setting means that the alignment is controlled by the parent’s CaptionAlignMode property. For a root group, this setting means that controls of child LayoutControlItems are auto-aligned across the root group, and nested groups that have the CaptionAlignMode property set to Default.

AlignInGroup

Controls displayed by means of LayoutControlItem objects are auto-aligned across a layout group and its nested groups that have the CaptionAlignMode property set to Default.

AutoSize

The auto-size feature is enabled. The captions of LayoutControlItems are automatically resized to the minimum width that allows to display text without wrapping.

Custom

Enables custom size mode, in which the size of a LayoutControlItem‘s caption must be specified manually via the BaseLayoutItem.CaptionWidth property

Remarks

By default, the CaptionAlignMode property of all layout items is set to CaptionAlignMode.Default. In this mode, the alignment settings of the layout items are controlled by the parent group’s CaptionAlignMode property. If the parent group’s CaptionAlignMode property is set to Default, the alignment settings are controlled by the group’s parent, and so on. For the root group, the CaptionAlignMode.Default setting is equivalent to the CaptionAlignMode.AlignInGroup setting, which means that controls of LayoutControlItems are aligned by their left edges across this group and its nested groups that have the CaptionAlignMode property set to Default.

If a specific item’s CaptionAlignMode property is set to any value except CaptionAlignMode.Default, the parent alignment settings are ignored.

See Also