[Expand]General Information
[Collapse]WinForms Controls
 [Expand]What's Installed
 [Expand]Build an Application
 [Collapse]Controls and Libraries
  [Expand]Forms and User Controls
  [Expand]Messages, Notifications, and Dialogs
  [Expand]Editors and Simple Controls
  [Expand]Ribbon, Bars and Menu
  [Expand]Application UI Manager
  [Expand]Docking Library
  [Expand]Data Grid
  [Expand]Vertical Grid
  [Expand]Property Grid
  [Expand]Pivot Grid
  [Expand]Tree List
  [Expand]Chart Control
  [Expand]Map Control
  [Expand]Rich Text Editor
  [Expand]Spell Checker
  [Collapse]Form Layout Managers
    Side Panel
   [Collapse]Layout and Data Layout Controls
    [Expand]Product Information
    [Expand]Getting Started
    [Expand]Layout Control
    [Expand]Data Layout Control
    [Expand]Layout Items
    [Expand]Layout Groups
    [Expand]Tabbed Groups
    [Expand]Other Layout Elements
    [Expand]Design-Time and Runtime Customization
    [Collapse]Size and Alignment
      Size Constraints
      Default Size Constraints
      Custom Size Constraints
      Layout Item's Size Constraints vs. Client Area's Size Constraints
      Locking the Size of Layout Items (animation)
      Aligning Controls Within Layout Items
      Layout Support For Third Party Controls
     Flow Layout
     Table Layout
     Focus Management
    [Expand]Appearance and Look and Feel
    [Expand]Member Tables
   [Expand]Tabbed MDI Manager
    Tab Control
   [Expand]Wizard Control
    Workspace Manager
  [Expand]Navigation Controls
  [Expand]PDF Viewer
  [Expand]TreeMap Control
  [Expand]Sunburst Control
 [Expand]Common Features
  Get More Help
 [Expand]API Reference
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Office File API
[Expand]Report and Dashboard Server
[Expand]eXpressApp Framework
[Expand]eXpress Persistent Objects
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation
View this topic on docs.devexpress.com (Learn more)

Size Constraints

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.

Expanded Task-Based Help

Expanded See Also

Is this topic helpful?​​​​​​​