Back to Devexpress

LayoutControlItem.ContentHorzAlignment Property

windowsforms-devexpress-dot-xtralayout-dot-layoutcontrolitem-5e525406.md

latest2.3 KB
Original Source

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.v25.2.dll

NuGet Package : DevExpress.Win.Navigation

Declaration

csharp
[DefaultValue(HorzAlignment.Default)]
[DXCategory("Layout")]
[XtraSerializableProperty]
public virtual HorzAlignment ContentHorzAlignment { get; set; }
vb
<DefaultValue(HorzAlignment.Default)>
<DXCategory("Layout")>
<XtraSerializableProperty>
Public Overridable Property ContentHorzAlignment As HorzAlignment

Property Value

TypeDefaultDescription
HorzAlignmentDefault

The horizontal control alignment.

|

Available values:

NameDescription
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

Size and Alignment

LayoutControlItem Class

LayoutControlItem Members

DevExpress.XtraLayout Namespace