Skip to main content

WizardControl.CustomizeCommandButtons Event

Allows you to customize predefined buttons (Previous, Next, Cancel, Finish, and Help) and display/customize custom buttons.

Namespace: DevExpress.XtraWizard

Assembly: DevExpress.XtraWizard.v23.1.dll

NuGet Package: DevExpress.Win

Declaration

public event WizardCustomizeCommandButtonsEventHandler CustomizeCommandButtons

Event Data

The CustomizeCommandButtons event's data class is DevExpress.XtraWizard.CustomizeCommandButtonsEventArgs.

Remarks

The Wizard control raises the CustomizeCommandButtons event before a wizard page is displayed. Handle this event to customze the appearance, text, and visibility of command buttons.

The following example demonstrates how to display a custom button within the Registration Details page.

Display a Custom Button - WinForms Wizard Control, DevExpress

using System.Drawing;
using DevExpress.XtraWizard;

namespace DXApplication19 {
    public partial class Form1 : DevExpress.XtraEditors.XtraForm {
        WizardButton customButton;
        public Form1() {
            InitializeComponent();
            customButton = new WizardButton(wizardControl1) {
                Visible = false,
                TabIndex = 4,
                Text = "Advanced Settings"
            };
        }
        private void wizardControl1_CustomizeCommandButtons(object sender, DevExpress.XtraWizard.CustomizeCommandButtonsEventArgs e) {
            if(e.Page == wizardDetailsPage) {
                customButton.Location = new Point(10, e.PrevButton.Location.Y);
                customButton.Width += 50;
                customButton.Height = e.PrevButton.Size.Height;
                customButton.Visible = true;
            }
        }
    }
}

Note

To hide the Back (Previous) button when the WizardControl is displayed in the Aero style (see WizardControl.WizardStyle), use the WizardControl.ShowBackButton property.

Read the following topic for information: Buttons.

See Also