diff --git a/src/Avalonia.Controls/Primitives/Thumb.cs b/src/Avalonia.Controls/Primitives/Thumb.cs index 348922b71d..91141058e4 100644 --- a/src/Avalonia.Controls/Primitives/Thumb.cs +++ b/src/Avalonia.Controls/Primitives/Thumb.cs @@ -56,6 +56,26 @@ namespace Avalonia.Controls.Primitives { } + protected override void OnPointerCaptureLost(PointerCaptureLostEventArgs e) + { + if (_lastPoint.HasValue) + { + var ev = new VectorEventArgs + { + RoutedEvent = DragCompletedEvent, + Vector = _lastPoint.Value, + }; + + _lastPoint = null; + + RaiseEvent(ev); + } + + PseudoClasses.Remove(":pressed"); + + base.OnPointerCaptureLost(e); + } + protected override void OnPointerMoved(PointerEventArgs e) { if (_lastPoint.HasValue)