-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Ensure templated parent control theme is applied #10273
Conversation
While fixing this I also found a possible bug, related to the following overrides: Avalonia/src/Avalonia.Controls/Primitives/TemplatedControl.cs Lines 399 to 429 in 4a4d713
It makes sense to override However, for |
@jp2masa is it possible to add some tests, so it won't be regressed? |
b8a987e
to
04df472
Compare
You can test this PR using the following package version. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, this dropped off my radar - LGTM, thanks @jp2masa !
Yes, that's correct I think. I also notice we have no test coverage covering the |
You can test this PR using the following package version. |
Opened #10471 with a test and fix. |
What does the pull request do?
Ensure templated parent control theme is applied.
What is the current behavior?
When templated parent control theme changes, styles are not applied, this affects Expander on Simple Theme (#10226).
What is the updated/expected behavior with this PR?
Styles are correctly applied.
How was the solution implemented (if it's not obvious)?
Override
OnTemplatedParentControlThemeChanged
on Layoutable and callInvalidateMeasure
, like it's already being done forOnControlThemeChanged
. Add missing!_templatedParentThemeApplied
toApplyStyling
.Checklist
Fixed issues
Fixes #10226