NumberBox's compact SpinButton can scroll off window
Describe the bug
As title suggest.
Steps to reproduce the bug
Click to open the SpinButton of a NumberBox, scroll the page.
Expected behavior
No response
Screenshots
NuGet package version
WinUI 3 - Windows App SDK 1.5.4: 1.5.240607001
Windows version
Windows 11 (22H2): Build 22621
Additional context
No response
Hi I'm an AI powered bot that finds similar issues based off the issue title.
Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one. Thank you!
Closed similar issues:
- NumberBox spin buttons doesn't disappear upon scrolling (#4605), similarity score: 0.83
- NumberBox spin buttons are clipped by edge of window (#1709), similarity score: 0.79
- Unable to increase the value of number box with a spin button when SpinButton Placement is set to Compact. (#1881), similarity score: 0.77
- NumberBox should correctly handle mousewheel events (#1705), similarity score: 0.76
- NumberBox SpinButtons are not clipped correctly (#4601), similarity score: 0.74
Note: You can give me feedback by thumbs upping or thumbs downing this comment.
You can see here: https://github.com/microsoft/microsoft-ui-xaml/blob/98a60c8f30c84f297a175dd2884d54ecd1c8a4a9/controls/dev/NumberBox/NumberBox.xaml#L113
ShouldConstrainToRootBounds="False"
and let's see what happen for UWP/WinUI2
So I believe it's microsoft's intention.
The ShouldConstrainToRootBounds="False" is more likely there to allow for acrylic effect.
The
ShouldConstrainToRootBounds="False"is more likely there to allow for acrylic effect.
ShouldConstrainToRootBounds="True" can also have in app acrylic,
Set this to false in WinUI3 can allow user interact the popup by mouse over a custom titlebar which set by ExtentedContentIntoTitleBar, while ShouldConstrainToRootBounds="False" will casue the popup render below the titlebar and can't be accessed.
NumberBox should use EffectiveViewportChanged to close the popup whenever the NumberBox itself moves around in the scroll view. That would prevent this problem.