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

LayoutControlItem.MaxSize Property

Gets or sets the layout item’s maximum size.

Namespace: DevExpress.XtraLayout

Assembly: DevExpress.XtraLayout.v19.1.dll

Declaration

[XtraSerializableProperty]
public override Size MaxSize { get; set; }

Property Value

Type Description
Size

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

Remarks

A layout item’s size can vary between the sizes determined by the LayoutControlItem.MinSize and MaxSize properties. If the Width or Height field of the MaxSize 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.MinSize and MaxSize 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.

Size constraints can be modified in custom size constraints mode. To enable this mode, set the LayoutControlItem.SizeConstraintsType property to Custom.

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

See the Size Constraints topic for more information.

See Also