Updated: February 2009
Represents a control that raises its Click event repeatedly from the time it is pressed until it is released.
Assembly: PresentationFramework (in PresentationFramework.dll)
XMLNS for XAML: http://schemas.microsoft.com/winfx/2006/xaml/presentation, http://schemas.microsoft.com/netfx/2007/xaml/presentation
The class represents a control that is similar to a Button. However, repeat buttons give you control over when and how the Click event occurs. The 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.
Dependency properties for this control might be set by the control’s default style. If a property is set by a default style, the property might change from its default value when the control appears in the application. The default style is determined by which desktop theme is used when the application is running. For more information, see Themes.
The following example shows how to create a .
<RepeatButton Width="100" DockPanel.Dock="Top" Delay="500" Interval="100" Click="Increase"> Increase </RepeatButton> <TextBlock Name="valueText" Width="100" DockPanel.Dock="Top" TextAlignment="Center" FontSize="16"> 0 </TextBlock> <RepeatButton Width="100" DockPanel.Dock="Top" Delay="500" Interval="100" Click="Decrease"> Decrease </RepeatButton>
Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.