Intersoft ClientUI Documentation
How-to: Register UXDateTimeUpDown Command To UXButton

This example shows how to register UXDateTimeUpDown command to a UXButton.

Example

Description

UXDateTimeUpDown 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.

UXDateTimeUpDown 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.

Code

View
Copy Code
<StackPanel>
    <Intersoft:UXDateTimeUpDown Width="100" x:Name="uxDateTime1" />
    <Intersoft:UXButton Height="20" Width="200" Content="Invoke Increase Command" Command="Intersoft:UpDownCommands.Increase" CommandTarget="{Binding ElementName=uxDateTime1}"/>
</StackPanel>
        

See Also

Concepts