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
OnThumbDragStartedandOnThumbDragCompletedevents to the WinUI3Slidercontrol to enable developers to track when a user begins and ends thumb dragging. This aligns with UWP/WPF'sThumb.DragStarted,Thumb.DragCompleted/OnThumbDragStarted,OnThumbDragStartedevents.Rationale
Sliderbehavior in other Microsoft XAML frameworks, reducing learning curve friction.Scope
OnThumbDragStartedevent when thumb dragging beginsOnThumbDragCompletedevent when thumb dragging endsOnThumbDragDeltaevent for intermediate drag updatesImportant Notes
API Proposal:
Usage Example:
Design Alignment:
Sliderevent model.Microsoft.UI.Xaml.Controls.Primitivesevent handlers.Open Questions
OnThumbDragDelta(continuous drag updates) be included in this proposal?RangeBasecontrols (e.g.,ScrollBar,ProgressBar)?This proposal directly addresses the gap in WinUI3’s
Slidercontrol while prioritizing migration compatibility and user experience.Beta Was this translation helpful? Give feedback.
All reactions