Skip to content

Fix ErrorProvider tooltip rendering in dark mode - #14888

Merged
LeafShi1 merged 1 commit into
dotnet:mainfrom
LeafShi1:Fix_14879_errorProvider_tooltip_rendering_issue
Aug 14, 2026
Merged

LeafShi1 merged 1 commit into
dotnet:mainfrom
LeafShi1:Fix_14879_errorProvider_tooltip_rendering_issue

Conversation

@LeafShi1

@LeafShi1 LeafShi1 commented Aug 13, 2026 •

Copy link
Copy Markdown
Member

Fixes #14879

Root Cause

ErrorProvider creates its own native tooltip window, bypassing the dark-mode theme setup used by the standard ToolTip component. As a result, the tooltip retained its light theme after Application.SetColorMode(SystemColorMode.Dark).

Proposed changes

  • Apply the native DarkMode_Explorer theme to the ErrorProvider tooltip window when dark mode is enabled and high contrast mode is inactive.

Customer Impact

  • Applications using ErrorProvider in dark mode now provide a consistent tooltip appearance and improved readability.

Regression?

  • No

Risk

  • Minimal

Screenshots

Before

ErrorProvider tooltips rendered with a light background and dark text in dark mode, making them visually inconsistent with the application.

Image

After

ErrorProvider tooltips render using the native dark theme. High contrast and non-dark modes retain their existing behavior.

image

Test methodology

  • Manually

Test environment(s)

  • .net 11.0.0-rc.1.26411.119
Microsoft Reviewers: Open in CodeFlow

@LeafShi1
LeafShi1 requested a review from a team as a code owner August 13, 2026 07:41
@LeafShi1
LeafShi1 requested review from SimonZhao888 and ricardobossan and a lite review from Copilot and removed request for a team August 13, 2026 07:46

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 fixes inconsistent ErrorProvider tooltip theming when SystemColorMode.Dark is enabled by applying the native dark-mode tooltip theme to the ErrorProvider’s privately-created tooltip window, aligning its behavior with the standard ToolTip component.

Changes:

  • Apply the DarkMode_Explorer window theme to the ErrorProvider tooltip window when dark mode is enabled.
  • Ensure the theme is not applied when High Contrast mode is active.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@KlausLoeffelmann KlausLoeffelmann left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Nice!

@LeafShi1
LeafShi1 merged commit e2bbd5e into dotnet:main Aug 14, 2026
10 checks passed
@dotnet-milestone-bot dotnet-milestone-bot Bot added this to the 11.0-rc1 milestone Aug 15, 2026
@github-actions github-actions Bot locked and limited conversation to collaborators Sep 14, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Dark Mode] The ToolTip is not in dark mode for ErrorProvider control after enabled SystemColorMode.Dark

3 participants