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.v19.1.dll
Declaration
[DefaultValue(true)]
[DXCategory("Behavior")]
[XtraSerializableProperty]
public virtual 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:
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).
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:
See Aligning Controls Within Layout Items to learn more.