In This Article

Wizard Class

Represents a Wizard control.

public class Wizard : UIContainerControl, IUIControl, IUIElement, ILogicalTreeNode, IDisposable, ICommandTarget, ISupportInitialize
Inheritance:
Object UIContainerControl Object
Implements:
IUIControl IUIElement ILogicalTreeNode IDisposable ICommandTarget

Remarks

This control is placed on a Form and docked to Fill it.

Constructors

Wizard()

Initializes a new instance of the Wizard class.

public Wizard()

Remarks

The default constructor initializes all fields to their default values.

Properties

BackButton

Gets the Button instance that is used for the Back button.

public Button BackButton { get; }

Property Value

Button:

The Button instance that is used for the Back button.

Remarks

Use this property to directly access the Button control, allowing for advanced customization.

BackButtonBackColor

Gets or sets the background color of the Back button.

public Color BackButtonBackColor { get; set; }

Property Value

Color:

The background color of the Back button.

BackButtonCausesValidation

Gets or sets a value indicating whether validation is performed when the Back button is clicked.

public bool BackButtonCausesValidation { get; set; }

Property Value

Boolean:

true if validation is performed when the Back button is clicked; otherwise, false. The default value is false.

BackButtonEnabled

Gets or sets whether the Back button is currently enabled.

public bool BackButtonEnabled { get; set; }

Property Value

Boolean:

true if the button is enabled; otherwise, false.

BackButtonTabIndex

Gets or sets the tab order of the Back button within its container.

public int BackButtonTabIndex { get; set; }

Property Value

Int32:

The tab order of the Back button within its container.

BackButtonTabStop

Gets or sets whether the Back button has a tab stop.

public bool BackButtonTabStop { get; set; }

Property Value

Boolean:

true if the button has a tab stop; otherwise, false.

BackButtonText

Gets or sets the text displayed on the Back button.

public string BackButtonText { get; set; }

Property Value

String:

The text displayed on the button.

BackButtonWidth

Gets or sets the width of the Back button.

public int BackButtonWidth { get; set; }

Property Value

Int32:

The width of the button.

ButtonFlatStyle

Gets or sets the flat style appearance of the buttons in the wizard.

public FlatStyle ButtonFlatStyle { get; set; }

Property Value

FlatStyle:

A FlatStyle specifying the flat style appearance of the buttons in the wizard.

ButtonHeight

Gets or sets the height of the buttons.

public int ButtonHeight { get; set; }

Property Value

Int32:

The height of the buttons.

CancelButton

Gets the Button instance that is used for the Cancel button.

public Button CancelButton { get; }

Property Value

Button:

The Button instance that is used for the Cancel button.

Remarks

Use this property to directly access the Button control, allowing for advanced customization.

CancelButtonBackColor

Gets or sets the background color of the Cancel button.

public Color CancelButtonBackColor { get; set; }

Property Value

Color:

The background color of the Cancel button.

CancelButtonCausesValidation

Gets or sets a value indicating whether validation is performed when the Cancel button is clicked.

public bool CancelButtonCausesValidation { get; set; }

Property Value

Boolean:

true if validation is performed when the Cancel button is clicked; otherwise, false. The default value is false.

CancelButtonDialogResult

Gets or sets the DialogResult for the Cancel button.

public DialogResult CancelButtonDialogResult { get; set; }

Property Value

DialogResult:

The DialogResult for the Cancel button. The default value is DialogResult.Cancel.

CancelButtonEnabled

Gets or sets whether the Cancel button is currently enabled.

public bool CancelButtonEnabled { get; set; }

Property Value

Boolean:

true if the button is enabled; otherwise, false.

CancelButtonTabIndex

Gets or sets the tab order of the Cancel button within its container.

public int CancelButtonTabIndex { get; set; }

Property Value

Int32:

The tab order of the Cancel button within its container.

CancelButtonTabStop

Gets or sets whether the Cancel button has a tab stop.

public bool CancelButtonTabStop { get; set; }

Property Value

Boolean:

true if the button has a tab stop; otherwise, false.

CancelButtonText

Gets or sets the text displayed on the Cancel button.

public string CancelButtonText { get; set; }

Property Value

String:

The text displayed on the button.

CancelButtonWidth

Gets or sets the width of the Cancel button.

public int CancelButtonWidth { get; set; }

Property Value

Int32:

The width of the button.

Gets a CommandLinkCollection containing the command links associated with the object.

public CommandLinkCollection CommandLinks { get; }

Property Value

CommandLinkCollection:

A CommandLinkCollection containing the command links associated with the object.

Controls

Gets the ControlCollection that contains the child controls of the wizard.

public Control.ControlCollection Controls { get; }

Property Value

Control.ControlCollection:

The ControlCollection that contains the child controls of the wizard.

DefaultSize

Gets the default size of the control.

protected override Size DefaultSize { get; }

Property Value

Size:

The default Size of the control.

DisableButtonsDuringPageChange

Gets or sets whether to disable wizard buttons during page changes.

public bool DisableButtonsDuringPageChange { get; set; }

Property Value

Boolean:

true if wizard buttons should be disabled during page changes; otherwise, false.

Remarks

When a page change occurs, if this property is set to true, all the buttons are disabled until the page change is complete. The mouse cursor is also set to a wait cursor during the page change.

ExteriorPageBounds

Gets the bounds of exterior pages.

public Rectangle ExteriorPageBounds { get; }

Property Value

Rectangle:

A Rectangle specifying the bounds of interior pages.

FinishButton

Gets the Button instance that is used for the Finish button.

public Button FinishButton { get; }

Property Value

Button:

The Button instance that is used for the Finish button.

Remarks

Use this property to directly access the Button control, allowing for advanced customization.

FinishButtonBackColor

Gets or sets the background color of the Finish button.

public Color FinishButtonBackColor { get; set; }

Property Value

Color:

The background color of the Finish button.

FinishButtonCausesValidation

Gets or sets a value indicating whether validation is performed when the Finish button is clicked.

public bool FinishButtonCausesValidation { get; set; }

Property Value

Boolean:

true if validation is performed when the Finish button is clicked; otherwise, false. The default value is true.

FinishButtonDialogResult

Gets or sets the DialogResult for the Finish button.

public DialogResult FinishButtonDialogResult { get; set; }

Property Value

DialogResult:

The DialogResult for the Finish button. The default value is DialogResult.OK.

FinishButtonDistinct

Gets or sets whether the Finish button should always appear or if it should appear in place of the Next button on Finish pages.

public bool FinishButtonDistinct { get; set; }

Property Value

Boolean:

true if the Finish button should always appear on its own; otherwise, false.

Remarks

This property should be set to true for wizards that have pages with the Next and Finish buttons enabled. Otherwise, the property should be set to false to adhere to the Wizard97 specification.

FinishButtonEnabled

Gets or sets whether the Finish button is currently enabled.

public bool FinishButtonEnabled { get; set; }

Property Value

Boolean:

true if the button is enabled; otherwise, false.

FinishButtonTabIndex

Gets or sets the tab order of the Finish button within its container.

public int FinishButtonTabIndex { get; set; }

Property Value

Int32:

The tab order of the Finish button within its container.

FinishButtonTabStop

Gets or sets whether the Finish button has a tab stop.

public bool FinishButtonTabStop { get; set; }

Property Value

Boolean:

true if the button has a tab stop; otherwise, false.

FinishButtonText

Gets or sets the text displayed on the Finish button.

public string FinishButtonText { get; set; }

Property Value

String:

The text displayed on the button.

FinishButtonWidth

Gets or sets the width of the Finish button.

public int FinishButtonWidth { get; set; }

Property Value

Int32:

The width of the button.

Font

Gets or sets the Font to use for text in the control.

public override Font Font { get; set; }

Property Value

Font:

The Font to use for text in the control.

FormAcceptButton

Gets or sets the button in the wizard that is clicked when the user presses the ENTER key.

public WizardAcceptButtonDefault FormAcceptButton { get; set; }

Property Value

WizardAcceptButtonDefault:

A WizardAcceptButtonDefault specifying the accept button for the wizard.

FormCancelButton

Gets or sets the button in the wizard that is clicked when the user presses the ESCAPE key.

public WizardCancelButtonDefault FormCancelButton { get; set; }

Property Value

WizardCancelButtonDefault:

A WizardCancelButtonDefault specifying the cancel button for the wizard.

ForwardCommandsTo

Gets or sets the ICommandTarget to forward commands to.

public ICommandTarget ForwardCommandsTo { get; set; }

Property Value

ICommandTarget:

The ICommandTarget to forward commands to.

HelpButton

Gets the Button instance that is used for the Help button.

public Button HelpButton { get; }

Property Value

Button:

The Button instance that is used for the Help button.

Remarks

Use this property to directly access the Button control, allowing for advanced customization.

HelpButtonAlignLeft

Gets or sets whether the Help button is aligned to the left side of the wizard.

public bool HelpButtonAlignLeft { get; set; }

Property Value

Boolean:

true if the Help button is aligned to the left side of the wizard; otherwise, false.

HelpButtonBackColor

Gets or sets the background color of the Help button.

public Color HelpButtonBackColor { get; set; }

Property Value

Color:

The background color of the Help button.

HelpButtonCausesValidation

Gets or sets a value indicating whether validation is performed when the Help button is clicked.

public bool HelpButtonCausesValidation { get; set; }

Property Value

Boolean:

true if validation is performed when the Help button is clicked; otherwise, false. The default value is false.

HelpButtonEnabled

Gets or sets whether the Help button is currently enabled.

public bool HelpButtonEnabled { get; set; }

Property Value

Boolean:

true if the button is enabled; otherwise, false.

HelpButtonTabIndex

Gets or sets the tab order of the Help button within its container.

public int HelpButtonTabIndex { get; set; }

Property Value

Int32:

The tab order of the Help button within its container.

HelpButtonTabStop

Gets or sets whether the Help button has a tab stop.

public bool HelpButtonTabStop { get; set; }

Property Value

Boolean:

true if the button has a tab stop; otherwise, false.

HelpButtonText

Gets or sets the text displayed on the Help button.

public string HelpButtonText { get; set; }

Property Value

String:

The text displayed on the button.

HelpButtonWidth

Gets or sets the width of the Help button.

public int HelpButtonWidth { get; set; }

Property Value

Int32:

The width of the button.

InteriorPageBounds

Gets the bounds of interior pages.

public Rectangle InteriorPageBounds { get; }

Property Value

Rectangle:

A Rectangle specifying the bounds of interior pages.

InteriorPageGuideLineCount

Gets or sets the number of interior page guide lines to display in design-time mode.

public int InteriorPageGuideLineCount { get; set; }

Property Value

Int32:

The number of interior page guide lines to display in design-time mode.

Remarks

Set this property to 0 to display no guide lines.

NextButton

Gets the Button instance that is used for the Next button.

public Button NextButton { get; }

Property Value

Button:

The Button instance that is used for the Next button.

Remarks

Use this property to directly access the Button control, allowing for advanced customization.

NextButtonBackColor

Gets or sets the background color of the Next button.

public Color NextButtonBackColor { get; set; }

Property Value

Color:

The background color of the Next button.

NextButtonCausesValidation

Gets or sets a value indicating whether validation is performed when the Next button is clicked.

public bool NextButtonCausesValidation { get; set; }

Property Value

Boolean:

true if validation is performed when the Next button is clicked; otherwise, false. The default value is true.

NextButtonEnabled

Gets or sets whether the Next button is currently enabled.

public bool NextButtonEnabled { get; set; }

Property Value

Boolean:

true if the button is enabled; otherwise, false.

NextButtonTabIndex

Gets or sets the tab order of the Next button within its container.

public int NextButtonTabIndex { get; set; }

Property Value

Int32:

The tab order of the Next button within its container.

NextButtonTabStop

Gets or sets whether the Next button has a tab stop.

public bool NextButtonTabStop { get; set; }

Property Value

Boolean:

true if the button has a tab stop; otherwise, false.

NextButtonText

Gets or sets the text displayed on the Next button.

public string NextButtonText { get; set; }

Property Value

String:

The text displayed on the button.

NextButtonWidth

Gets or sets the width of the Next button.

public int NextButtonWidth { get; set; }

Property Value

Int32:

The width of the button.

Pages

Gets the collection of pages in the wizard.

public WizardPageCollection Pages { get; }

Property Value

WizardPageCollection:

A WizardPageCollection representing the pages in the Wizard.

Remarks

This property enables you to obtain a reference to the list of pages that are currently stored in the Wizard. With this reference, you can add pages, remove pages, and obtain a count of the pages in the collection. For more information on the tasks that can be performed with the Pages collection, see the WizardPageCollection class reference topics.

PageSequenceType

Gets or sets the type of page sequencing to perform.

public WizardPageSequenceType PageSequenceType { get; set; }

Property Value

WizardPageSequenceType:

A WizardPageSequenceType specifying the type of page sequencing to perform.

Renderer

Gets or sets the IWizardRenderer used to render the control.

public IWizardRenderer Renderer { get; set; }

Property Value

IWizardRenderer:

The IWizardRenderer used to render the control.

SelectedIndex

Gets or sets the index of the selected item.

public int SelectedIndex { get; set; }

Property Value

Int32:

The index of the selected item. If there are no items in the control, this property returns -1.

Remarks

The index is zero-based.

SelectedPage

Gets or sets the WizardPage that is currently selected.

public WizardPage SelectedPage { get; set; }

Property Value

WizardPage:

The WizardPage that is currently selected. null is returned if there is no page currently selected.

UseExtendedDoubleBuffering

Gets or sets whether to use extended double buffering for rendering.

protected override bool UseExtendedDoubleBuffering { get; }

Property Value

Boolean:

true if extended double buffering should be used; otherwise, false.

Methods

ArrangeOverride(Size)

Positions child elements and determines an arrange size.

protected override Size ArrangeOverride(Size finalSize)
Parameter Type Description
finalSize Size

The final area within the parent that this element should use to arrange itself and its children.

Returns

Size:

The actual size used.

Remarks

Element authors should override this method, call Arrange on each visible child element and position each child element. It is required that a parent element calls Arrange on each child or they won't be rendered.

CreateChildren()

Invoked when the collection of child elements is to be created.

protected override IList CreateChildren()

Returns

IList:

The IList that should be assigned to the Children property.

Remarks

By default no child collection is created.

CreateControlsInstance()

Creates a new instance of the control collection for the control.

protected override Control.ControlCollection CreateControlsInstance()

Returns

Control.ControlCollection:

A new instance of a Control.ControlCollection assigned to the control.

Dispose(Boolean)

Disposes any resources used by the object.

protected override void Dispose(bool disposing)
Parameter Type Description
disposing Boolean

Whether the object is being disposed.

EndInitialization()

Performs routines that should occur after initialization and is only intended to be called by designer code.

public void EndInitialization()

HitTest(PointHitTestParameters, Func<IUIElement, PointHitTestParameters, Boolean>)

Hit tests to find the IUIElement that contains the specified coordinates.

protected override PointHitTestResult HitTest(PointHitTestParameters hitTestParams, Func<IUIElement, PointHitTestParameters, bool> filter)
Parameter Type Description
hitTestParams PointHitTestParameters

A PointHitTestParameters containing hit test parameters.

filter Func<IUIElement, PointHitTestParameters, Boolean>

Optionally defines a filter which must return true for an element to match the hit test.

Returns

PointHitTestResult:

A PointHitTestResult containing the hit test result.

HitTestRecursive(PointHitTestParameters, Func<IUIElement, PointHitTestParameters, Boolean>)

Recursively hit tests to find the IUIElement that contains the specified coordinates.

protected override PointHitTestResult HitTestRecursive(PointHitTestParameters hitTestParams, Func<IUIElement, PointHitTestParameters, bool> filter)
Parameter Type Description
hitTestParams PointHitTestParameters

A PointHitTestParameters containing hit test parameters.

filter Func<IUIElement, PointHitTestParameters, Boolean>

Optionally defines a filter which must return true for an element to match the hit test.

Returns

PointHitTestResult:

A PointHitTestResult containing the hit test result.

OnBackButtonClick(WizardPageCancelEventArgs)

Raises the BackButtonClick event.

protected virtual void OnBackButtonClick(WizardPageCancelEventArgs e)
Parameter Type Description
e WizardPageCancelEventArgs

A WizardPageCancelEventArgs that contains the event data.

OnButtonMouseEnter(WizardButtonEventArgs)

Raises the ButtonMouseEnter event.

protected virtual void OnButtonMouseEnter(WizardButtonEventArgs e)
Parameter Type Description
e WizardButtonEventArgs

A WizardButtonEventArgs that contains the event data.

OnButtonMouseLeave(WizardButtonEventArgs)

Raises the ButtonMouseLeave event.

protected virtual void OnButtonMouseLeave(WizardButtonEventArgs e)
Parameter Type Description
e WizardButtonEventArgs

A WizardButtonEventArgs that contains the event data.

OnCancelButtonClick(EventArgs)

Raises the CancelButtonClick event.

protected virtual void OnCancelButtonClick(EventArgs e)
Parameter Type Description
e EventArgs

An EventArgs that contains the event data.

OnFinishButtonClick(EventArgs)

Raises the FinishButtonClick event.

protected virtual void OnFinishButtonClick(EventArgs e)
Parameter Type Description
e EventArgs

An EventArgs that contains the event data.

OnHelpButtonClick(EventArgs)

Raises the HelpButtonClick event.

protected virtual void OnHelpButtonClick(EventArgs e)
Parameter Type Description
e EventArgs

An EventArgs that contains the event data.

OnLayoutButtons(WizardLayoutButtonsEventArgs)

Raises the LayoutButtons event.

protected virtual void OnLayoutButtons(WizardLayoutButtonsEventArgs e)
Parameter Type Description
e WizardLayoutButtonsEventArgs

An EventArgs that contains the event data.

OnMouseDown(MouseEventArgs)

Raises the MouseDown event.

protected override void OnMouseDown(MouseEventArgs e)
Parameter Type Description
e MouseEventArgs

A MouseEventArgs that contains the event data.

OnNextButtonClick(WizardPageCancelEventArgs)

Raises the NextButtonClick event.

protected virtual void OnNextButtonClick(WizardPageCancelEventArgs e)
Parameter Type Description
e WizardPageCancelEventArgs

A WizardPageCancelEventArgs that contains the event data.

OnParentChanged(EventArgs)

Raises the ParentChanged event.

protected override void OnParentChanged(EventArgs e)
Parameter Type Description
e EventArgs

An EventArgs that contains the event data.

OnRender(PaintEventArgs)

Renders the element.

protected override void OnRender(PaintEventArgs e)
Parameter Type Description
e PaintEventArgs

A PaintEventArgs that contains the event data.

OnResize(EventArgs)

Raises the Resize event.

protected override void OnResize(EventArgs e)
Parameter Type Description
e EventArgs

An EventArgs that contains the event data.

OnSelectionChanged(EventArgs)

Raises the SelectionChanged event.

protected virtual void OnSelectionChanged(EventArgs e)
Parameter Type Description
e EventArgs

An EventArgs that contains the event data.

OnSelectionChanging(WizardPageCancelEventArgs)

Raises the SelectionChanging event.

protected virtual void OnSelectionChanging(WizardPageCancelEventArgs e)
Parameter Type Description
e WizardPageCancelEventArgs

A WizardPageCancelEventArgs that contains the event data.

PerformBackButtonClick()

Performs a click of the Back button.

public void PerformBackButtonClick()

PerformCancelButtonClick()

Performs a click of the Cancel button.

public void PerformCancelButtonClick()

PerformFinishButtonClick()

Performs a click of the Finish button.

public void PerformFinishButtonClick()

PerformHelpButtonClick()

Performs a click of the Help button.

public void PerformHelpButtonClick()

PerformNextButtonClick()

Performs a click of the Next button.

public void PerformNextButtonClick()

ProcessDialogKey(Keys)

Processes a dialog key.

protected override bool ProcessDialogKey(Keys keyData)
Parameter Type Description
keyData Keys

One of the Keys values that represents the key to process.

Returns

Boolean:

true if the key was processed by the control; otherwise, false.

ProcessTabKey(Boolean)

Selects the next available control and makes it the active control.

protected override bool ProcessTabKey(bool forward)
Parameter Type Description
forward Boolean

true to cycle forward through the controls in the ContainerControl; otherwise, false.

Returns

Boolean:

true if a control is selected; otherwise, false.

RaiseCommand(Command)

Raises the specified Command.

public virtual bool RaiseCommand(Command command)
Parameter Type Description
command Command

The Command to raise.

Returns

Boolean:

true if the Command was handled; otherwise, false.

ResetBackButtonBackColor()

Resets the BackButtonBackColor property to its default value.

public void ResetBackButtonBackColor()

ResetCancelButtonBackColor()

Resets the CancelButtonBackColor property to its default value.

public void ResetCancelButtonBackColor()

ResetFinishButtonBackColor()

Resets the FinishButtonBackColor property to its default value.

public void ResetFinishButtonBackColor()

ResetHelpButtonBackColor()

Resets the HelpButtonBackColor property to its default value.

public void ResetHelpButtonBackColor()

ResetNextButtonBackColor()

Resets the NextButtonBackColor property to its default value.

public void ResetNextButtonBackColor()

ResetRenderer()

Resets the Renderer property to its default value.

public virtual void ResetRenderer()

ShouldSerializeBackButtonBackColor()

Indicates whether the BackButtonBackColor property should be persisted.

public bool ShouldSerializeBackButtonBackColor()

Returns

Boolean:

true if the property value has changed from its default; otherwise, false.

ShouldSerializeCancelButtonBackColor()

Indicates whether the CancelButtonBackColor property should be persisted.

public bool ShouldSerializeCancelButtonBackColor()

Returns

Boolean:

true if the property value has changed from its default; otherwise, false.

ShouldSerializeFinishButtonBackColor()

Indicates whether the FinishButtonBackColor property should be persisted.

public bool ShouldSerializeFinishButtonBackColor()

Returns

Boolean:

true if the property value has changed from its default; otherwise, false.

ShouldSerializeHelpButtonBackColor()

Indicates whether the HelpButtonBackColor property should be persisted.

public bool ShouldSerializeHelpButtonBackColor()

Returns

Boolean:

true if the property value has changed from its default; otherwise, false.

ShouldSerializeNextButtonBackColor()

Indicates whether the NextButtonBackColor property should be persisted.

public bool ShouldSerializeNextButtonBackColor()

Returns

Boolean:

true if the property value has changed from its default; otherwise, false.

ShouldSerializePages()

Determines whether the pages collection should be serialized.

public bool ShouldSerializePages()

Returns

Boolean:

true if the pages collection should be serialized; otherwise false.

ShouldSerializeRenderer()

Indicates whether the Renderer property should be persisted.

public virtual bool ShouldSerializeRenderer()

Returns

Boolean:

true if the property value has changed from its default; otherwise, false.

WndProc(ref Message)

Processes Windows messages.

protected override void WndProc(ref Message m)
Parameter Type Description
m Message

The Windows Message to process.

Events

BackButtonClick

Occurs when the Back button is clicked.

public event WizardPageCancelEventHandler BackButtonClick

Event Type

WizardPageCancelEventHandler

Remarks

By default, the Wizard will move to the previous WizardPage in the WizardPageCollection after this event fires. To cancel this behavior, set the Cancel property of the event argument to true. Then you can use the SelectedPage property to set the WizardPage that should be displayed.

If the selected page has an event handler for this event, this particular event will not be raised since it will be assumed that the associated page's event handler executed the appropriate code.

ButtonMouseEnter

Occurs when mouse moves over a wizard button.

public event WizardButtonEventHandler ButtonMouseEnter

Event Type

WizardButtonEventHandler

ButtonMouseLeave

Occurs when mouse moves out of a wizard button.

public event WizardButtonEventHandler ButtonMouseLeave

Event Type

WizardButtonEventHandler

CancelButtonClick

Occurs when the Cancel button is clicked.

public event EventHandler CancelButtonClick

Event Type

EventHandler

Remarks

Handlers of this event generally abort any currently-executing processing tasks and close the Form containing the Wizard control.

If the selected page has an event handler for this event, this particular event will not be raised since it will be assumed that the associated page's event handler executed the appropriate code.

FinishButtonClick

Occurs when the Finish button is clicked.

public event EventHandler FinishButtonClick

Event Type

EventHandler

Remarks

Handlers of this event generally finish processing any remaining wizard tasks.

If the selected page has an event handler for this event, this particular event will not be raised since it will be assumed that the associated page's event handler executed the appropriate code.

HelpButtonClick

Occurs when the Help button is clicked.

public event EventHandler HelpButtonClick

Event Type

EventHandler

Remarks

Handlers of this event generally display help for the currently displayed wizard step.

If the selected page has an event handler for this event, this particular event will not be raised since it will be assumed that the associated page's event handler executed the appropriate code.

LayoutButtons

Occurs when the wizard's buttons need to be positioned.

public event WizardLayoutButtonsEventHandler LayoutButtons

Event Type

WizardLayoutButtonsEventHandler

NextButtonClick

Occurs when the Next button is clicked.

public event WizardPageCancelEventHandler NextButtonClick

Event Type

WizardPageCancelEventHandler

Remarks

By default, the Wizard will move to the next WizardPage in the WizardPageCollection after this event fires. To cancel this behavior, set the Cancel property of the event argument to true. Then you can use the SelectedPage property to set the WizardPage that should be displayed.

If the selected page has an event handler for this event, this particular event will not be raised since it will be assumed that the associated page's event handler executed the appropriate code.

SelectionChanged

Occurs after the selected page changes.

public event EventHandler SelectionChanged

Event Type

EventHandler

Remarks

Use this event to perform any processing that should occur after the selected page changes.

SelectionChanging

Occurs before the selected page changes.

public event WizardPageCancelEventHandler SelectionChanging

Event Type

WizardPageCancelEventHandler

Remarks

Use this event to perform any processing that should occur before selected page changes. The Page property of the event arguments indicates the WizardPage about to be selected. The selection change may be cancelled by setting the Cancel property of the event arguments to true.

Inherited Members

See Also