Replies: 3 comments
-
A common scenario is, for example, in a music player where a scheduled task periodically updates the playback progress bar. Users can drag the progress bar to adjust the music playback position, requiring monitoring of the dragging behavior to prevent the scheduled task from updating it. |
Beta Was this translation helpful? Give feedback.
-
WinUI 3 slider is like UWP slider where you can handle PointerPressed, PointerMoved, ... events (with AddHandler) |
Beta Was this translation helpful? Give feedback.
-
Even so, adding the aforementioned events to the Slider is beneficial for enhancing the developer experience. It's not reasonable to expect all features to be implemented through workarounds, as such code tends to be too messy and hard to maintain. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Proposal: Add OnThumbDragStarted and OnThumbDragCompleted Events to WinUI3 Slider Control
Summary
Propose adding
OnThumbDragStarted
andOnThumbDragCompleted
events to the WinUI3Slider
control to enable developers to track when a user begins and ends thumb dragging. This aligns with UWP/WPF'sThumb.DragStarted
,Thumb.DragCompleted
/OnThumbDragStarted
,OnThumbDragStarted
events.Rationale
Slider
behavior in other Microsoft XAML frameworks, reducing learning curve friction.Scope
OnThumbDragStarted
event when thumb dragging beginsOnThumbDragCompleted
event when thumb dragging endsOnThumbDragDelta
event for intermediate drag updatesImportant Notes
API Proposal:
Usage Example:
Design Alignment:
Slider
event model.Microsoft.UI.Xaml.Controls.Primitives
event handlers.Open Questions
OnThumbDragDelta
(continuous drag updates) be included in this proposal?RangeBase
controls (e.g.,ScrollBar
,ProgressBar
)?This proposal directly addresses the gap in WinUI3’s
Slider
control while prioritizing migration compatibility and user experience.Beta Was this translation helpful? Give feedback.
All reactions