LayoutControlItem.ControlMaxSize Property

Gets or sets the client area's maximum size.

Namespace: DevExpress.XtraLayout

Assembly: DevExpress.XtraLayout.v20.1.dll

Declaration

[DXCategory("Layout")]
[Browsable(false)]
public virtual Size ControlMaxSize { get; set; }
<DXCategory("Layout")>
<Browsable(False)>
Public Overridable Property ControlMaxSize As Size

Property Value

Type Description
Size

A Size structure that defines the client area's maximum width and height.

Remarks

To specify size constraints for a layout item, use the LayoutControlItem.MinSize and LayoutControlItem.MaxSize properties. Ensure that Custom size constraint mode is enabled. See the Size and Alignment topic for more information.

If you need to specify size constraints for a layout item's control, use the Control.MinimumSize and Control.MaximumSize properties. Do not use the LayoutControlItem.ControlMinSize and LayoutControlItem.ControlMaxSize properties in this case.

The ControlMinSize and ControlMaxSize properties are calculated properties, and they are never (de)serialized.

A layout item's area comprises the client area (where the control resides), client area indent (BaseLayoutItem.TextToControlDistance), text label and padding.

ItemSize3

The size constraints of a layout item (LayoutControlItem.MinSize and LayoutControlItem.MaxSize) and its client area (ControlMinSize and ControlMaxSize) are linked accordingly. When you change the client area size constraints, the layout item's size constraints are actually changed, as follows.

Layout Item Size Constraints = Client Area Size Constraints + Client Area Indent + Text Label Size + Padding

When you change the text label size or the padding, a layout item's custom size constraints remain constant. The client area size constraints (ControlMinSize and ControlMaxSize) are recalculated instead, as follows.

Client Area Size Constraints = Layout Item Size Constraints - (Client Area Indent + Text Label Size + Padding)

See Also