Skip to content

Conversation

LeafShi1
Copy link
Member

@LeafShi1 LeafShi1 commented Feb 11, 2025

Back port pr #10850 and pr #12947 to release8.0
Fixes #12850 and #12939

Bug Description

The PR #8486 removed new Icon(icon, 16 ,16) from IconRegion constructor, that causes the released icon object to be directly referenced, so there is an exception Cannot access a disposed object. Object name: 'Icon' .

Backport #10850 fixes the above problem, but the PR always scaled IconRegion to 100% DPI, so it causes issue #12939: The icon of errorProvider is not scaled well on HDPI screen, so backport #12947 to scale the ErrorProvider's IconRegion according to the current device DPI.

Customer Impact

  • ErrorProvider exception when shown a second time after being dragged on another monitor with different DPI. This regression was reported by the customer.

Regression?

Risk

  • Low - the fix only change ErrorProvider icon's display size when it run in HDPI screen.

Testing

  • Manual testing with the user-provided project.
  • Automation regression test
Microsoft Reviewers: Open in CodeFlow

ricardobossan and others added 2 commits February 11, 2025 13:59
* Sets icon size with ScaleHelper, for the ErrorProvider component.

---------

Co-authored-by: Ricardo Bossan (BEYONDSOFT CONSULTING INC) (from Dev Box) <[email protected]>
…est (dotnet#10847)

Co-authored-by: Ricardo Bossan (BEYONDSOFT CONSULTING INC) (from Dev Box) <[email protected]>
@LeafShi1 LeafShi1 requested a review from a team as a code owner February 11, 2025 06:41
@LeafShi1 LeafShi1 changed the title Fix 12850 error provider exception in diferent dpi [release/8.0] Fix 12850 error provider exception in diferent dpi Feb 11, 2025
@LeafShi1 LeafShi1 changed the title [release/8.0] Fix 12850 error provider exception in diferent dpi [release/8.0] Fix 12850 error provider exception in different dpi Feb 11, 2025
@Tanya-Solyanik Tanya-Solyanik added 🚫 * NO-MERGE * The PR is not ready for merge yet (see discussion for detailed reasons) waiting-for-testing The PR is awaiting manual testing by the primary team; no action is yet required from the author(s) labels Feb 11, 2025
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 3 out of 4 changed files in this pull request and generated 1 comment.

Files not reviewed (1)
  • src/System.Windows.Forms/tests/IntegrationTests/WinformsControlsTest/ErrorProviderTest.Designer.cs: Language not supported

Copy link
Member

@ricardobossan ricardobossan left a comment

Choose a reason for hiding this comment

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

All LGTM!

@Tanya-Solyanik Tanya-Solyanik removed the waiting-for-testing The PR is awaiting manual testing by the primary team; no action is yet required from the author(s) label Feb 13, 2025
Tanya-Solyanik
Tanya-Solyanik previously approved these changes Feb 13, 2025
@JeremyKuhne JeremyKuhne added servicing-consider .NET Shiproom label indicating a PR seeks to enter into a branch under Tell-Mode criteria servicing-approved .NET Shiproom approved the PR for merge and removed servicing-consider .NET Shiproom label indicating a PR seeks to enter into a branch under Tell-Mode criteria labels Mar 5, 2025
@LeafShi1 LeafShi1 merged commit 98f54ff into dotnet:release/8.0 Mar 7, 2025
8 checks passed
@LeafShi1 LeafShi1 removed the 🚫 * NO-MERGE * The PR is not ready for merge yet (see discussion for detailed reasons) label Mar 7, 2025
@github-actions github-actions bot locked and limited conversation to collaborators Apr 6, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
servicing-approved .NET Shiproom approved the PR for merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants