[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 Item
    [Expand]Layout Groups
    [Expand]Tabbed Group
    [Expand]Other Layout Elements
    [Collapse]Customization Capabilities
      Design-Time Customization
      Design-Time Actions: Adding and Removing Controls and Layout Items
      Design-Time Actions: Resizing and Moving Layout Items
      Design-Time Actions: Selecting Controls and Layout Items
      Context Menu
      Customization Form
      Runtime Undo/Redo
      Creating Layout Items at Design Time
      Creating Tabbed Groups at Design Time
      Design-Time Layout Templates
      Dragging Layout Items at Design Time
      Layout Tree View
      Selecting Layout Items at Design Time
      Runtime Customization Overview
      Default Runtime Customization
      Quick Runtime Customization
    [Expand]Size and Alignment
     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)

Design-Time Layout Templates

At design time, the Layout Control's Templates feature allows you to create common and frequently-used layouts with a few mouse clicks. Predefined templates shipped with the Layout Control provide common layout solutions out of the box. In addition, you can easily create a custom template from controls in your existing project and reuse this template in other projects.

Layout templates are available in the Templates tab in the Customization Form at design time.

A template can be added to the LayoutControl using the drag-and-drop functionality. After dropping the template, all its elements are added to the LayoutControl. You can then rearrange and rename the added elements and change their settings in the Properties grid.

Expanded Predefined Templates

The LayoutControl ships with a set of predefined templates. Several examples are shown below.

Template Name Layout
2x2 TextEdit
Sign In Form
Buttons Yes, No, Cancel
Tabbed Empty Group

Expanded Custom Templates

You can combine frequently used controls into a custom template and reuse it in other projects.

To create a new layout template, do the following:

  • At design time, select one or multiple layout items and choose the Create Template command from the context menu.


    Multiple items can be selected while holding down the SHIFT or CTRL key.

    A template can only be created from a continuous rectangular selection.

  • In the invoked Create Template dialog, type a new template name and click the Save button.

After that, the template will be available in the Customization Form's Templates tab.

All custom templates are stored in the %Public%\Documents\DevExpress\XtraLayout\UserTemplates folder as XML files. If you wish to remove a specific custom template from the LayoutControl's Customization Form, delete the corresponding XML file.

Expanded Saving and Restoring Templates Notes

Take note of the following while saving and restoring templates.

  • A template can only be created from a continuous rectangular selection.
  • If a template contains a binding to a DataSet or an external assembly reference, the LayoutControl tries to remove this binding while restoring the template.
  • If you created a template with a UserControl, you can restore this control only in the same project. In other projects, the LayoutControl removes this UserControl when the template is restored.
  • If a template contains links to images from project resources, these images are not restored from this template. However, the LayoutControl supports saving and restoring images from form resources.
  • Event handlers are not included in templates.

Expanded See Also

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