Form's forecolor overwrite DataGridView cell's forecolor
- Dominant language
- C#
- Stars
- 4.9k
- Forks
- 1.1k
- Avg merge
- 1d 13m
- Merged PRs (30d)
- 85
Description
### .NET version
.NET 9.0.100-preview.3.24165.20
### Did it work in .NET Framework?
No
### Did it work in any of the earlier releases of .NET Core or .NET 5+?
No, It also reproduce on .NET 6.0.
### Issue description
The DataGridView cell's forecolor should be fore color setting in DataGridView defaultcellstyle, not form's forecolor.
### Steps to reproduce
1. Create Winform .NET Core project.
2. Set Form's forecolor as red.
3. Add DataGridView.
4. Click Add Column… in DataGridView Tasks to add a DataGridViewTextBoxColumn.
5. Set DataGridView DefaultCellStyle's forecolor to Lime.
6. Build and run app.
7. Input text and observe test color.
https://github.com/dotnet/winforms/assets/130345015/3ed54d2f-0638-4a57-9dfc-b8fab69e78b3
Contributor guide
Assessment
This issue has not been assessed yet.