In This Article

WizardPage Class

Represents a page within a Wizard control.

[TemplatePart(Name = "PART_Header", Type = typeof(Panel))]
public class WizardPage : ContentControl
Inheritance:
object Visual UIElement FrameworkElement Control ContentControl object

Constructors

WizardPage()

Initializes an instance of the class.

public WizardPage()

Properties

BackButtonEnabled

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

public bool? BackButtonEnabled { get; set; }

Property Value

bool?:

A Nullablebool specifying the enabled state of the button.

Remarks

If the value of this property is null, the default value and logic specified by the Wizard's BackButtonEnabled property will be used.

BackButtonVisibility

The resolved Visibility of the Back button when this page is selected.

public Visibility BackButtonVisibility { get; }

Property Value

Visibility:

The resolved Visibility specifying the visible state of the button. This value will be either Visible or Collapsed.

Remarks

This value first examines the BackButtonVisible property and if that is set to null, will examine the Wizard's BackButtonVisible property.

BackButtonVisible

The visible state of the Back button when this page is selected.

public bool? BackButtonVisible { get; set; }

Property Value

bool?:

A Nullablebool specifying the visible state of the button.

Remarks

If the value of this property is null, the default value and logic specified by the Wizard's BackButtonVisible property will be used.

CancelButtonEnabled

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

public bool? CancelButtonEnabled { get; set; }

Property Value

bool?:

A Nullablebool specifying the enabled state of the button.

Remarks

If the value of this property is null, the default value and logic specified by the Wizard's CancelButtonEnabled property will be used.

CancelButtonVisibility

The resolved Visibility of the Cancel button when this page is selected.

public Visibility CancelButtonVisibility { get; }

Property Value

Visibility:

The resolved Visibility specifying the visible state of the button. This value will be either Visible or Collapsed.

Remarks

This value first examines the CancelButtonVisible property and if that is set to null, will examine the Wizard's CancelButtonVisible property.

CancelButtonVisible

The visible state of the Cancel button when this page is selected.

public bool? CancelButtonVisible { get; set; }

Property Value

bool?:

A Nullablebool specifying the visible state of the button.

Remarks

If the value of this property is null, the default value and logic specified by the Wizard's CancelButtonVisible property will be used.

Caption

The caption that is displayed in the page.

[Localizability(LocalizationCategory.Title)]
public string? Caption { get; set; }

Property Value

string

Description

The description that is displayed in the page.

[Localizability(LocalizationCategory.Text)]
public string? Description { get; set; }

Property Value

string

FinishButtonEnabled

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

public bool? FinishButtonEnabled { get; set; }

Property Value

bool?:

A Nullablebool specifying the enabled state of the button.

Remarks

If the value of this property is null, the default value and logic specified by the Wizard's FinishButtonEnabled property will be used.

FinishButtonVisibility

The resolved Visibility of the Finish button when this page is selected.

public Visibility FinishButtonVisibility { get; }

Property Value

Visibility:

The resolved Visibility specifying the visible state of the button. This value will be either Visible or Collapsed.

Remarks

This value first examines the FinishButtonVisible property and if that is set to null, will examine the Wizard's FinishButtonVisible property.

FinishButtonVisible

The visible state of the Finish button when this page is selected.

public bool? FinishButtonVisible { get; set; }

Property Value

bool?:

A Nullablebool specifying the visible state of the button.

Remarks

If the value of this property is null, the default value and logic specified by the Wizard's FinishButtonVisible property will be used.

Header

The Panel that represents the header in the template.

public Panel? Header { get; }

Property Value

Panel

Remarks

This property corresponds to PART_Header in the template.

HeaderBackground

The Brush used to draw the background that is displayed in the page header.

public Brush? HeaderBackground { get; set; }

Property Value

Brush

HeaderImage

The ImageSource that is displayed at the right side of the page header.

public ImageSource? HeaderImage { get; set; }

Property Value

ImageSource

HeaderImageMargin

The margin thickness around the HeaderImage.

public Thickness HeaderImageMargin { get; set; }

Property Value

Thickness:

The default value is 4 for interior pages and 18 for exterior pages.

HelpButtonEnabled

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

public bool? HelpButtonEnabled { get; set; }

Property Value

bool?:

A Nullablebool specifying the enabled state of the button.

Remarks

If the value of this property is null, the default value and logic specified by the Wizard's HelpButtonEnabled property will be used.

HelpButtonVisibility

The resolved Visibility of the Help button when this page is selected.

public Visibility HelpButtonVisibility { get; }

Property Value

Visibility:

The resolved Visibility specifying the visible state of the button. This value will be either Visible or Collapsed.

Remarks

This value first examines the HelpButtonVisible property and if that is set to null, will examine the Wizard's HelpButtonVisible property.

HelpButtonVisible

The visible state of the Help button when this page is selected.

public bool? HelpButtonVisible { get; set; }

Property Value

bool?:

A Nullablebool specifying the visible state of the button.

Remarks

If the value of this property is null, the default value and logic specified by the Wizard's HelpButtonVisible property will be used.

IsSelected

Indicates whether the page is selected.

public bool IsSelected { get; set; }

Property Value

bool:

true if the page is selected; otherwise, false.

NextButtonEnabled

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

public bool? NextButtonEnabled { get; set; }

Property Value

bool?:

A Nullablebool specifying the enabled state of the button.

Remarks

If the value of this property is null, the default value and logic specified by the Wizard's NextButtonEnabled property will be used.

NextButtonVisibility

The resolved Visibility of the Next button when this page is selected.

public Visibility NextButtonVisibility { get; }

Property Value

Visibility:

The resolved Visibility specifying the visible state of the button. This value will be either Visible or Collapsed.

Remarks

This value first examines the NextButtonVisible property and if that is set to null, will examine the Wizard's NextButtonVisible property.

NextButtonVisible

The visible state of the Next button when this page is selected.

public bool? NextButtonVisible { get; set; }

Property Value

bool?:

A Nullablebool specifying the visible state of the button.

Remarks

If the value of this property is null, the default value and logic specified by the Wizard's NextButtonVisible property will be used.

NextPage

The next WizardPage to visit when the NextPage is executed.

public object? NextPage { get; set; }

Property Value

object

Remarks

Leave this property null to simply move to the next page in sequential order. This property can be set to three different types of data, thus the property returns an object. Possible values are a reference to a WizardPage within the parent Wizard, the name of another WizardPage within the parent Wizard, or an integer indicating the index of a WizardPage within the parent Wizard.

PageType

The type of page, which helps control the style used to render the page.

public WizardPageType PageType { get; set; }

Property Value

WizardPageType:

A WizardPageType specifying the type of page.

PreviousPage

The previous WizardPage to visit when the PreviousPage is executed.

public object? PreviousPage { get; set; }

Property Value

object

Remarks

Leave this property null to simply move to the previous page in sequential order. This property can be set to three different types of data, thus the property returns an object. Possible values are a reference to a WizardPage within the parent Wizard, the name of another WizardPage within the parent Wizard, or an integer indicating the index of a WizardPage within the parent Wizard.

Note that this property will have no effect if the Wizard.PageSequenceType property is set to Stack.

Title

The title that is displayed in the containing Window control's title if the WindowTitleBehavior is set to PageTitle.

[Localizability(LocalizationCategory.Title)]
public string? Title { get; set; }

Property Value

string

Wizard

The Wizard control that is the parent of the page.

public Wizard? Wizard { get; }

Property Value

Wizard

Methods

OnCancel(RoutedEventArgs)

Raises the CancelEvent event.

protected virtual void OnCancel(RoutedEventArgs e)
Parameter Type Description
e RoutedEventArgs

A RoutedEventArgs that contains the event data.

OnCreateAutomationPeer()

Returns class-specific AutomationPeer implementations for the Windows Presentation Foundation (WPF) infrastructure.

protected override AutomationPeer OnCreateAutomationPeer()

Returns

AutomationPeer:

The type-specific AutomationPeer implementation.

OnFinish(RoutedEventArgs)

Raises the FinishEvent event.

protected virtual void OnFinish(RoutedEventArgs e)
Parameter Type Description
e RoutedEventArgs

A RoutedEventArgs that contains the event data.

OnHelp(RoutedEventArgs)

Raises the HelpEvent event.

protected virtual void OnHelp(RoutedEventArgs e)
Parameter Type Description
e RoutedEventArgs

An EventArgs that contains the event data.

OnSelected(WizardSelectedPageChangeEventArgs)

Raises the SelectedEvent event.

protected virtual void OnSelected(WizardSelectedPageChangeEventArgs e)
Parameter Type Description
e WizardSelectedPageChangeEventArgs

A WizardSelectedPageChangeEventArgs that contains the event data.

OnSelecting(WizardSelectedPageChangeEventArgs)

Raises the SelectingEvent event.

protected virtual void OnSelecting(WizardSelectedPageChangeEventArgs e)
Parameter Type Description
e WizardSelectedPageChangeEventArgs

A WizardSelectedPageChangeEventArgs that contains the event data.

OnUnselected(WizardSelectedPageChangeEventArgs)

Raises the UnselectedEvent event.

protected virtual void OnUnselected(WizardSelectedPageChangeEventArgs e)
Parameter Type Description
e WizardSelectedPageChangeEventArgs

A WizardSelectedPageChangeEventArgs that contains the event data.

OnUnselecting(WizardSelectedPageChangeEventArgs)

Raises the UnselectingEvent event.

protected virtual void OnUnselecting(WizardSelectedPageChangeEventArgs e)
Parameter Type Description
e WizardSelectedPageChangeEventArgs

A WizardSelectedPageChangeEventArgs that contains the event data.

ToString()

Returns the string representation of this object.

public override string ToString()

Returns

string:

The string representation of this object.

Events

Cancel

Occurs when the wizard is cancelled while this page is selected, generally via a Cancel button click.

public event RoutedEventHandler Cancel

Event Type

RoutedEventHandler

Finish

Occurs when the wizard is finished while this page is selected, generally via a Finish button click.

public event RoutedEventHandler Finish

Event Type

RoutedEventHandler

Help

Occurs when help is requested for the wizard while this page is selected, generally via a Help button click.

public event RoutedEventHandler Help

Event Type

RoutedEventHandler

Selected

Occurs after this page is selected.

public event EventHandler<WizardSelectedPageChangeEventArgs> Selected

Event Type

EventHandler<WizardSelectedPageChangeEventArgs>

Selecting

Occurs before this page is selected.

public event EventHandler<WizardSelectedPageChangeEventArgs> Selecting

Event Type

EventHandler<WizardSelectedPageChangeEventArgs>

Unselected

Occurs after this page is unselected.

public event EventHandler<WizardSelectedPageChangeEventArgs> Unselected

Event Type

EventHandler<WizardSelectedPageChangeEventArgs>

Unselecting

Occurs before this page is unselected.

public event EventHandler<WizardSelectedPageChangeEventArgs> Unselecting

Event Type

EventHandler<WizardSelectedPageChangeEventArgs>

Fields

BackButtonEnabledProperty

Defines the BackButtonEnabled property.

public static readonly DependencyProperty BackButtonEnabledProperty

BackButtonVisibilityProperty

Defines the BackButtonVisibility property.

public static readonly DependencyProperty BackButtonVisibilityProperty

BackButtonVisibleProperty

Defines the BackButtonVisible property.

public static readonly DependencyProperty BackButtonVisibleProperty

CancelButtonEnabledProperty

Defines the CancelButtonEnabled property.

public static readonly DependencyProperty CancelButtonEnabledProperty

CancelButtonVisibilityProperty

Defines the CancelButtonVisibility property.

public static readonly DependencyProperty CancelButtonVisibilityProperty

CancelButtonVisibleProperty

Defines the CancelButtonVisible property.

public static readonly DependencyProperty CancelButtonVisibleProperty

CancelEvent

Defines the Cancel event.

public static readonly RoutedEvent CancelEvent

CaptionProperty

Defines the Caption property.

public static readonly DependencyProperty CaptionProperty

DescriptionProperty

Defines the Description property.

public static readonly DependencyProperty DescriptionProperty

FinishButtonEnabledProperty

Defines the FinishButtonEnabled property.

public static readonly DependencyProperty FinishButtonEnabledProperty

FinishButtonVisibilityProperty

Defines the FinishButtonVisibility property.

public static readonly DependencyProperty FinishButtonVisibilityProperty

FinishButtonVisibleProperty

Defines the FinishButtonVisible property.

public static readonly DependencyProperty FinishButtonVisibleProperty

FinishEvent

Defines the Finish event.

public static readonly RoutedEvent FinishEvent

HeaderBackgroundProperty

Defines the HeaderBackground property.

public static readonly DependencyProperty HeaderBackgroundProperty

HeaderImageMarginProperty

Defines the HeaderImageMargin property.

public static readonly DependencyProperty HeaderImageMarginProperty

HeaderImageProperty

Defines the HeaderImage property.

public static readonly DependencyProperty HeaderImageProperty

HelpButtonEnabledProperty

Defines the HelpButtonEnabled property.

public static readonly DependencyProperty HelpButtonEnabledProperty

HelpButtonVisibilityProperty

Defines the HelpButtonVisibility property.

public static readonly DependencyProperty HelpButtonVisibilityProperty

HelpButtonVisibleProperty

Defines the HelpButtonVisible property.

public static readonly DependencyProperty HelpButtonVisibleProperty

HelpEvent

Defines the Help event.

public static readonly RoutedEvent HelpEvent

NextButtonEnabledProperty

Defines the NextButtonEnabled property.

public static readonly DependencyProperty NextButtonEnabledProperty

NextButtonVisibilityProperty

Defines the NextButtonVisibility property.

public static readonly DependencyProperty NextButtonVisibilityProperty

NextButtonVisibleProperty

Defines the NextButtonVisible property.

public static readonly DependencyProperty NextButtonVisibleProperty

NextPageProperty

Defines the NextPage property.

public static readonly DependencyProperty NextPageProperty

PageTypeProperty

Defines the PageType property.

public static readonly DependencyProperty PageTypeProperty

PreviousPageProperty

Defines the PreviousPage property.

public static readonly DependencyProperty PreviousPageProperty

SelectedEvent

Defines the Selected event.

public static readonly RoutedEvent SelectedEvent

SelectingEvent

Defines the Selecting event.

public static readonly RoutedEvent SelectingEvent

TitleProperty

Defines the Title property.

public static readonly DependencyProperty TitleProperty

UnselectedEvent

Defines the Unselected event.

public static readonly RoutedEvent UnselectedEvent

UnselectingEvent

Defines the Unselecting event.

public static readonly RoutedEvent UnselectingEvent

Extension Methods