In This Article

WizardPage Class

Represents a page within a Wizard control.

public class WizardPage : UIContainerControl, IUIControl, IUIElement, ILogicalTreeNode, IDpiAwareElement, IDisposable
Inheritance:
object MarshalByRefObject Component Control ScrollableControl ContainerControl UIContainerControl object
Derived:
WizardWelcomePage
Implements:
IUIControl IUIElement ILogicalTreeNode IDpiAwareElement IDisposable

Remarks

This class is used to track information relating to each page in a Wizard control.

Constructors

WizardPage()

Initializes a new instance of the WizardPage class.

public WizardPage()

See Also

Properties

Anchor

Gets or sets which edges of the control are anchored to the edges of its container.

[Browsable(false)]
public override AnchorStyles Anchor { get; set; }

Property Value

AnchorStyles:

A bitwise combination of the AnchorStyles values. The default is Top and Left.

See Also

BackButtonEnabled

Determines the enabled state of the Back button when this page is selected.

public WizardButtonEnabledDefault BackButtonEnabled { get; set; }

Property Value

WizardButtonEnabledDefault:

A WizardButtonEnabledDefault specifying the enabled state of the button.

Remarks

This property should only be set at design-time.

See Also

BackButtonVisible

Determines the visibility of the Back button when this page is selected.

public bool BackButtonVisible { get; set; }

Property Value

bool:

true if the button should be visible; otherwise, false.

Remarks

This property should only be set at design-time.

See Also

BackgroundFill

Gets or sets the page-specific BackgroundFill for the page.

public BackgroundFill BackgroundFill { get; set; }

Property Value

BackgroundFill:

The page-specific BackgroundFill for the page.

See Also

ButtonContainerBackgroundFill

Gets or sets the page-specific BackgroundFill for the button container.

public BackgroundFill ButtonContainerBackgroundFill { get; set; }

Property Value

BackgroundFill:

The page-specific BackgroundFill for the button container.

See Also

CancelButtonEnabled

Determines the enabled state of the Cancel button when this page is selected.

public WizardButtonEnabledDefault CancelButtonEnabled { get; set; }

Property Value

WizardButtonEnabledDefault:

A WizardButtonEnabledDefault specifying the enabled state of the button.

Remarks

This property should only be set at design-time.

See Also

CancelButtonVisible

Determines the visibility of the Cancel button when this page is selected.

public bool CancelButtonVisible { get; set; }

Property Value

bool:

true if the button should be visible; otherwise, false.

Remarks

This property should only be set at design-time.

See Also

CausesValidation

Gets or sets a value indicating whether the control causes validation to be performed on any controls that require validation when it receives focus.

[Browsable(false)]
public bool CausesValidation { get; set; }

Property Value

bool:

true if the control causes validation to be performed on any controls requiring validation when it receives focus; otherwise, false. The default is true.

See Also

Dock

Gets or sets which edge of the parent container a control is docked to.

[Browsable(false)]
public override DockStyle Dock { get; set; }

Property Value

DockStyle:

One of the DockStyle values. The default is None.

See Also

FinishButtonEnabled

Determines the enabled state of the Finish button when this page is selected.

public WizardButtonEnabledDefault FinishButtonEnabled { get; set; }

Property Value

WizardButtonEnabledDefault:

A WizardButtonEnabledDefault specifying the enabled state of the button.

Remarks

This property should only be set at design-time.

This property also controls the enabled state of the Finish button, since the Finish button is simply the Finish button with a different caption.

See Also

FinishButtonVisible

Determines the visibility of the Finish button when this page is selected.

public bool FinishButtonVisible { get; set; }

Property Value

bool:

true if the button should be visible; otherwise, false.

Remarks

This property should only be set at design-time.

See Also

HelpButtonEnabled

Determines the enabled state of the Help button when this page is selected.

public WizardButtonEnabledDefault HelpButtonEnabled { get; set; }

Property Value

WizardButtonEnabledDefault:

A WizardButtonEnabledDefault specifying the enabled state of the button.

Remarks

This property should only be set at design-time.

See Also

HelpButtonVisible

Determines the visibility of the Help button when this page is selected.

public bool HelpButtonVisible { get; set; }

Property Value

bool:

true if the button should be visible; otherwise, false.

Remarks

This property should only be set at design-time.

See Also

InteriorPageHeaderBackgroundFill

Gets or sets the page-specific BackgroundFill for the header of the page if it is an interior page.

public BackgroundFill InteriorPageHeaderBackgroundFill { get; set; }

Property Value

BackgroundFill:

The page-specific BackgroundFill for the header of the page if it is an interior page.

See Also

InteriorPageHeaderImage

Gets or sets the page-specific Image for the header of the page if it is an interior page.

public Image InteriorPageHeaderImage { get; set; }

Property Value

Image:

The page-specific Image for the header of the page if it is an interior page.

See Also

IsInteriorPage

Gets or sets whether the page is an interior page.

public bool IsInteriorPage { get; set; }

Property Value

bool:

true if the page is an interior page; otherwise, false.

Remarks

Interior pages make use of the header and are padded from the sides of the Wizard.
Exterior pages fill the entire Wizard client area.

See Also

Location

Gets or sets the coordinates of the upper-left corner of the control relative to the upper-left corner of its container.

[Browsable(false)]
public Point Location { get; set; }

Property Value

Point:

The Point that represents the upper-left corner of the control relative to the upper-left corner of its container.

See Also

NextButtonEnabled

Determines the enabled state of the Next button when this page is selected.

public WizardButtonEnabledDefault NextButtonEnabled { get; set; }

Property Value

WizardButtonEnabledDefault:

A WizardButtonEnabledDefault specifying the enabled state of the button.

Remarks

This property should only be set at design-time.

This property also controls the enabled state of the Finish button, since the Finish button is simply the Next button with a different caption.

See Also

NextButtonVisible

Determines the visibility of the Next button when this page is selected.

public bool NextButtonVisible { get; set; }

Property Value

bool:

true if the button should be visible; otherwise, false.

Remarks

This property should only be set at design-time.

See Also

PageCaption

Gets or sets the caption of the page.

public virtual string PageCaption { get; set; }

Property Value

string:

The caption displayed on the Wizard for the page.

See Also

PageDescription

Gets or sets the description of the page.

public virtual string PageDescription { get; set; }

Property Value

string:

The description displayed on the Wizard for the page.

See Also

PageTitleBarText

Gets or sets the title bar text of the page.

public virtual string PageTitleBarText { get; set; }

Property Value

string:

The title bar text displayed on a WizardDialogForm for the page.

See Also

Size

Gets or sets the height and width of the control.

[Browsable(false)]
public Size Size { get; set; }

Property Value

Size:

The Size that represents the height and width of the control in pixels.

See Also

UseExtendedDoubleBuffering

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

protected override bool UseExtendedDoubleBuffering { get; }

Property Value

bool:

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

See Also

Visible

Gets or sets a value indicating whether the control is displayed.

[Browsable(false)]
public bool Visible { get; set; }

Property Value

bool:

true if the control is displayed; otherwise, false. The default is true.

See Also

Wizard

Gets the Wizard that contains the page.

[Browsable(false)]
public Wizard Wizard { get; }

Property Value

Wizard:

The Wizard that contains the page.

See Also

Methods

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.

See Also

Dispose(bool)

Clean up any resources being used.

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

See Also

OnBackButtonClick(WizardPageCancelEventArgs)

Raises the BackButtonClick event.

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

A WizardPageCancelEventArgs that contains the event data.

See Also

OnCancelButtonClick(EventArgs)

Raises the CancelButtonClick event.

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

An EventArgs that contains the event data.

See Also

OnCreateControl()

Raises the CreateControl event.

protected override void OnCreateControl()

See Also

OnFinishButtonClick(EventArgs)

Raises the FinishButtonClick event.

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

An EventArgs that contains the event data.

See Also

OnHelpButtonClick(EventArgs)

Raises the HelpButtonClick event.

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

An EventArgs that contains the event data.

See Also

OnLoad(EventArgs)

Raises the Load event.

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

An EventArgs that contains the event data.

See Also

OnMouseDown(MouseEventArgs)

Raises the MouseDown event.

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

A MouseEventArgs that contains the event data.

See Also

OnNextButtonClick(WizardPageCancelEventArgs)

Raises the NextButtonClick event.

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

A WizardPageCancelEventArgs that contains the event data.

See Also

OnRender(PaintEventArgs)

Renders the element.

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

A PaintEventArgs that contains the event data.

See Also

ProcessTabKey(bool)

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

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

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

Returns

bool:

true if a control is selected; otherwise, false.

See Also

ResetBackgroundFill()

Resets the BackgroundFill property to its default value.

public virtual void ResetBackgroundFill()

See Also

ResetButtonContainerBackgroundFill()

Resets the ButtonContainerBackgroundFill property to its default value.

public virtual void ResetButtonContainerBackgroundFill()

See Also

ResetInteriorPageHeaderBackgroundFill()

Resets the InteriorPageHeaderBackgroundFill property to its default value.

public virtual void ResetInteriorPageHeaderBackgroundFill()

See Also

ResetInteriorPageHeaderImage()

Resets the InteriorPageHeaderImage property to its default value.

public virtual void ResetInteriorPageHeaderImage()

See Also

ShouldSerializeBackgroundFill()

Indicates whether the BackgroundFill property should be persisted.

public virtual bool ShouldSerializeBackgroundFill()

Returns

bool:

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

See Also

ShouldSerializeButtonContainerBackgroundFill()

Indicates whether the ButtonContainerBackgroundFill property should be persisted.

public virtual bool ShouldSerializeButtonContainerBackgroundFill()

Returns

bool:

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

See Also

ShouldSerializeInteriorPageHeaderBackgroundFill()

Indicates whether the InteriorPageHeaderBackgroundFill property should be persisted.

public virtual bool ShouldSerializeInteriorPageHeaderBackgroundFill()

Returns

bool:

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

See Also

ShouldSerializeInteriorPageHeaderImage()

Indicates whether the InteriorPageHeaderImage property should be persisted.

public virtual bool ShouldSerializeInteriorPageHeaderImage()

Returns

bool:

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

See Also

ToString()

Returns a String that represents the current Object.

public override string ToString()

Returns

string:

A String that represents the current Object.

See Also

WndProc(ref Message)

Processes Windows messages.

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

The Windows Message to process.

See Also

Events

BackButtonClick

Occurs when this page is selected and 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 an event handler is set for this event on this page, and the event is raised, it will only be raised from this WizardPage. The more general associated event on the Wizard will not be raised.

See Also

CancelButtonClick

Occurs when this page is selected and 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 an event handler is set for this event on this page, and the event is raised, it will only be raised from this WizardPage. The more general associated event on the Wizard will not be raised.

See Also

FinishButtonClick

Occurs when this page is selected and 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 an event handler is set for this event on this page, and the event is raised, it will only be raised from this WizardPage. The more general associated event on the Wizard will not be raised.

See Also

HelpButtonClick

Occurs when this page is selected and 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 an event handler is set for this event on this page, and the event is raised, it will only be raised from this WizardPage. The more general associated event on the Wizard will not be raised.

See Also

Load

Occurs before the control becomes visible for the first time.

public event EventHandler Load

Event Type

EventHandler

Remarks

You can use this event to perform tasks such as allocating resources used by the control.

See Also

NextButtonClick

Occurs when this page is selected and 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 an event handler is set for this event on this page, and the event is raised, it will only be raised from this WizardPage. The more general associated event on the Wizard will not be raised.

See Also

Inherited Members

See Also