microsoft / microsoft/microsoft-ui-xaml
Can't click button with draggable image as content
- Dominant language
- C++
- Stars
- 8.4k
- Forks
- 942
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 105
Description
### Describe the bug
When setting a button with an image as content, the button will only be clickable where the image doesn't go, like the edges of the button.
### Why is this important?
It's a common scenario to have a clickable image.
### Steps to reproduce the bug
[Link to the repro](https://github.com/eduardobragaxz/DragButtonRepro)
### Actual behavior
Doesn't click if you click the image.
### Expected behavior
Can't click.
### Screenshots
_No response_
### NuGet package version
WinUI 3 - Windows App SDK 1.8.2: 1.8.251003001
### Windows version
Windows 11 (24H2): Build 26100
### Additional context
_No response_
Contributor guide
Research direction
Start by running the linked DragButtonRepro project with Windows App SDK 1.8.2 on Windows 11 and verify the hit-testing behavior. Then trace the WinUI button and image input handling to identify why clicks over the image are not delivered. Done means the button responds when clicking both the image and the surrounding button area.
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
- 35/100