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

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.v24.2.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