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

Open
SimonZhao888 wants to merge 2 commits into
dotnet:mainfrom
SimonZhao888:Fix_Issue_14667
Open

Fix issue 14667: [HDPI] The icon of Property Page button changed after switched the LargeButtons property value from False to True#14672
SimonZhao888 wants to merge 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

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

2 participants