Skip to main content

LayoutControlItem.ContentHorzAlignment Property

Gets or sets the horizontal alignment of a control inside this layout item. This property is in effect when the control’s maximum width is limited, and is less than the layout item currently provides.

Namespace: DevExpress.XtraLayout

Assembly: DevExpress.XtraLayout.v24.2.dll

Declaration

[DefaultValue(HorzAlignment.Default)]
[DXCategory("Layout")]
[XtraSerializableProperty]
public virtual HorzAlignment ContentHorzAlignment { get; set; }

Property Value

Type Default Description
HorzAlignment Default

The horizontal control alignment.

Available values:

Name Description
Default

Places an object or text at the default position, which is determined by a control.

Near

Places an object/text at a near position.

Center

Centers an object or text within a region.

Far

Places an object/text at a far position.

Remarks

If a layout item is stretched horizontally, and the control inside this item has a limited maximum width, the control area can be wider than this maximum value. In this case, you can use the ContentHorzAlignment property to move the control inside its layout item.

To move a control vertically, use the ContentVertAlignment property instead.

See Also