Skip to main content
A newer version of this page is available. .

LayoutControlItem.TrimClientAreaToControl Property

Gets or sets whether the client region’s height is trimmed to match the control’s height.

Namespace: DevExpress.XtraLayout

Assembly: DevExpress.XtraLayout.v18.2.dll

Declaration

[DefaultValue(true)]
[DXCategory("Behavior")]
[XtraSerializableProperty]
public bool TrimClientAreaToControl { get; set; }

Property Value

Type Default Description
Boolean **true**

true if the client region’s height is trimmed to match the control’s height; otherwise, false.

Remarks

By default, the client area’s height matches the control’s height. If the LayoutControl provides more space below the layout item, you may want to custom align the control within this region. To do this, set the TrimClientAreaToControl property to false and set the custom alignment via the LayoutControlItem.ControlAlignment property.

The following image shows a LayoutControl containing a single layout control item. The TrimClientAreaToControl property is set to true:

LayoutItem_TrimClientAreaToControl_True

After setting the LayoutControlItem.TrimClientAreaToControl property to false, the client area occupies all the available space provided by the LayoutControl (the region’s border is visually marked by a rectangle).

LayoutItem_TrimClientAreaToControl_False

The control’s default alignment is TopLeft, so the control is displayed at the top. However, now you can change its alignment with the LayoutControlItem.ControlAlignment property. The following image demonstrates a layout item with the LayoutControlItem.ControlAlignment property set to MiddleCenter:

LayoutItem_TrimClientAreaToControl_False_Center

See Aligning Controls Within Layout Items to learn more.

See Also