Intersoft ClientUI 8 > ClientUI Controls > Control Library > Advanced Input Controls Overview > UXNumericUpDown > How-to: Register UXNumericUpDown Command To UXButton |
This example shows how to register UXNumericUpDown command to a UXButton.
UXNumericUpDown is built around the commanding semantics which allows the value changing interaction to be executed through declarative definition in the XAML markup. The commanding semantics is also an ideal approach for MVVM pattern development.
UXNumericUpDown already includes several predefined commands to change the selected value that you can use in your application, such as: Increase and Decrease.
The following code example shows how to register Increase command to UXButton using Command and CommandTarget properties.
View |
Copy Code
|
---|---|
<StackPanel> <Intersoft:UXNumericUpDown Width="100" x:Name="uxNumericUpDown1" /> <Intersoft:UXButton Height="20" Width="200" Content="Invoke Increase Command" Command="Intersoft:UpDownCommands.Increase" CommandTarget="{Binding ElementName=uxNumericUpDown1}"/> </StackPanel> |