dotnet / dotnet/winforms

[DarkMode] Button with FlatStyle.Popup does not show hover state in Dark Mode

Open
#13,882 0 comments 0 reactions 1 assignee Claimed by @LeafShi1 View on GitHub
area-DarkMode
Dominant language
C#
Stars
4.9k
Forks
1.1k
Avg merge
20h 23m
Merged PRs (30d)
103

Description

### .NET version

10.0.100-rc.2.25466.103

### Did it work in .NET Framework?

Not tested/verified

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

DarkMode is a new feature in .NET 10

### Issue description

In Windows Forms, when a Button control has its FlatStyle set to FlatStyle.Popup, it does not show any visual feedback (such as border change) when the mouse hovers over it under Dark Mode. This breaks expected UI behavior and provides no indication of interactivity.

**Dark mode:** has a problem

https://github.com/user-attachments/assets/0d9ebb44-a7cc-4a61-b185-54ebab1dd536

**Classic mode:** work well

https://github.com/user-attachments/assets/22ecd343-4602-4aa4-b07f-3a4b6360b686

### Steps to reproduce

1. Create a new Windows Forms application
2. Add a Button control to the form
3. Set button1.FlatStyle = FlatStyle.Popup
4. Set app under Dark mode in program.cs file:
`Application.SetColorMode(SystemColorMode.Dark);`
5. Run the application
6. Hover the mouse over the button to observe

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.