Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

RibbonControl.CustomizationFormShowing Event

Fires when the Customization Form is about to be displayed and allows you to customize the form.

Namespace: DevExpress.XtraBars.Ribbon

Assembly: DevExpress.XtraBars.v24.2.dll

NuGet Package: DevExpress.Win.Navigation

#Declaration

[DXCategory("Events")]
public event CustomizationFormShowingEventHandler CustomizationFormShowing

#Event Data

The CustomizationFormShowing event's data class is DevExpress.XtraBars.Ribbon.CustomizationFormShowingEventArgs.

#Remarks

The CustomizationFormShowing event fires when the form is about to be displayed and allows you to customize the form. The CustomizatoinForm event argument provides access to a RibbonCustomizationForm object that specifies the form.

#Example

The code below shows how to change the form’s caption.

using DevExpress.XtraBars.Ribbon;

private void ribbonControl1_CustomizationFormShowing(object sender, CustomizationFormShowingEventArgs e) {
    // Specify the form's caption.
    e.CustomizationForm.Text = "Customization Form";
}

The code below shows how to customize the form’s buttons.

using DevExpress.XtraBars.Ribbon;

private void ribbonControl1_CustomizationFormShowing(object sender, CustomizationFormShowingEventArgs e) {
    e.CustomizationForm = new MyCustomizationForm(sender as RibbonControl);
}

class MyCustomizationForm : RibbonCustomizationForm {
    public MyCustomizationForm() : base(null) {
    }
    public MyCustomizationForm(RibbonControl ribbonControl) : base(ribbonControl) {
    }

    protected override void InitDialogBase() {
        base.InitDialogBase();

        // Hide the Import/Export button.
        ImportButton.Visible = false;

        // Change the Rename button's caption and width.
        RenameButton.Text = "Umbenennen...";
        RenameButton.Width += 10;
    }
}
See Also