Skip Navigation LinksActipro Software / Products / .NET Controls / WPF / Wizard / Selection Changes

Feature Tour:

Selection Changes

The selected page in the Wizard can be changed programmatically and numerous cancellable selection changed events fire whenever a page change occurs.

Programmatically Getting or Setting the Selected Page

Wizard has several members that are essential for getting or setting the currently selected page programmatically.

Page Change Event Sequence

Whenever a selected page change occurs, regardless of what caused it, numerous events fire. The event sequence is designed so that you can process the selection change events at either the wizard or page-specific levels.

The first events that fire upon a page change request are page changing events. These are cancellable events and if the Cancel property is set in these, then the page change will be cancelled and no new selected page will be set.

If the page change is not cancelled, then the actual page change will occur and a series of page changed events fire. Page changed events are a great place to add code to initialize a page that is about to be displayed.

Page Selection Flags

Selection flags are passed in the event arguments to give you a lot of information about why the selected page change occurred. This lets you better determine whether you may want to take some sort of programmatic action to override or cancel a page change. The flags also indicate whether forward or backward progress was made.

Forward and Backward Progress

Wizard tracks a notion of forward and backward progress. This is used in several internal areas such as stack-based page sequencing and for transition effects.

When moving "forward" through pages, it is assumed you are doing things like clicking the Next button. When moving "backward" through pages, it is assumed you are doing things like clicking the Back button.

Overriding Selected Page Changes to a Select a Different Page

As mentioned above, selected page changes may be cancelled in any of the page changing events. Sometimes you may wish to abort default page sequencing and provide your own decision-based sequencing instead

Cancelling Selected Page Changes / Validation

As mentioned above, selected page changes may be cancelled in any of the page changing events. Functionality of cancelling and not moving to a new page is generally used for data validation purposes.