Stepper
A control used to increment or decrement a value. The stepper is an instance of the UIStepper
.
Configuring properties
The following figure shows the stepper properties that can be configured from the story board:
Handle value changed event
You can wire up the ValueChanged
event for the stepper from the story board as the following figure shows:
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.