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
    [Collapse]Layout Control
      Layout Control
      Layout Hierarchical Structure
      Converting a Regular Layout of Controls to an XtraLayoutControl
      Customizing a Layout In Code
      Using a LayoutControl in Inherited Forms
    [Expand]Data Layout Control
    [Expand]Layout Item
    [Expand]Layout Groups
    [Expand]Tabbed Group
    [Expand]Other Layout Elements
    [Expand]Customization Capabilities
    [Expand]Size and Alignment
     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

Converting a Regular Layout of Controls to an XtraLayoutControl

With a few mouse clicks, you can easily convert an existing regular layout of controls to a Layout Control, and vice versa. All you need to do is to place a LayoutConverter component on your form (or UserControl), and then use its commands to perform a conversion. The following image shows a LayoutConverter's commands.

The LayoutConverter component only provides design-time functionality. It serves no purpose at runtime. So, after converting a layout you can freely delete the LayoutConveter component.

Expanded 'Convert regular layout to XtraLayout' Command

When choosing this command, the LayoutConverter first asks you to choose the container that displays the controls to be converted to a Layout Control. The following containers are supported:

  • ContainerControl descendants (for instance, Form and UserControl), except the PropertyGrid and SplitContainer.
  • Panel controls and their descendants
  • GroupBox controls and their descendants
  • XtraPanel descendants (for instance, PanelControl and GroupControl), except the SplitContainerControl.
Note

Empty containers cannot be selected.

After selecting a container, all its controls are moved to a new LayoutControl. During the conversion, the LayoutConveter tries to retain the relative distances between controls in the output layout as close as possible to the original layout. However, due to control arrangement rules that the Layout Control follows, specific regular layouts may not be exactly reproduced using a LayoutControl.

The selected container's children are converted as follows:

  • GroupBox and GroupControl objects are converted to LayoutControlGroup objects. The contents of these controls are also processed and converted accordingly.
  • TabControl and XtraTabControl objects are converted to TabbedControlGroup objects. The contents of these controls are also processed and converted accordingly.
  • Panel and PanelControl objects are converted to LayoutControlItem objects. The contents of these containers are not processed.
  • If a label (Label or LabelControl) is displayed on the left of a control, the label and the control will be represented by a single LayoutControlItem object.

    During the conversion, the label object's properties (except its default text) are lost. The label's localized text is also lost.

  • Other objects are converted to LayoutControlItem objects.

Expanded 'Convert XtraLayout to regular layout' Command

This command does the opposite operation - it moves controls from an existing Layout Control to the form (or UserControl). First, you're asked to select a LayoutControl control to be converted to a regular layout. After selecting a LayoutControl, all its controls are moved to the current form (or UserControl) and then the LayoutControl is destroyed. During this kind of conversion, the positions of controls in the output layout will be the same as in the original layout.

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