Browse Source

fix NumericUpDown Spinned event (#18180)

* Raise Spinned event after value change

* Simplify invoke event
pull/18206/head
nightfog-git 2 years ago
committed by GitHub
parent
commit
156abb7395
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 5
      src/Avalonia.Controls/NumericUpDown/NumericUpDown.cs

5
src/Avalonia.Controls/NumericUpDown/NumericUpDown.cs

@ -630,9 +630,6 @@ namespace Avalonia.Controls
throw new ArgumentNullException(nameof(e)); throw new ArgumentNullException(nameof(e));
} }
var handler = Spinned;
handler?.Invoke(this, e);
if (e.Direction == SpinDirection.Increase) if (e.Direction == SpinDirection.Increase)
{ {
DoIncrement(); DoIncrement();
@ -641,6 +638,8 @@ namespace Avalonia.Controls
{ {
DoDecrement(); DoDecrement();
} }
Spinned?.Invoke(this, e);
} }
/// <summary> /// <summary>

Loading…
Cancel
Save