Skip to content
This repository was archived by the owner on Feb 25, 2026. It is now read-only.

Fixes DataGrid colors not updating on theme switch#4138

Merged
5 commits merged into
CommunityToolkit:mainfrom
thiago-cs:main
Aug 5, 2021
Merged

Fixes DataGrid colors not updating on theme switch#4138
5 commits merged into
CommunityToolkit:mainfrom
thiago-cs:main

Conversation

@thiago-cs

Copy link
Copy Markdown
Contributor

Fixes #4119

Fixes DataGrid colors not updating on theme switch.

PR Type

What kind of change does this PR introduce?

  • Bugfix

What is the current behavior?

Some DataGrid row group header brushes do not update upon theme switching, resulting in a state where rows are in a theme and row group headers are in the opposite theme. This behavior is undesirable.

What is the new behavior?

In this update the related brushes were moved into the ThemeDictionaries.
After these changes, the DataGrid as a whole switches from a theme to another.

PR Checklist

Please check if your PR fulfills the following requirements:

  • Tested code with current supported SDKs
  • Pull Request has been submitted to the documentation repository instructions. Link:
  • Sample in sample app has been added / updated (for bug fixes / features)
  • New major technical changes in the toolkit have or will be added to the Wiki e.g. build changes, source generators, testing infrastructure, sample creation changes, etc...
  • Tests for the changes have been added (for bug fixes / features) (if applicable)
  • Header has been added to all new source files (run build/UpdateHeaders.bat)
  • Contains NO breaking changes

Other information

Tested in Windows 21H1 only.

@ghost

ghost commented Jul 28, 2021

Copy link
Copy Markdown

Thanks thiago-cs for opening a Pull Request! The reviewers will test the PR and highlight if there is any conflict or changes required. If the PR is approved we will proceed to merge the pull request 🙌

@ghost ghost requested review from azchohfi and michael-hawker July 28, 2021 17:14
@net-foundation-cla

net-foundation-cla Bot commented Jul 28, 2021

Copy link
Copy Markdown

CLA assistant check
All CLA requirements met.

@net-foundation-cla

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.

❌ thiago-cs sign now
You have signed the CLA already but the status is still pending? Let us recheck it.

@ghost ghost requested a review from Rosuavio July 28, 2021 17:14
@ghost ghost added bug 🐛 An unexpected issue that highlights incorrect behavior DataGrid 🔠 Issues on DataGrid control labels Jul 28, 2021
Fixes AlternatingRowForeground not being applied when in Light theme.
@thiago-cs

Copy link
Copy Markdown
Contributor Author

I submitted only i commit. I am trying to submit the second commit as a second PR but they got merged... Sorry for the mess.

@michael-hawker michael-hawker added this to the 7.1 milestone Jul 29, 2021
@ghost

ghost commented Aug 5, 2021

Copy link
Copy Markdown

Hello @RosarioPulella!

Because this pull request has the auto merge :zap: label, I will be glad to assist with helping to merge this pull request once all check-in policies pass.

p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (@msftbot) and give me an instruction to get started! Learn more here.
@ghost ghost merged commit ee93385 into CommunityToolkit:main Aug 5, 2021
@ghost

ghost commented Aug 5, 2021

Copy link
Copy Markdown

Apologies, I am afraid I am encountering technical difficulties that might have hampered my ability to assist with merging this pull request. I will continue to try to assist if there are further changes to this pull request.

This pull request was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

auto merge ⚡ bug 🐛 An unexpected issue that highlights incorrect behavior DataGrid 🔠 Issues on DataGrid control

4 participants