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
AlternatingRowForeground is not applied when in Light theme.
Is this bug a regression in the toolkit? If so, what toolkit version did you last see it work:
Steps to Reproduce
Can this be reproduced in the Sample App?
Steps to reproduce the behavior:
Open the Sample App.
Go to DataGrid.
Switch to Light Theme.
See error: the gray AlternatingRowForeground is not applied.
Change the AlternatingRowForeground to any color (e.g. Red).
See error: the AlternatingRowForeground is still not applied.
Switch to Dark theme
See success: no two consecutive rows are the same color.
Expected behavior
no two consecutive rows having the same foreground color.
Screenshots
No need.
Environment
NuGet Package(s):
Package Version(s):
Windows 10 Build Number:
- [ ] Fall Creators Update (16299)
- [ ] April 2018 Update (17134)
- [ ] October 2018 Update (17763)
- [ ] May 2019 Update (18362)
- [ ] May 2020 Update (19041)
- [X] 21H1 (19043)
App min and target version:
- [ ] Fall Creators Update (16299)
- [ ] April 2018 Update (17134)
- [ ] October 2018 Update (17763)
- [X] May 2019 Update (18362)
- [ ] May 2020 Update (19041)
- [ ] Insider Build (xxxxx)
Device form factor:
- [X] Desktop
- [ ] Xbox
- [ ] Surface Hub
- [ ] IoT
Visual Studio
- [ ] 2017 (version: )
- [X] 2019 (version: 16.10.4)
- [ ] 2019 Preview (version: )
Additional context
The AlternatingRowForeground is not applied when in Light theme because the default value for the dependency property DataGridRow.Foreground is #FFFFFFFF but the foreground brush itself under Light Theme is not. That causes the LOC # 1129 (see below) to always evaluate to false under Light Theme, which in turn leads to the AlternatingRowForeground brush to be ignored every time.
[1129] if (this.Foreground.Equals(defaultForeground))
The text was updated successfully, but these errors were encountered:
Hello thiago-cs, thank you for opening an issue with us!
I have automatically added a "needs triage" label to help get things started. Our team will analyze and investigate the issue, and escalate it to the relevant team if possible. Other community members may also look into the issue and provide feedback 🙌
Describe the bug
AlternatingRowForeground is not applied when in Light theme.
Steps to Reproduce
Steps to reproduce the behavior:
Expected behavior
no two consecutive rows having the same foreground color.
Screenshots
No need.
Environment
Additional context
The AlternatingRowForeground is not applied when in Light theme because the default value for the dependency property DataGridRow.Foreground is #FFFFFFFF but the foreground brush itself under Light Theme is not. That causes the LOC # 1129 (see below) to always evaluate to false under Light Theme, which in turn leads to the AlternatingRowForeground brush to be ignored every time.
[1129] if (this.Foreground.Equals(defaultForeground))
The text was updated successfully, but these errors were encountered: