Fix issue 11914: In DarkMode: Add a default color to the ProcessBar.#14339
Fix issue 11914: In DarkMode: Add a default color to the ProcessBar.#14339SimonZhao888 wants to merge 2 commits intodotnet:mainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
Updates the WinForms ProgressBar dark mode initialization to apply specific colors when Application.IsDarkModeEnabled is true, to improve default appearance under dark mode.
Changes:
- In
ProgressBar.OnCreateControl, setsBackColortoSystemColors.ControlDarkDarkandForeColortoSystemColors.Highlightwhen dark mode is enabled. - Disables visual styles for the native ProgressBar via
SetWindowThemein dark mode.
src/System.Windows.Forms/System/Windows/Forms/Controls/ProgressBar/ProgressBar.cs
Outdated
Show resolved
Hide resolved
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #14339 +/- ##
====================================================
- Coverage 77.24039% 52.28515% -24.95525%
====================================================
Files 3280 2050 -1230
Lines 645112 287049 -358063
Branches 47731 42033 -5698
====================================================
- Hits 498287 150084 -348203
+ Misses 143133 134065 -9068
+ Partials 3692 2900 -792
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
|
@SimonZhao888 The contrast between the progress bar's color and the background is insufficient, even in Classic mode; further modifications may be needed in both modes. |


Fixes #11914
Proposed changes
Customer Impact
Regression?
Risk
Screenshots
Before
After
Test methodology
Test environment(s)
Microsoft Reviewers: Open in CodeFlow