Skip to main content
Version: 4.2

Stepper

Namespace: Wisej.Web

Assembly: Wisej.Framework (4.2.0.0)

Displays a wizard header or process tracker with observable steps and validated navigation.

public class Stepper : Control

ActiveIndex overlays the active visual state without erasing stored Step.State values. Navigation through Next, Previous, or a step click raises Validating. Direct ActiveIndex assignment bypasses navigation validation and Linear restrictions, for application-controlled state restoration.

Example:

var stepper = new Stepper { Appearance = StepperAppearance.Numbers, AllowStepClick = true };
stepper.Steps.Add(new Step { Text = "Account", Description = "Company and contacts" });
stepper.Steps.Add(new Step { Text = "Review", Description = "Sign and submit" });
stepper.ActiveIndex = 0;
stepper.Validating += (sender, e) => e.Cancel = e.Step?.State == StepState.Error;
this.Controls.Add(stepper);

Constructors​

Instance member Stepper()​

Initializes an empty horizontal stepper with linear navigation.

Properties​

Instance member ActiveIndex​

Int32: Gets or sets the selected step index, or -1 for no selection. (Default: -1)

Direct assignment bypasses Validating and Linear. The selected step is preserved by identity when steps are inserted or removed before it; removing the selection resets the index to -1.

Instance member ActiveText​

String: Gets or sets the localized override for the "active" text. (Default: null)

The default is null, which selects the built-in translation for the current UI culture. The getter returns the configured override. An empty string suppresses the text without changing the operation.

Instance member AllowStepClick​

Boolean: Gets or sets whether step headers can be activated with pointer or keyboard. (Default: False)

Instance member Appearance​

StepperAppearance: Gets or sets the marker presentation. AppearanceKey still selects the theme appearance. (Default: Numbers)

Instance member CompletedText​

String: Gets or sets the localized override for the "Completed" text. (Default: null)

The default is null, which selects the built-in translation for the current UI culture. The getter returns the configured override. An empty string suppresses the text without changing the operation.

Protected member DefaultSize​

Size: Gets the default stepper size.

Instance member ErrorText​

String: Gets or sets the localized override for the "error" text. (Default: null)

The default is null, which selects the built-in translation for the current UI culture. The getter returns the configured override. An empty string suppresses the text without changing the operation.

Instance member Focusable​

Boolean: Gets or sets whether the stepper can receive the focus. The default is false. (Default: False)

Instance member Linear​

Boolean: Gets or sets whether forward navigation must visit incomplete required steps in order. (Default: True)

Instance member OptionalText​

String: Gets or sets the localized override for the "optional" text. (Default: null)

The default is null, which selects the built-in translation for the current UI culture. The getter returns the configured override. An empty string suppresses the text without changing the operation.

Instance member Orientation​

Orientation: Gets or sets the arrangement of steps. (Default: Horizontal)

Instance member PendingText​

String: Gets or sets the localized override for the "pending" text. (Default: null)

The default is null, which selects the built-in translation for the current UI culture. The getter returns the configured override. An empty string suppresses the text without changing the operation.

Instance member SkippedText​

String: Gets or sets the localized override for the "skipped" text. (Default: null)

The default is null, which selects the built-in translation for the current UI culture. The getter returns the configured override. An empty string suppresses the text without changing the operation.

Instance member Steps​

StepCollection: Gets the ordered steps. Item edits update the client automatically.

Instance member TabStop​

Boolean: Gets or sets whether the stepper takes part in tab navigation. The default is false. (Default: False)

Methods​

Protected member Dispose(disposing)​

Releases collection observers.

ParameterTypeDescription
disposingBooleanTrue when managed resources may be released.

Instance member Next()​

Validates and selects the next step, starting at zero when nothing is selected.

Returns: Boolean. True when selection changed; false at the end, when disabled, or when validation canceled.

A successfully departed Pending or Active step becomes Completed. Error and Skipped states are retained. The last step is not completed automatically because there is no next step.

Protected member OnActiveIndexChanged(e)​

Raises ActiveIndexChanged.

ParameterTypeDescription
eEventArgsEvent data.

Protected member OnStepClick(e)​

Raises StepClick.

ParameterTypeDescription
eStepEventArgsClicked step information.

Protected member OnValidating(e)​

Raises navigation Validating independently of inherited focus validation.

ParameterTypeDescription
eStepCancelEventArgsThe proposed move and cancellation flag.

Protected member OnWebEvent(e)​

Dispatches browser events to their processing methods.

ParameterTypeDescription
eWisejEventArgsClient event.

Protected member OnWebRender(config)​

Serializes the current versioned step snapshot and always wires normal events.

ParameterTypeDescription
configObjectClient configuration.

Instance member Previous()​

Validates and selects the previous step without changing completion states.

Returns: Boolean. True when selection changed; false at the beginning or when validation canceled.

Events​

Instance member ActiveIndexChanged​

EventHandler Occurs after the active index changes, including changes caused by collection edits.

Instance member StepClick​

EventHandler<StepEventArgs> Occurs before a clicked eligible step is selected.

Linear-blocked clicks do not raise this event. Changing the collection or ActiveIndex in a handler cancels the pending automatic navigation. Clicking the selected step raises StepClick only.

Instance member Validating​

EventHandler<StepCancelEventArgs> Occurs before navigation and allows the proposed move to be canceled.

This typed navigation event hides Control.Validating. It is independent of focus validation; access the inherited focus-validation event through a Control reference when needed. Both forward and backward navigation validate; ActiveIndex assignment does not.

Example:

stepper.Validating += (sender, e) =>
{
if (e.TargetIndex > e.Index && e.Step?.State == StepState.Error)
e.Cancel = true;
};

Implements​

NameDescription
IUserDataProvides access to the UserData and Tag properties associated to the component implementing this interface.
IBindableComponentBindable components implement this interface.
IDropTargetControls that support drag & drop operations implement this interface.
IWisejComponentAll wisej components implement this interface.
IWisejControlAll wisej controls derived from the Control class must implement this interface.
IWisejSerializableAllows an object to serialize itself.