winforms icon indicating copy to clipboard operation
winforms copied to clipboard

[DarkMode] MDIParent MainMenuStrip Bitmaps draw with light Colors

Open memoarfaa opened this issue 8 months ago • 2 comments

.NET version

.NET version

.NET 10.0.100-preview5.25266.103

Did it work in .NET Framework?

No

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

No

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

No, also repro in .NET 9.0 which it started to be supported.

Issue description

Issue description

MDIParent MainMenuStrip Bitmaps draw with light Colors

Image

Steps to reproduce

  1. Create a winforms .NET Core project.
  2. Enable DarkMode by Application.SetColorMode(SystemColorMode.Dark) in Program.cs file.
  3. Build and run MDIParent.

memoarfaa avatar May 17 '25 23:05 memoarfaa

Is this only the case with MDI-Clients when you merge menues, or is this a general issue, depending on the Bitmap?

KlausLoeffelmann avatar May 19 '25 17:05 KlausLoeffelmann

Is this only the case with MDI-Clients when you merge menues, or is this a general issue, depending on the Bitmap?

The Bitmap is drawn using DrawFrameControl method. See https://github.com/dotnet/winforms/blob/main/src/System.Windows.Forms/System/Windows/Forms/Controls/ToolStrips/ToolStripMenuItem.cs#L655

memoarfaa avatar May 19 '25 17:05 memoarfaa