This example shows how to register UXDomainUpDown command to a UXButton.
UXDomainUpDown 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.
UXDomainUpDown 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:UXDomainUpDown Width="100" x:Name="uxDomain1"> <Systems:String>A</Systems:String> <Systems:String>B</Systems:String> <Systems:String>C</Systems:String> <Systems:String>D</Systems:String> <Systems:String>E</Systems:String> </Intersoft:UXDomainUpDown> <Intersoft:UXButton Height="20" Width="200" Content="Invoke Increase Command" Command="Intersoft:UpDownCommands.Increase" CommandTarget="{Binding ElementName=uxDomain1}"/> </StackPanel> |