dotnet / dotnet/winforms

[Dark Mode] Control pops up dialogs and MessageBox window are not in Dark mode when DarkMode enabled

Open
#11,896 5 comments 3 reactions 0 assignees View on GitHub
area-DarkMode help wanted
Dominant language
C#
Stars
4.9k
Forks
1.1k
Avg merge
1d 13m
Merged PRs (30d)
85

Description

### .NET version

.NET SDK 9.0.100-rc.1.24415.1 + build private dll form winforms repo release/9.0 branch

### Did it work in .NET Framework?

No

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

This is a new feature Dark Mode: https://github.com/dotnet/winforms/pull/11857

### Issue description

Control pops up dialogs and MessageBox window are not in Dark mode when DarkMode enabled

ColorDialog:
![image](https://github.com/user-attachments/assets/77b90bc5-4c9f-4504-af0b-1c1398382339)

FontDialog:
![image](https://github.com/user-attachments/assets/5f92cbdf-3578-456c-bc4f-17f2572cd8a0)

MessageBox:
![image](https://github.com/user-attachments/assets/dd1aef30-095e-461e-a592-71984a00aeb7)

### Steps to reproduce

1. Create a WinForms .NET Core application.
2. Enable DarkMode by `Application.SetColorMode(SystemColorMode.Dark)` in program.cs file.
3. Add three button controls to the form designer.
4. Add click events to open FontDialog, ColorDialog and MessageBox for each of the three buttons.
5. Run the application.
6. Click each of the three buttons and observe the color of the new dialog.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.