dotnet/winforms

[DarkMode]The Form1 title bar change to white color when set the RightToLeft to Yes in PropertyGrid control

Open

#12,582 opened on Dec 4, 2024

View on GitHub
 (1 comment) (0 reactions) (1 assignee)C# (4,100 stars) (922 forks)batch import
area-DarkModehelp wanted

Description

.NET version

.NET 10.0.100-alpha.1.24573.1

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 Form1 title bar change to white color when set the RightToLeft to Yes in PropertyGrid control. Image

Steps to reproduce

Repro steps:

  1. Create a WinForms .NET application with PropertyGrid control
  2. Set PropertyGrid's selectedObject property to Form1
  3. Enable DarkMode by Application.SetColorMode(SystemColorMode.Dark) in Program.cs file
  4. Run the application
  5. In PropertyGrid control, set the RightToLeft property to Yes

More Info:

  1. If repro the issue, then set RightToLeft property to No, the Form1 title bar also be white color.

Contributor guide

[DarkMode]The Form1 title bar change to white color when set the RightToLeft to Yes in PropertyGrid control · dotnet/winforms#12582 | Good First Issue