windowsforms-2173-controls-and-libraries-form-layout-managers-layout-and-data-layout-controls-design-time-and-runtime-customization-customization-form.md
The LayoutControl allows users to modify layouts both at design time and runtime (in customization mode). The Customization Form , along with the Context Menu, contains tools for managing layouts.
This help topic describes the default Customization Form, available at design time and in default runtime customization mode.
Tip
The LayoutControl supports two runtime customization modes: “Default” and “Quick”. Refer to the following help topic for more information: Quick Runtime Customization.
At design time, customization mode is always enabled. Certain customization features (for example, the ability to hide or restore layout items) are accessible only when the Customization Form is open.
To open the Customization Form:
At runtime, opening the Customization Form enables customization mode, which allows users to do the following:
Note
End users can open the Customization Form if the LayoutControl.AllowCustomization option is enabled.
The following animation demonstrates these customization operations:
To open the Customization Form programmatically, use the LayoutControl.ShowCustomizationForm method:
layoutControl1.ShowCustomizationForm();
To close the Customization Form, users can do the following:
The LayoutControl fires the LayoutControl.HideCustomization event before the Customization Form is closed.
The Customization Form offers extensive layout modification capabilities for both developers and users. It allows users to do the following:
The Customization Form can be treated as an instance of the XtraForm. Use the LayoutControl.CustomizationForm property to access the Customization Form. You can modify the form’s caption, size, and appearance, or implement a custom Customization Form with extended functionality.
Tip
Create Custom Customization Form
The Customization Form consists of multiple interactive elements that facilitate layout modification. The image and table below describe these UI elements and their functionality.
|
UI Element
|
Description
| | --- | --- | |
Hidden Items Tab
|
Displays hidden and fixed items, and supports drag-and-drop operations for managing layout elements. To hide an item, drag it from the Layout Control to this tab. To restore an item, drag it to the Layout Control.
Fixed Items : The Empty Space Item, Label, Separator, and Splitter appear at the top of the list in bold. These are not actual instances, but are item types. When dragged to the layout, a new instance of the corresponding item is created.
You can create custom fixed items and register them using the LayoutControl.RegisterFixedItemType method.
| |
Layout Tree View Tab
|
Displays the hierarchical structure of the Layout Control, which enables users to easily select, reorder, and modify layout items—especially those that may be obscured or too small to select with the mouse.
| |
Save and Load Buttons
|
Allow users to save the current layout to an XML file and restore a previously saved layout.
| |
Undo and Redo Buttons
|
The “Undo” button reverts the last action, while “Redo” restores the state before the undo operation. These buttons are available only at runtime.
| |
Properties Window
|
Displays settings of the selected layout item and allows you to modify its properties.
|
Use the LayoutControl.OptionsCustomizationForm property to modify the visibility of Customization Form UI elements.
// Display the Properties Window in the Customization Form
layoutControl1.OptionsCustomizationForm.ShowPropertyGrid = true;
// Hide Save/Load buttons
layoutControl1.OptionsCustomizationForm.ShowLoadButton = false;
layoutControl1.OptionsCustomizationForm.ShowSaveButton = false;
See Also
Member Table: Customization Form
How to: Create custom customization form
How to: Implement custom functionality for layout context menu
How to: Add new menu item to the Layout Tree View Context Menu