Skip to content

Conversation

@SimonZhao888
Copy link
Member

@SimonZhao888 SimonZhao888 commented Jan 19, 2026

Fixes #14210

Root Cause

ListView is the underlaying Win32 control. When it's in dark mode, the font color is highlighted, but the background color isn't set to dark, causing the items in the ListView to not display correctly. Furthermore, we cannot modify the background color using following code PInvokeCore.SendMessage(this, PInvoke.LVM_SETBKCOLOR, (WPARAM)0, (LPARAM)BackColor).

Proposed changes

  • In Dark Mode, when the ListView control is disabled (Enabled = false), the text and background colors are set so that the items can be displayed correctly.

Customer Impact

  • The ListView can display the items correctly when it is in DarkMode and setting the Enable as false.

Regression?

  • Yes

Risk

  • Min

Screenshots

Before

image

After

image

Test methodology

  • Manually

Accessibility testing

Test environment(s)

  • .net 11.0.100-alpha.1.25618.104
Microsoft Reviewers: Open in CodeFlow

@SimonZhao888 SimonZhao888 requested a review from a team as a code owner January 19, 2026 06:57
@github-actions github-actions bot added the area-DarkMode Issues relating to Dark Mode feature label Jan 19, 2026
@codecov
Copy link

codecov bot commented Jan 19, 2026

Codecov Report

❌ Patch coverage is 0% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 77.17234%. Comparing base (ff0d8d0) to head (0de26b3).
⚠️ Report is 10 commits behind head on main.

Additional details and impacted files
@@                 Coverage Diff                 @@
##                main      #14219         +/-   ##
===================================================
+ Coverage   77.15694%   77.17234%   +0.01539%     
===================================================
  Files           3279        3279                 
  Lines         645347      645064        -283     
  Branches       47721       47723          +2     
===================================================
- Hits          497930      497811        -119     
+ Misses        143729      143560        -169     
- Partials        3688        3693          +5     
Flag Coverage Δ
Debug 77.17234% <0.00000%> (+0.01539%) ⬆️
integration 18.98921% <0.00000%> (-0.00734%) ⬇️
production 52.03647% <0.00000%> (+0.00965%) ⬆️
test 97.40560% <ø> (+0.00001%) ⬆️
unit 49.46068% <0.00000%> (-0.00505%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-DarkMode Issues relating to Dark Mode feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Dark Mode] The ListView cannot display the items when setting the Enable as false

1 participant