Skip to content

ToolStripTextBox renders incorrectly when hosted in MenuStrip #14793

Description

@Olina-Zhang

.NET version

.NET 11.0.100-preview.7.26365.114 + Private dlls built from Net11/Integration-4 branch of https://github.com/KlausLoeffelmann/winforms repo

Did it work in .NET Framework?

Does not apply - did not exist before.

Did it work in any of the earlier releases of .NET Core or .NET 5+?

Not support, new feature of #14792

Issue description

When running in Dark Mode with VisualStylesMode = .NET11, a ToolStripTextBox hosted in a MenuStrip is rendered incorrectly.

Unlike the same control hosted in a ToolStrip, the MenuStrip version displays an unexpected light-colored rectangular area on the right side of the text box. The background is not rendered using the Dark Mode color scheme, resulting in an obvious visual artifact.

Image

Steps to reproduce

  1. Create a WinForms application.
  2. Set VisualStylesMode to NET11.
  3. Enable Dark Mode.
  4. Add a ToolStripTextBox to a MenuStrip.
  5. Run the application.

Activity

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

Metadata

Metadata

Assignees

Labels

📚 documentationOpen issue here - https://github.com/dotnet/dotnet-api-docs/issuesNewApi-Net11Tracks issues for public APIs targeted for .NET 11.area-DarkModeIssues relating to Dark Mode featurerendering-or-artifacts-issuesControls paint themselves, sometimes "outside their borders." Primarily looks, not function.

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions