Conversation
There was a problem hiding this comment.
Pull request overview
Fixes a WinUI layout bug affecting the CmdPal settings page where content becomes offset/cropped when a MaxWidth panel is hosted inside a ScrollViewer, improving resize behavior in Settings.
Changes:
- Wrapes the CmdPal page content in an additional panel inside the
ScrollViewerto avoid the WinUI offset issue. - Switches the page’s max width from a hard-coded value to the shared
PageMaxWidthresource.
| @@ -13,208 +13,210 @@ | |||
| mc:Ignorable="d"> | |||
| <Grid> | |||
| <ScrollViewer AutomationProperties.AutomationId="PageScrollViewer"> | |||
There was a problem hiding this comment.
The ScrollViewer has Background="Red", which looks like a debugging aid and will ship a visibly incorrect background/theme for the CmdPal settings page. Please remove it (or replace with an appropriate {ThemeResource ...} if a background is actually intended).
| @@ -13,208 +13,210 @@ | |||
| mc:Ignorable="d"> | |||
| <Grid> | |||
| <ScrollViewer AutomationProperties.AutomationId="PageScrollViewer"> | |||
There was a problem hiding this comment.
The extra wrapper <Grid> inside the ScrollViewer appears to be a layout workaround for the WinUI offset/MaxWidth issue. To prevent future cleanups from removing it (and reintroducing the bug), add a short XAML comment explaining why this wrapper grid is required (ideally referencing the related issue).
| <ScrollViewer AutomationProperties.AutomationId="PageScrollViewer"> | |
| <ScrollViewer AutomationProperties.AutomationId="PageScrollViewer"> | |
| <!-- Wrapper Grid required to work around WinUI ScrollViewer + MaxWidth layout offset issue. Do not remove. --> |
Summary of the Pull Request
This is a weird bug in WinUI where a child panel gets a weird offset when wrapped in a
ScrollViewerand if it has aMaxWidth. The solution is to wrap it with another panel 🤷Top: with fix

Bottom: 0.98.1
PR Checklist
Detailed Description of the Pull Request / Additional comments
Validation Steps Performed