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

LayoutControlItem.ControlMaxSize Property

Gets or sets the client area’s maximum size.

Namespace: DevExpress.XtraLayout

Assembly: DevExpress.XtraLayout.v19.1.dll

Declaration

[DXCategory("Layout")]
public virtual Size ControlMaxSize { get; set; }

Property Value

Type Description
Size

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

Remarks

Resizing a layout item changes the size of the item’s client area. The LayoutControlItem.ControlMinSize and ControlMaxSize properties specify the minimum and maximum sizes the client area can have. If the Width or Height field of the ControlMaxSize property is set to 0, the corresponding width/height is not limited.

By default, the LayoutControlItem.SizeConstraintsType property is set to Default. In this mode, the LayoutControlItem.ControlMinSize and ControlMaxSize properties are read-only, and they specify predefined size constraints that are specific to the layout item’s control (see Default Size Constraints to learn more). Changing these properties directly is prohibited.

To allow imposing custom size constraints via the LayoutControlItem.ControlMinSize and ControlMaxSize properties, set the LayoutControlItem.SizeConstraintsType property to Custom.

Instead of specifying size constraints for the item’s client area, you can set size constraints for the entire item via the LayoutControlItem.MinSize and LayoutControlItem.MaxSize properties. For information on how these properties are linked with the ControlMinSize and ControlMaxSize properties, see Layout Item’s Size Constraints vs. Client Area’s Size Constraints.

See the Size Constraints topic for more information.

See Also