Intersoft ClientUI 8 > ClientUI Controls > Control Library > Advanced Input Controls Overview > UXRating > How-to: Register UXRating Command To UXButton |
This example shows how to register UXRating command to a UXButton.
UXRating 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.
UXRating 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:UXRating Width="200" x:Name="uxRating1" /> <Intersoft:UXButton Height="20" Width="200" Content="Invoke Increase Command" Command="Intersoft:UXRatingCommands.Increase" CommandTarget="{Binding ElementName=uxRating1}"/> </StackPanel> |