-
Notifications
You must be signed in to change notification settings - Fork 693
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tooltips are not displayed after capturing/releasing pointer #9222
Comments
The tooltip does not work even without any of the capture code. The problem is that the TextBlock you have in the Grid is on 'top' of the button. You can try using a stack panel or rows/columns in grid to make sure mouse events go to the button.
|
A little more explanation. Many controls attempt to fill a grid cell (if they are contained withing a grid). TextBlock is one of those controls. We can debate whether it should or not, but currently it does. So when you place the TextBlock after the Button in the markup, it will overlay the whole grid cell, covering the button. That you can see the button through the background of the TextBlock is beside the point. Some other things to notice is you aren't getting the pointer effects (e.g. pressed and released states) and the click event doesn't fire. This is because the text block is getting these events. Also, if you add a tooltip to the text block, it will show up even when you are hovering over the button. Couple of ways to fix this.
|
Thanks, I was trying to reproduce a bug in a MAUI Windows app where tooltips stop appearing after a while. The TextBlock wasn't really relevant to my case, just accidentally staged while trying to come up with a minimal repro to determine if the behaviour I was seeing was a MAUI bug or a WinUI bug. So my bad, this doesn't work as a repro. I'll have another go and re-open if I can show it's a WinUI 3 issue. |
Describe the bug
Tooltips are not displayed after capturing/releasing pointer
Steps to reproduce the bug
Tooltips are then not displayed on mouse over
Repro repo available at:
https://github.com/molesmoke/WinUITestApp/tree/tooltip
Expected behavior
Tooltips should continue to be displayed on mouse over
Screenshots
No response
NuGet package version
WinUI 3 - Windows App SDK 1.5 Experimental 1: 1.5.231202003-experimental1
Windows version
Windows 11 (22H2): Build 22621
Additional context
No response
The text was updated successfully, but these errors were encountered: