Log In
Home
Support
Demos
Documentation
Blogs
Training
Webinars
[Expand]General Information
[Collapse]WinForms Controls
  Prerequisites
 [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]Pivot Grid
  [Expand]Tree List
  [Expand]Chart Control
  [Expand]Diagrams
  [Expand]Gauges
  [Expand]Map Control
  [Expand]Scheduler
  [Expand]Spreadsheet
  [Expand]Rich Text Editor
  [Expand]Spell Checker
  [Collapse]Form Layout Managers
    Side Panel
   [Collapse]Layout Manager
    [Expand]Product Information
    [Expand]Getting Started
    [Expand]Layout Control
    [Expand]Data Layout Control
    [Expand]Layout Item
    [Expand]Layout Groups
    [Expand]Tabbed Group
    [Expand]Other Layout Elements
    [Expand]Customization Capabilities
    [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]Miscellaneous
    [Expand]Examples
    [Expand]Member Tables
   [Expand]Tabbed MDI Manager
    Tab Control
   [Expand]Wizard Control
    Workspace Manager
  [Expand]Navigation Controls
  [Expand]Printing-Exporting
  [Expand]PDF Viewer
   Reporting
  [Expand]Snap
  [Expand]TreeMap 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]Document Server
[Expand]Reporting
[Expand]Report Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]CodeRush
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

Layout Support For Third Party Controls

All the information that the Layout Control should "know" about a control is its size constraints (minimum and maximum sizes) and whether to display a label for it initially (e.g. labels are by default visible for text editors and aren't visible for buttons).

By now, the Layout Control "knows" about certain control types. These include most of the standard Windows Forms controls and the controls from the DevExpress XtraEditors Library. To register other controls, you can use one of the following options:

  • Support the IXtraResizableControl interface in the required control. This interface's declaration is shown below. The IsCaptionVisible property specifies whether a label is displayed initially. The other two properties specify the default maximum and minimum sizes.

    You can implement the Changed event so that the control's size constraints may respond to changes made to the control (e.g. its font size). But this option requires that you change a control's source code or create its descendant. It can be used, for instance, to extend the controls from the XtraEditors Library.

  • Use the LayoutControl.ConstraintsManager.RegisterControlConstraints method. In addition to the control type, it accepts the same parameters that are required by the above interface - label visibility and size constraints. When using multiple Layout Controls within an application, this method must be called for each Layout Control.

    Standard Windows Forms controls are registered using this option.

 
Note

If the Layout Control doesn't "know" a control, the label is visible by default.

How would you rate this topic?​​​​​​​