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

LayoutControlItem.SizeConstraintsType Property

Gets or sets the size constraints type.

Namespace: DevExpress.XtraLayout

Assembly: DevExpress.XtraLayout.v18.2.dll

Declaration

[DefaultValue(SizeConstraintsType.Default)]
[DXCategory("Layout")]
[XtraSerializableProperty]
public virtual SizeConstraintsType SizeConstraintsType { get; set; }

Property Value

Type Default Description
SizeConstraintsType **Default**

A SizeConstraintsType enumeration value which specifies the manner in which the current layout item can be resized.

Available values:

Name Description
Default

Default Size Constraints are applied to the layout item and its control. The default size constraints are determined automatically depending upon the type of its control.

SupportHorzAlignment

This mode is designed to support horizontal alignment of the controls that implement the automatic sizing feature, when they are displayed within a LayoutControl. A layout item’s maximum and minimum sizes are determined automatically. To custom align a control, set its AutoSizeInLayoutControl property to true and specify the control’s alignment via the LayoutControlItem.ControlAlignment property. See Aligning Controls Within Layout Items to learn more.

Custom

A layout item’s size can be changed within the range which is specified by the LayoutControlItem.MinSize and LayoutControlItem.MaxSize properties.

Remarks

If the SizeConstraintsType property is set to SizeConstraintsType.Default, the current layout item’s size constraints are automatically determined based upon the type of the layout item’s control. See Default Size Constraints.

Custom size constraints can be applied if the SizeConstraintsType property is set to SizeConstraintsType.Custom. To set the constraints in this mode, use the LayoutControlItem.MinSize and LayoutControlItem.MaxSize or LayoutControlItem.ControlMinSize and LayoutControlItem.ControlMaxSize properties.

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

See the Size Constraints topic for more details.

The following code snippets (auto-collected from DevExpress Examples) contain references to the SizeConstraintsType property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also