Back to Devexpress

LayoutControlItem.ControlMaxSize Property

windowsforms-devexpress-dot-xtralayout-dot-layoutcontrolitem-05f07ffd.md

latest3.9 KB
Original Source

LayoutControlItem.ControlMaxSize Property

Gets or sets the client area’s maximum size.

Namespace : DevExpress.XtraLayout

Assembly : DevExpress.XtraLayout.v25.2.dll

NuGet Package : DevExpress.Win.Navigation

Declaration

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

Property Value

TypeDescription
Size

A System.Drawing.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.

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

ContentHorzAlignment

ContentVertAlignment

ControlMinSize

MaxSize

MinSize

SizeConstraintsType

Size and Alignment

LayoutControlItem Class

LayoutControlItem Members

DevExpress.XtraLayout Namespace