.NET MAUI NumericInput Commands
The NumericInput exposes IncreaseCommand
and DecreaseCommand
which can be used to define custom functionality upon the respective actions. These commands allow you to change and extend the control's default behavior.
In the next example, you can see how the NumericInput commands can be utilized to implement auto-reverse functionality – start from the Minimum value when the Maximum is reached and vice versa.
1. First, create the ViewModel
with both IncreaseCommand
and DecreaseCommand
implementations:
2. Define the NumericInput with the respective bindings:
For the NumericInput Commands example, go to the SDKBrowser Demo Application and navigate to NumericInput -> Features category.