-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Description
-
.NET Core Version:
.Net SDK 6.0.100-alpha.1.20421.6 -
Have you experienced this same bug with .NET Framework?:
No -
More info:
This is a regression issue, it cannot reproduce on .Net SDK 5.0.100-preview.8.20417.9
Problem description:
The BackColor of Button doesn't work when Button's FlatStyle is Flat or Popup .
The MouseOverBackColor of Button doesn't work when Button's FlatStyle is Flat.

Expected behavior:
After run the project, the Button's BackColor should be YellowGreen;
When mouse over on the button, Button's BackColor should be Firebrick.

Minimal repro: DemoApp.zip
- Create a new winforms .NET core project and target to .NET 5.0.
- Add a Button to the form designer.
- Add the following code to the structure method of Form1.
button1.FlatStyle = FlatStyle.Flat;
button1.BackColor = Color.YellowGreen;
button1.FlatAppearance.MouseOverBackColor = Color.Firebrick; - Build and run the project.
- Observe the BackColor of Button, then mouse over on the button and observe the BackColor of Button.
Metadata
Metadata
Assignees
Labels
No labels