winforms
winforms copied to clipboard
[DarkMode] MDIParent MainMenuStrip Bitmaps draw with light Colors
.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
Steps to reproduce
- Create a winforms .NET Core project.
- Enable DarkMode by Application.SetColorMode(SystemColorMode.Dark) in Program.cs file.
- Build and run MDIParent.
Is this only the case with MDI-Clients when you merge menues, or is this a general issue, depending on the Bitmap?
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