Intersoft ClientUI Documentation
UXRepeatButton

Using UXRepeatButton 

The UXRepeatButton class represents a control that is similar to a UXButton. However, repeat buttons give you control over when and how the Click event occurs. The UXRepeatButton raises the Click event repeatedly from the time it is pressed until it is released. The Delay property determines when the event begins. You can also control the interval of the repetitions with the Interval property.

XAML
Copy Code
<StackPanel>
    <Intersoft:UXRepeatButton Width="100" Delay="500" Interval="100" Click="Increase" Content="Increase"/>          
    <TextBlock Name="valueText" Width="100" Text="0"
               TextAlignment="Center" FontSize="16"/>      
    <Intersoft:UXRepeatButton Width="100" Delay="500" Interval="100" Click="Decrease" Content="Decrease"/>      
</StackPanel>
C#
Copy Code
void Increase(object sender, RoutedEventArgs e)
{
    Int32 Num = Convert.ToInt32(valueText.Text);

    valueText.Text = ((Num + 1).ToString());
}

void Decrease(object sender, RoutedEventArgs e)
{
    Int32 Num = Convert.ToInt32(valueText.Text);

    valueText.Text = ((Num - 1).ToString());
}

 

The UXRepeatButton is inherited from UXButton, therefore it inherited all characteristic of UXButton including Navigation and Commanding. To learn more about UXButton, see UXButton Overview.

See Also