windowsforms-2198-controls-and-libraries-form-layout-managers-layout-and-data-layout-controls-examples-how-to-create-custom-customization-form.md
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:
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.
Create a new form.
Switch to the code designer, and change the form’s ancestor to the UserCustomizationForm class.
Rebuild the project by selecting the Build->Rebuild Solution menu command.
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:
Right-click the form to open the context menu, allowing you to add the standard control elements, supported by the default Customization Form:
Add a SimpleButton control at the bottom of the form. Give it the Restore All caption:
Write a Click event handler for the Restore All button as follows:
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: