Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DataGridRowGroupHeader background and theme changes #4119

Closed
thiago-cs opened this issue Jul 20, 2021 · 4 comments · Fixed by #4138
Closed

DataGridRowGroupHeader background and theme changes #4119

thiago-cs opened this issue Jul 20, 2021 · 4 comments · Fixed by #4138
Labels
bug 🐛 An unexpected issue that highlights incorrect behavior Completed 🔥 DataGrid 🔠 Issues on DataGrid control help wanted Issues identified as good community contribution opportunities
Milestone

Comments

@thiago-cs
Copy link
Contributor

The DataGridRowGroupHeader background brush does not respond to app theme changes.
The easiest way to reproduce this is by launching the WindowsCommunityToolkit app, navigate to the DataGrid section, click the "Group by" button. Switch to Windows Settings and switch the system theme. When you go back to the WindowsCommunityToolkit app, you notice the mentioned brush has not updated.
It is not that specific app.

@ghost ghost added the needs triage 🔍 label Jul 20, 2021
@ghost
Copy link

ghost commented Jul 20, 2021

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 🙌

@thiago-cs
Copy link
Contributor Author

Actually, it is even easier to just use the theme switcher right in the app: simpler and same results.

@michael-hawker michael-hawker added bug 🐛 An unexpected issue that highlights incorrect behavior DataGrid 🔠 Issues on DataGrid control help wanted Issues identified as good community contribution opportunities and removed needs triage 🔍 labels Jul 23, 2021
@michael-hawker michael-hawker added this to the 7.1 milestone Jul 23, 2021
@michael-hawker
Copy link
Member

Thanks for the report @thiago-cs, it is useful to stick to our template though for longevity of the history of the problem.

Seems like we're probably using a StaticResource somewhere instead of a ThemeResource. I'd assume this would be in the controls resources vs. something we're doing for the sample app example specifically.

Think you want to take a stab at fixing it for the community?

FYI @anawishnoff @RBrid

@thiago-cs
Copy link
Contributor Author

Fixed and submitted PR #4138.

@ghost ghost closed this as completed in #4138 Aug 5, 2021
ghost pushed a commit that referenced this issue Aug 5, 2021
## 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](../readme.md#supported)
- [ ] Pull Request has been submitted to the documentation repository [instructions](..\contributing.md#docs). Link: <!-- docs PR link -->
- [ ] Sample in sample app has been added / updated (for bug fixes / features)
    - [ ] Icon has been created (if new sample) following the [Thumbnail Style Guide and templates](https://github.com/CommunityToolkit/WindowsCommunityToolkit-design-assets)
- [ ] New major technical changes in the toolkit have or will be added to the [Wiki](https://github.com/CommunityToolkit/WindowsCommunityToolkit/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*)
- [X] Contains **NO** breaking changes


## Other information
Tested in Windows 21H1 only.
@ghost ghost added Completed 🔥 and removed In-PR 🚀 labels Aug 5, 2021
@ghost ghost locked as resolved and limited conversation to collaborators Nov 3, 2021
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug 🐛 An unexpected issue that highlights incorrect behavior Completed 🔥 DataGrid 🔠 Issues on DataGrid control help wanted Issues identified as good community contribution opportunities
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants