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
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