LayoutControlItem.SizeConstraintsType Property
Gets or sets the size constraints type.
Namespace: DevExpress.XtraLayout
Assembly: DevExpress.XtraLayout.v24.1.dll
NuGet Package: DevExpress.Win.Navigation
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.ContentHorzAlignment property. See Size and Alignment 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.
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 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 and Alignment topic for more details.
Related GitHub Examples
The following code snippet (auto-collected from DevExpress Examples) contains a reference 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.