winforms icon indicating copy to clipboard operation
winforms copied to clipboard

[Dark Mode] The Form title bar is white color when the MDIParent1 MainMenuStrip property is set to none

Open MelonWang1 opened this issue 11 months ago • 2 comments

.NET version

.NET 10.0.100-preview.2.25118.3

Did it work in .NET Framework?

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

The Form title bar is white color when the MDIParent1 MainMenuStrip property is set to none.

Image

https://github.com/user-attachments/assets/f0a3ce9b-9f6f-45a0-a14f-52be1c43d662

Steps to reproduce

  1. Create a winforms .NET Core project.
  2. Enable DarkMode by Application.SetColorMode(SystemColorMode.Dark) in Program.cs file.
  3. Ctrl+Shift+A to add a MDI Parent Form.
  4. Set MDIParent1 MainMenuStrip property to none.
  5. Build and run MDIParent1.
  6. Click File -> New, select Window0's Maximize button.

More Info:

  1. This issue also repro when click MDI Parent button in WinformsControlTest app.

Image

MelonWang1 avatar Feb 20 '25 09:02 MelonWang1

Hi @KlausLoeffelmann
@JeremyKuhne @Shyam-Gupta this is Not Fixed yet MDI Menu Bar still in Light Mode after setting Applicathion Color to Dark. set Mdi MainMenuStrip property to none cuases win32 mdi menubar to be visable. it's need Mdi Win32 Menu bar to be repainted with dark Colors. example after Correctly paint it.

Image

memoarfaa avatar Jun 06 '25 13:06 memoarfaa

Still repro in the latest .NET 10 SDK build: 10.0.100-preview.6.25311.107, reactive it. @KlausLoeffelmann I follow issue steps, it still repro, can you please take a look?

Image

Olina-Zhang avatar Jun 13 '25 06:06 Olina-Zhang