windowsforms-devexpress-dot-xtrabars-dot-ribbon-dot-ribboncontrol-d3e9d798.md
Fires when the Customization Form is about to be displayed and allows you to customize the form.
Namespace : DevExpress.XtraBars.Ribbon
Assembly : DevExpress.XtraBars.v25.2.dll
NuGet Package : DevExpress.Win.Navigation
[DXCategory("Events")]
public event CustomizationFormShowingEventHandler CustomizationFormShowing
<DXCategory("Events")>
Public Event CustomizationFormShowing As CustomizationFormShowingEventHandler
The CustomizationFormShowing event's data class is DevExpress.XtraBars.Ribbon.CustomizationFormShowingEventArgs.
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.
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";
}
Imports DevExpress.XtraBars.Ribbon
Private Sub ribbonControl1_CustomizationFormShowing(ByVal sender As Object, ByVal e As CustomizationFormShowingEventArgs) _
Handles ribbonControl1.CustomizationFormShowing
' Specify the form's caption.
e.CustomizationForm.Text = "Customization Form"
End Sub
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;
}
}
Imports DevExpress.XtraBars.Ribbon
Private Sub ribbonControl1_CustomizationFormShowing(ByVal sender As Object, ByVal e As CustomizationFormShowingEventArgs) _
Handles ribbonControl1.CustomizationFormShowing
e.CustomizationForm = New MyCustomizationForm(TryCast(sender, RibbonControl))
End Sub
Friend Class MyCustomizationForm
Inherits RibbonCustomizationForm
Public Sub New()
MyBase.New(Nothing)
End Sub
Public Sub New(ByVal ribbonControl As RibbonControl)
MyBase.New(ribbonControl)
End Sub
Protected Overrides Sub InitDialogBase()
MyBase.InitDialogBase()
' Hide the Import/Export button.
ImportButton.Visible = False
' Change the Rename button's caption and width.
RenameButton.Text = "Umbenennen..."
RenameButton.Width += 10
End Sub
End Class
See Also