This repository has been archived by the owner on May 1, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
[WPF] Fix FormsPanel MeasureOverride negative requested size #10653
Merged
samhouts
merged 5 commits into
xamarin:5.0.0
from
tessarolli:fix-WPF-FormsPanel-MeasureOverride-Negative-Size
Sep 9, 2020
Merged
[WPF] Fix FormsPanel MeasureOverride negative requested size #10653
samhouts
merged 5 commits into
xamarin:5.0.0
from
tessarolli:fix-WPF-FormsPanel-MeasureOverride-Negative-Size
Sep 9, 2020
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Hi Vladislav, I've update to check for all negative values. Personally, I dont believe it will break any of those fixes you mentioned, because in case you do receive a negative request size, it would throw an exception trying to instantiate a new Size(), that would prevent software execution. I did some testings on my end and all seems fine. |
VladislavAntonyuk
approved these changes
May 16, 2020
2 tasks
samhouts
added
t/bug 🐛
retarget-branch-required
PR or associated issues target a milestone. Please target this PR to the matching branch.
labels
Aug 4, 2020
samhouts
removed
the
retarget-branch-required
PR or associated issues target a milestone. Please target this PR to the matching branch.
label
Sep 3, 2020
samhouts
approved these changes
Sep 9, 2020
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description of Change
On WPF Platform, Element.Measure().Request(); sometimes return negative values (-1) on Width or Height. If that happened, instantiating a new Windows.Size with negative values would throw an exception that prevented software execution.
This fix is to prevent that from happening, as it checks and replaces -1 values with zero.
Issues Resolved
Fix Negative Width or Height on new Windows.Size();
API Changes
None
Platforms Affected
WPF
Behavioral/Visual Changes
None
Before/After Screenshots
Not applicable
PR Checklist