Represents a button element that generates repeated click events when held down continuously. This class extends RadButtonElement to provide automatic click repetition functionality with configurable delay and interval timing. Like all elements, it can be nested in other Telerik controls. The RadRepeatButton class serves as a wrapper for this element, transferring events between the control and element instances. All UI rendering and logical functionality is implemented in this class.
Definition
Namespace:Telerik.WinControls.UI
Assembly:Telerik.WinControls.UI.dll
Syntax:
public class RadRepeatButtonElement : RadButtonElement, INotifyPropertyChanged, ICustomTypeDescriptor, ISupportSystemSkin, IBindableComponent, IComponent, IDisposable, ISupportDrag, ISupportDrop, IShortcutProvider, IStylableElement, IStylableNode, IButtonControl, IImageElement
Inheritance: objectDisposableObjectRadObjectRadElementVisualElementRadComponentElementRadItemRadButtonItemRadButtonElementRadRepeatButtonElement...
Derived Classes:
Implements:
Inherited Members
Constructors
Initializes a new instance of the RadRepeatButtonElement class. Creates a repeat button element with default settings and no initial text.
public RadRepeatButtonElement()
Initializes a new instance of the RadRepeatButtonElement class with the specified text. Creates a repeat button element with the provided text content and default repeat settings.
public RadRepeatButtonElement(string text)
The text to display on the repeat button element.
Fields
Identifies the Delay dependency property. This property defines the initial delay in milliseconds before repeat clicking begins when the button is held down. The default value is derived from system keyboard delay settings.
public static readonly RadProperty DelayProperty
Identifies the Interval dependency property. This property defines the interval in milliseconds between repeated clicks after the initial delay has elapsed. The default value is derived from system keyboard speed settings.
public static readonly RadProperty IntervalProperty
Properties
Gets or sets the amount of time, in milliseconds, the repeat button element waits while it is pressed before it starts repeating. This initial delay prevents accidental repeat operations from brief button presses. The value must be non-negative.
[Bindable(true)]
public int Delay { get; set; }
The delay in milliseconds before repeating starts. Must be non-negative. Default value is derived from system keyboard delay settings.
Gets or sets the amount of time, in milliseconds, between repeats once repeating starts. This interval controls the speed of repeated clicks after the initial delay period has elapsed. The value must be greater than zero.
[Bindable(true)]
public int Interval { get; set; }
The interval in milliseconds between repeated clicks. Must be greater than zero. Default value is derived from system keyboard speed settings.
Methods
Releases the managed resources used by the RadRepeatButtonElement. This method properly disposes of the internal timer to prevent resource leaks and calls the base disposal method.
protected override void DisposeManagedResources()
Overrides:
Handles the click event for the repeat button element. This method calls the base implementation and notifies the parent RadRepeatButton control to perform its button click operation, enabling the repeat functionality to propagate to the control level.
Handles the double-click event for the repeat button element. This method only processes the double-click if double-clicking is enabled for the button, calling the base implementation to maintain standard double-click behavior.
Handles the enabled state change event for the repeat button element. This method calls the base implementation, resets the pressed state to false when disabled, and stops the repeat timer to prevent further click generation.
protected override void OnEnabledChanged(RadPropertyChangedEventArgs e)
A RadPropertyChangedEventArgs that contains the event data.
Overrides:
Handles the mouse down event for the repeat button element. This method calls the base implementation and starts the repeat timer when the left mouse button is pressed, unless the button is configured for hover click mode.
protected override void OnMouseDown(MouseEventArgs e)
A MouseEventArgs that contains the event data.
Overrides:
Handles the mouse enter event for the repeat button element. This method calls the base implementation, processes mouse-over state changes for hover click mode, and starts the repeat timer if the button is already pressed when the mouse enters.
Handles the mouse leave event for the repeat button element. This method calls the base implementation and processes mouse-over state changes, which may stop the timer if the button is configured for hover click mode.
Handles the mouse up event for the repeat button element. This method calls the base implementation and stops the repeat timer when the left mouse button is released, unless the button is configured for hover click mode.
protected override void OnMouseUp(MouseEventArgs e)
A MouseEventArgs that contains the event data.
Overrides:
Handles the timer timeout event that triggers repeated button clicks. This method adjusts the timer interval to the configured repeat interval and generates click events while the button remains pressed, respecting the current click mode and mouse button state.