You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Dark Mode] Some rows/columns and ColumnHeader/RowHeader in the DataGridView control have incorrect colors #11893
@Philip-Wang01
Temporary solution is set "FlatStyle" to "FlatStyle.Flat"
I notice that Any normal Button has property FlatStyle set to "FlatStyle.Standard" or has "UseVisualStyleBackColor" set to "true"
will use light Color Mode
So any drawing related to Visual style will be in Light Mode like (ButtonRenderer , VisualStyleRenderer, UseVisualStyleBackColor, FlatStyle.Standard)
The WinForms team has no intention of supporting Dark Mode Visual style in .NET SDK 9 according to @KlausLoeffelmann statements here he say it will be completed in .NET SDK 10.
The WinForms team has no intention of supporting Dark Mode Visual style in .NET SDK 9 .
Well, to be fair, we had every intention possible. And we all know of course, that the VisualStylesMode features, although technically a separate feature, is very closely related to the dark mode in a lot of areas - this just being one of them. But at one point we/I also need to accept, that Visual Styles might have introduced incompatibilities, where we cannot with good conscience accept something that we passionately want to let jeopardize the stability of the system. We're not saying that that would have happened. But we were "just" not sufficiently sure. And even this being an Experimental feature doesn't mean, it does not need to meet a min bar for stability and safety AND we are sure about that it has all that. Did it have it? Yeah, very likely. Were we 100% sure? No. That's why it was the right decision to slip it into 10. And we always knew, with the existing workload, that this could happen, and we reserved the right to slip it even up to the very end: We aimed and work hard for making it happen as an Experimental feature with the primary goal to collect feedback - NOT to use it in production until the very last minute. We could have made that call in May and say, no, it's too close, other work items with higher priority just made it necessary to postpone. And we definitely WOULD have made that call earlier, had that feature not been conceptualized as an experimental feature to begin with.
Activity
memoarfaa commentedon Aug 16, 2024
@Philip-Wang01
Temporary solution is set "FlatStyle" to "FlatStyle.Flat"
I notice that Any normal Button has property FlatStyle set to "FlatStyle.Standard" or has "UseVisualStyleBackColor" set to "true"
will use light Color Mode
So any drawing related to Visual style will be in Light Mode like (ButtonRenderer , VisualStyleRenderer, UseVisualStyleBackColor, FlatStyle.Standard)
The WinForms team has no intention of supporting Dark Mode Visual style in .NET SDK 9 according to @KlausLoeffelmann statements here he say it will be completed in .NET SDK 10.
#10985 (comment)
You can see the difference between Buttons in this images on use Light ButtonRenderer and another use Dark ButtonRenderer
Light Mode ButtonRenderer
Dark Mode ButtonRenderer
KlausLoeffelmann commentedon Aug 17, 2024
Well, to be fair, we had every intention possible. And we all know of course, that the
VisualStylesModefeatures, although technically a separate feature, is very closely related to the dark mode in a lot of areas - this just being one of them. But at one point we/I also need to accept, that Visual Styles might have introduced incompatibilities, where we cannot with good conscience accept something that we passionately want to let jeopardize the stability of the system. We're not saying that that would have happened. But we were "just" not sufficiently sure. And even this being an Experimental feature doesn't mean, it does not need to meet a min bar for stability and safety AND we are sure about that it has all that. Did it have it? Yeah, very likely. Were we 100% sure? No. That's why it was the right decision to slip it into 10. And we always knew, with the existing workload, that this could happen, and we reserved the right to slip it even up to the very end: We aimed and work hard for making it happen as an Experimental feature with the primary goal to collect feedback - NOT to use it in production until the very last minute. We could have made that call in May and say, no, it's too close, other work items with higher priority just made it necessary to postpone. And we definitely WOULD have made that call earlier, had that feature not been conceptualized as an experimental feature to begin with.So, Dark Mode made it, Visual Styles did not.
It was the right call. @JeremyKuhne, @merriemcgaw.
jdarwood007 commentedon Jan 14, 2025
A workaround seems to be to set
EnableHeadersVisualStyleson the DataGridView to false.set EnableHeadersVisualStyles = False for all DataGridView elements b…
set EnableHeadersVisualStyles = False for all DataGridView elements b…
set EnableHeadersVisualStyles = False for DataGridView in AnalyisResu…
feat(12-03): ThemeApplier — DataGridView + txtHotkey palette helpers