microsoft / microsoft/microsoft-ui-xaml
Toggles slide too far graphical bug
- Dominant language
- C++
- Stars
- 8.4k
- Forks
- 942
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 105
Description
### Describe the bug
When dragging a toggle button, the toggle handle gets wider but slides as far as it would if it were round.
### Why is this important?
The toggle handle should only slide as far as it can without making the margin around the handle shape smaller on any side than on the other.
### Steps to reproduce the bug
1. Open any WinUI 3 app with a toggle in it.
2. Mouse down on the toggle.
3. Drag the mouse left and right while holding mouse down.
### Actual behavior
The toggle slides too far.
### Expected behavior
The toggle slides as far as it can without going past the margin.
### Screenshots
https://github.com/user-attachments/assets/177c06ed-9088-4350-864d-d1c3350039a5
### NuGet package version
None
### Windows version
Windows 11 (24H2): Build 26100
### Additional context
_No response_
Contributor guide
Research direction
Start by reproducing the behavior in a WinUI 3 app with a toggle, following the mouse-drag interaction described in the issue. Trace the Toggle control's handle sizing and movement logic, then verify that the handle stops while preserving equal margins on both sides during dragging.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- desktop
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100