Fix dark mode text visibility in Collection Editor dialogs#14129
Open
Fix dark mode text visibility in Collection Editor dialogs#14129
Conversation
Co-authored-by: SimonZhao888 <133954995+SimonZhao888@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix button text display in TabPage Collection Editor dialog
Fix dark mode text visibility in Collection Editor dialogs
Dec 10, 2025
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #14129 +/- ##
===================================================
+ Coverage 77.15337% 77.15559% +0.00222%
===================================================
Files 3279 3279
Lines 645325 645335 +10
Branches 47720 47721 +1
===================================================
+ Hits 497890 497912 +22
+ Misses 143748 143727 -21
- Partials 3687 3696 +9
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes dark mode text visibility issues in Collection Editor dialogs by changing the selected item text color from SystemColors.HighlightText to SystemColors.ControlText when dark mode is enabled, following the established pattern from CheckedListBox.
Key changes:
- Modified text color selection logic to use
SystemColors.ControlTextin dark mode for better contrast - Applied WFO5001 pragma suppression consistent with other dark mode implementations
...s.Design/src/System/ComponentModel/Design/CollectionEditor.CollectionEditorCollectionForm.cs
Outdated
Show resolved
Hide resolved
...s.Design/src/System/ComponentModel/Design/CollectionEditor.CollectionEditorCollectionForm.cs
Outdated
Show resolved
Hide resolved
LeafShi1
reviewed
Dec 15, 2025
...s.Design/src/System/ComponentModel/Design/CollectionEditor.CollectionEditorCollectionForm.cs
Outdated
Show resolved
Hide resolved
...s.Design/src/System/ComponentModel/Design/CollectionEditor.CollectionEditorCollectionForm.cs
Show resolved
Hide resolved
...s.Design/src/System/ComponentModel/Design/CollectionEditor.CollectionEditorCollectionForm.cs
Outdated
Show resolved
Hide resolved
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Proposed changes
CollectionEditor.CollectionEditorCollectionFormto useSystemColors.ControlTextin dark mode instead ofSystemColors.HighlightTextCheckedListBoxdark mode handlingCustomer Impact
#2C62B2on near-black#000C39) to compliant contrastRegression?
No
Risk
Low - single line change following established pattern, affects only dark mode rendering
Screenshots
Before
Text invisible due to poor contrast in dark mode:
After
Text visible with proper contrast (pending manual verification)
Test methodology
CheckedListBox.csimplementationTabControl+PropertyGrid, setApplication.SetColorMode(SystemColorMode.Dark), verify text visibility in Collection EditorAccessibility testing
Manual accessibility testing required post-build to verify WCAG AA contrast compliance.
Test environment(s)
Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
rcxvsblobprodcus328.vsblob.vsassets.io/home/REDACTED/work/winforms/winforms/.dotnet/dotnet /home/REDACTED/work/winforms/winforms/.dotnet/dotnet msbuild /m /nologo /clp:Summary /v:minimal /nr:true /warnaserror /p:TreatWarningsAsErrors=true /p:ContinuousIntegrationBuild=false /home/REDACTED/work/winforms/winforms/artifacts/toolset/restore.proj /t:__WriteToolsetLocation /clp:ErrorsOnly;NoSummary /p:__ToolsetLocationOutputFile=/home/REDACTED/work/winforms/winforms/artifacts/toolset/11.0.0-beta.25609.108.txt(dns block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.
Microsoft Reviewers: Open in CodeFlow