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
    [Expand]Size and Alignment
     Flow Layout
     Table Layout
     Focus Management
    [Expand]Appearance and Look and Feel
    [Expand]Miscellaneous
    [Collapse]Examples
      How to: Access an item located at a specific point
      How to: Add new menu item to the Layout Tree View Context Menu
      How to: Create a tabbed group in code
      How to: Create custom customization form
      How to: Create custom 'fixed' item
      How to: Create layout groups and items in code
      How to: Create layout items in code
      How to: Custom align a control within its layout item
      How to: Enable the Auto-Size Feature for a CheckEdit and Align It Horizontally
      How to: Implement custom functionality for layout context menu
      How to: Lock the size of a layout item
      How to: Make a LayoutControl transparent
      How to: Print a LayoutControl and show its print preview
      How to: Provide Size Constraints for Control via IXtraResizable Interface
      How to: Save and restore layout
      How to: Save the layout between application runs
      How to: Specify which properties to display in the Property Grid when selecting layout items
      How to: Update a Layout Item and its Control
    [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

How to: Create custom customization form

You can create a custom Customization Form and use it instead of the standard Customization Form. The custom form can display any elements supported by the default form, and can also provide additional layout customization functionality. This tutorial shows how to create this form.

Basic steps to create a custom Customization Form are as follows:

  • Create a form by deriving it from the DevExpress.XtraLayout.Customization.UserCustomizationForm class.
  • Add any standard control elements supported by the default Customization Form. At design time, you can add it via the form's context menu.
  • Add custom controls and implement the required functionality.
  • Register the new Customization Form via the LayoutControl.RegisterUserCustomizationForm method.

Expanded Design-time Sample

This tutorial shows how to implement a simple Customization Form providing a Restore All button, that allows an end-user to make all hidden items visible.

  1. Create a new form.

  2. Switch to the code designer, and change the form's ancestor to the UserCustomizationForm class.
  3. Rebuild the project by selecting the Build->Rebuild Solution menu command.
  4. Switch to the designer. Set the form's caption as required. In this sample, it's set to "New Customization Form". Now the form looks like:

  5. Right-click the form to open the context menu, allowing you to add the standard control elements, supported by the default Customization Form:

    You can add any of these elements using this menu, and then arrange the elements as required. In this example, only the Hidden Item List and Button Panel are added:

  6. Add a SimpleButton control at the bottom of the form. Give it the Restore All caption:

  7. Write a Click event handler for the Restore All button as follows:
  8. In the main form's Layout Control, register the new Customization Form via the LayoutControl.RegisterUserCustomizationForm method:

When running the main form, the new Customization Form can now be opened by right-clicking the Layout Control, and selecting the Customize Layout menu command.

The result is shown in the image below:

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