diff --git a/src/Avalonia.Controls/RepeatButton.cs b/src/Avalonia.Controls/RepeatButton.cs index 482c45c8c0..07a1e82638 100644 --- a/src/Avalonia.Controls/RepeatButton.cs +++ b/src/Avalonia.Controls/RepeatButton.cs @@ -7,35 +7,35 @@ namespace Avalonia.Controls public class RepeatButton : Button { /// - /// Defines the property. + /// Defines the property. /// - public static readonly StyledProperty DelayProperty = - AvaloniaProperty.Register(nameof(Delay), 100); + public static readonly StyledProperty IntervalProperty = + AvaloniaProperty.Register(nameof(Interval), 100); /// - /// Defines the property. + /// Defines the property. /// - public static readonly StyledProperty InitialDelayProperty = - AvaloniaProperty.Register(nameof(InitialDelay), 300); + public static readonly StyledProperty DelayProperty = + AvaloniaProperty.Register(nameof(Delay), 300); private DispatcherTimer _repeatTimer; /// /// Gets or sets the amount of time, in milliseconds, of repeating clicks. /// - public int Delay + public int Interval { - get { return GetValue(DelayProperty); } - set { SetValue(DelayProperty, value); } + get { return GetValue(IntervalProperty); } + set { SetValue(IntervalProperty, value); } } /// /// Gets or sets the amount of time, in milliseconds, to wait before repeating begins. /// - public int InitialDelay + public int Delay { - get { return GetValue(InitialDelayProperty); } - set { SetValue(InitialDelayProperty, value); } + get { return GetValue(DelayProperty); } + set { SetValue(DelayProperty, value); } } private void StartTimer() @@ -48,13 +48,13 @@ namespace Avalonia.Controls if (_repeatTimer.IsEnabled) return; - _repeatTimer.Interval = TimeSpan.FromMilliseconds(InitialDelay); + _repeatTimer.Interval = TimeSpan.FromMilliseconds(Delay); _repeatTimer.Start(); } private void RepeatTimerOnTick(object sender, EventArgs e) { - var interval = TimeSpan.FromMilliseconds(Delay); + var interval = TimeSpan.FromMilliseconds(Interval); if (_repeatTimer.Interval != interval) { _repeatTimer.Interval = interval;