dotnet/winforms

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

Open

#11,896 创建于 2024年8月16日

在 GitHub 查看
 (4 评论) (2 反应) (0 负责人)C# (922 fork)batch import
area-DarkModehelp wanted

仓库指标

Star
 (4,100 star)
PR 合并指标
 (平均合并 14天 22小时) (30 天内合并 56 个 PR)

描述

.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

FontDialog: image

MessageBox: image

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.

贡献者指南