This documentation is archived and is not being maintained.

RepeatButton Class

Updated: February 2009

Represents a control that raises its Click event repeatedly from the time it is pressed until it is released.

Namespace:  System.Windows.Controls.Primitives
Assembly:  PresentationFramework (in PresentationFramework.dll)

public class RepeatButton extends ButtonBase

Content Model: RepeatButton is a ContentControl. Its content property is Content. For more information on the content model for RepeatButton, see Controls Content Model Overview.

The RepeatButton 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 RepeatButton 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.

<RepeatButton Width="100" DockPanel.Dock="Top" 
              Delay="500" Interval="100" 

<TextBlock Name="valueText" 
           Width="100" DockPanel.Dock="Top" 
           TextAlignment="Center" FontSize="16">

<RepeatButton Width="100" DockPanel.Dock="Top" 
              Delay="500" Interval="100" 
No code example is currently available or this language may not be supported.


Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

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.

.NET Framework

Supported in: 3.5, 3.0




February 2009

Described how default styles change dependency properties.

Customer feedback.