Intersoft ClientUI 8 > ClientUI Controls > Control Library > Advanced Input Controls Overview > UXSliderBar > How-to: Register UXSliderBar Command to UXButton |
This example shows how to register UXSliderBar command to a UXButton.
UXSliderBar 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.
UXSliderBar already includes several predefined commands to change the selected value that you can use in your application, such as: DecreaseSmall, DecreaseLarge, IncreaseSmall, IncreaseLarge, Minimize, and Maximize.
The following code example shows how to register IncreaseLarge command to UXButton using Command and CommandTarget properties.
View |
Copy Code
|
---|---|
<StackPanel> <Intersoft:UXSliderBar x:Name="uxSlider1" TickPlacement="BottomRight" HandlesVisibility="Visible" /> <Intersoft:UXButton Height="20" Width="200" Content="Invoke IncreaseLarge Command" Command="Intersoft:SliderCommands.IncreaseLarge" CommandTarget="{Binding ElementName=uxSlider1}"/> </StackPanel> |