Skip to content
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

Fix: Fixed issue where HorizontalMultitaskingControl could have negative margin #10888

Merged

Conversation

cinqmilleans
Copy link
Contributor

@cinqmilleans cinqmilleans commented Dec 30, 2022

Resolved / Related Issues
It happened to me that the appWindowTitleBar.RightInset value was negative. This value is provided by the sdk, we do not calculate it. This may cause an exception because GridLength does not accept a negative value. This pr fixes that problem.

Validation
How did you test these changes?

  • Built and ran the app
  • Tested the changes for accessibility

@yaira2
Copy link
Member

yaira2 commented Dec 30, 2022

How was it negative?

@cinqmilleans
Copy link
Contributor Author

The HorizontalMultitaskingControl constructor throws an exception. This has no important consequence because it is intercepted by the xaml. However, there are 3 problems.

  1. This exception is resource intensive.
  2. If a future commit adds code to the end of this constructor, it cannot be executed randomly.
  3. This may interfere with debugging another feature. The code should not cause any easily avoidable exceptions.

@yaira2
Copy link
Member

yaira2 commented Jan 2, 2023

How can I reproduce this issue?

@cinqmilleans
Copy link
Contributor Author

I don't know how to reproduce it, but it's happened to me before.

@lukeblevins
Copy link
Contributor

Should the system-provided inset values ever be negative? Obviously, if that's a possibility at this point, we'd want to prevent it.

Has a bug report for this been opened in microsoft/WindowsAppSDK?

Copy link
Member

@yaira2 yaira2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@yaira2 yaira2 changed the title Fix HorizontalMultitaskingControl RightPaddingColumn.Width Fix: Fixed issue where HorizontalMultitaskingControl could have negative margin Feb 7, 2023
@yaira2 yaira2 added the ready to merge Pull requests that are approved and ready to merge label Feb 7, 2023
@yaira2 yaira2 merged commit f61f49b into files-community:main Feb 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready to merge Pull requests that are approved and ready to merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants