Skip to content

Fix issue 14667: [HDPI] The icon of Property Page button changed after switched the LargeButtons property value from False to True - #14672

Merged
SimonZhao888 merged 2 commits into
dotnet:mainfrom
SimonZhao888:Fix_Issue_14667
Jul 1, 2026
Merged

SimonZhao888 merged 2 commits into
dotnet:mainfrom
SimonZhao888:Fix_Issue_14667

Conversation

@SimonZhao888

@SimonZhao888 SimonZhao888 commented Jun 24, 2026 •

Copy link
Copy Markdown
Member

Fixes #14667

When creating _largeButtonImages in EnsureLargeButtons(), the order in which _propertyPageBitmap and _tabs icons are added is inconsistent, causing the image index to be misaligned, resulting in the display of the wrong icon after switching to the larger icon.

Proposed changes

  • Adjust the order in which large icons are added within EnsureLargeButtons(): Add _propertyPageBitmap first, then add the bitmaps for each tab, ensuring consistency with the toolbar button creation/indexing logic.

Customer Impact

  • Fixes incorrect Property Page icon rendering in HDPI when toggling PropertyGrid.LargeButtons from False to True, preventing UI confusion and restoring correct toolbar icon mapping.

Regression?

  • Yes

Risk

  • Mini

Screenshots

Before

image

After

14667-after.mp4

Test methodology

  • Manual

Test environment(s)

  • 11.0.100-preview.5.26227.104
Microsoft Reviewers: Open in CodeFlow

…r switched the LargeButtons property value from False to True

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 aims to fix HDPI toolbar icon mis-mapping in PropertyGrid when toggling LargeButtons from false to true by changing the order used to populate _largeButtonImages in EnsureLargeButtons().

Changes:

  • Reorders how _propertyPageBitmap and tab bitmaps are added to _largeButtonImages in the scaling-required path.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@LeafShi1 LeafShi1 added this to the 11.0-preview7 milestone Jul 1, 2026
@SimonZhao888
SimonZhao888 merged commit 73bc01b into dotnet:main Jul 1, 2026
8 checks passed
@SimonZhao888
SimonZhao888 deleted the Fix_Issue_14667 branch July 1, 2026 03:03
@LeafShi1 LeafShi1 added the releasenotes-candidate This issue is a candidate to be mentioned in the release notes, if the respective PR fixed it. label Jul 15, 2026
@github-actions github-actions Bot locked and limited conversation to collaborators Aug 14, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

releasenotes-candidate This issue is a candidate to be mentioned in the release notes, if the respective PR fixed it.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[HDPI] The icon of Property Page button changed after switched the LargeButtons property value from False to True

4 participants