Skip to content

Stepper

A control used to increment or decrement a value. The stepper is an instance of the UIStepper.

Stepper

Configuring properties

The following figure shows the stepper properties that can be configured from the story board:

Stepper Properties

Handle value changed event

You can wire up the ValueChanged event for the stepper from the story board as the following figure shows:

Stepper value changed event

and add the method in the view controller as follows:

1
2
3
4
partial void HandlePrintCopies(UIStepper sender)
{
    labelCopies.Text = $"{sender.Value} Copies";
}

The ValueChanged event can also be wired up directly from code as follows:

1
2
3
stepper.ValueChanged += (sender, e) => {
    Debug.WriteLine(stepper.Value);
};

The stepper variable have been defined from the story board.