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

Size Constraints

  • 2 minutes to read

Setting size constraints for layout items and their controls is a key feature of the Layout Control. This allows you to handle how the items are resized when the LayoutControl that owns these items is resized. For instance, you can specify that the item’s width/height can only lie within a particular range, and so cannot exceed or be less than a specific value. It’s also possible to allow free sizing for the layout item vertically and/or horizontally.

Size constraints can be imposed either on a layout item, the item’s client area or its control.

The default size constraints are determined by the Layout Control automatically depending upon the type of the control displayed within the layout item. To set custom size constraints, you need to set the layout item’s LayoutControlItem.SizeConstraintsType property to Custom and then use the LayoutControlItem.MinSize and LayoutControlItem.MaxSize properties to assign the constraints. Alternatively you can use the LayoutControlItem.ControlMinSize and LayoutControlItem.ControlMaxSize properties to impose the size constraints on the layout item’s client area directly.

When size constraints are applied and the OptionsView.UseSkinIndents option is enabled, control sizes might change when changing a paint scheme. This occurs because real sizes of controls are affected by layout item padding.

See the links below for more information.

Task-Based Help

See Also