-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Open
Description
Problem
In the below demo code:
RightPaddingColumn.Width = new GridLength(appWindow.TitleBar.RightInset / scaleAdjustment);
app Window.TitleBar.RightInset may return a negative integer, which will lead to the program being crushed.
Reproduce:
Fast minimizing and restoring the window (for example: clicking the program in the taskbar) will reproduce the issue.
Possible fix:
I used Math.abs to filter appWindow.TitleBar.RightInset / scaleAdjustment works. The program does not crush anymore. May not a correct fix for this problem.
Document Details
⚠ Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.
- ID: 83eb07b8-55ba-97a5-3cb4-69ae39fe31cd
- Version Independent ID: 83eb07b8-55ba-97a5-3cb4-69ae39fe31cd
- Content: Title bar customization - Windows apps
- Content Source: hub/apps/develop/title-bar.md
- Product: reunion
- Technology: apps
- GitHub Login: @jwmsft
- Microsoft Alias: jimwalk