Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Update the method GetParentAutoScaleFactor to use container.AutoScaleFactor to get the latest value #13426

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

Conversation

LeafShi1
Copy link
Member

@LeafShi1 LeafShi1 commented May 8, 2025

Fixes #12851

Proposed changes

  • Update the method GetParentAutoScaleFactor to use container.AutoScaleFactor instead of container._currentAutoScaleFactor to get the latest value

Customer Impact

  • ContainerControl can be scaled correctly when moved from one ControlCollection to another ControlCollection

Regression?

  • Yes

Risk

  • Minimal

Screenshots

Before

Image

After

AfterChanges

Test methodology

  • Manually

Test environment(s)

  • .net 10.0.0-preview.5.25252.107
Microsoft Reviewers: Open in CodeFlow

@LeafShi1 LeafShi1 requested a review from a team as a code owner May 8, 2025 08:55
@LeafShi1 LeafShi1 requested a review from Copilot May 8, 2025 08:56
Copy link

@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.

Pull Request Overview

This PR updates the GetParentAutoScaleFactor method to leverage the container's AutoScaleFactor property, ensuring that the latest scaling value is used when a ContainerControl is moved between ControlCollections.

  • Replaced the use of the private field _currentAutoScaleFactor with the public AutoScaleFactor property.
  • Aims to improve the correctness of scaling behavior in ContainerControl.

@LeafShi1 LeafShi1 marked this pull request as draft May 8, 2025 10:13
@dotnet-policy-service dotnet-policy-service bot added the draft draft PR label May 8, 2025
@LeafShi1 LeafShi1 closed this May 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ContainerControl incorrectly scales multiple times when moving from one ControlCollection to another.
1 participant