Revert "Fix ApplyToDerivedTypes not working for implicit styles (#9648)"#33397
Revert "Fix ApplyToDerivedTypes not working for implicit styles (#9648)"#33397
Conversation
…yles Co-authored-by: PureWeen <5375137+PureWeen@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
This PR reverts the changes from PR #32711, which implemented style merging for implicit styles with ApplyToDerivedTypes=true across inheritance hierarchies. The revert restores the original behavior where only the most specific applicable implicit style is applied (early return on first match), rather than merging multiple styles from the type hierarchy.
Key Changes
MergedStyle.cs: Restored originalOnImplicitStyleChanged()logic with early return behavior instead of complex style merging- Test deletion: Removed
Maui9648.xamlandMaui9648.xaml.cstest files specific to the reverted feature - Benchmark deletion: Removed
ImplicitStylesBenchmark.csperformance benchmarks
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
src/Controls/src/Core/MergedStyle.cs |
Reverted OnImplicitStyleChanged() to original implementation: returns on first applicable implicit style instead of collecting and merging multiple styles |
src/Controls/tests/Xaml.UnitTests/Issues/Maui9648.xaml |
Deleted test XAML demonstrating multi-level implicit style merging |
src/Controls/tests/Xaml.UnitTests/Issues/Maui9648.xaml.cs |
Deleted test code validating ApplyToDerivedTypes behavior with merged styles |
src/Controls/tests/Xaml.Benchmarks/ImplicitStylesBenchmark.cs |
Deleted performance benchmarks for implicit style merging scenarios |
Co-authored-by: PureWeen <5375137+PureWeen@users.noreply.github.com>
Co-authored-by: PureWeen <5375137+PureWeen@users.noreply.github.com>
Added tests from PR #33218 in commit 09cb402. Test Results:
Summary: 6/12 tests pass. The basic |
|
@copilot alright keep the tests that are passing and remove the ones that are failing |
Co-authored-by: PureWeen <5375137+PureWeen@users.noreply.github.com>
Co-authored-by: PureWeen <5375137+PureWeen@users.noreply.github.com>
|
/azp run maui-pr-devicetests |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
/backport to release/10.0.1xx-sr2 |
|
Started backporting to |
|
/azp run maui-pr-uitests |
|
Azure Pipelines successfully started running 1 pipeline(s). |
MergedStyle.csto original state (restore simpleOnImplicitStyleChanged()method)Maui9648.xamlMaui9648.xaml.csImplicitStylesBenchmark.csDescription of Change
Reverts the changes from #32711 which modified how implicit styles with
ApplyToDerivedTypes=trueare applied.The original behavior returns early with the first applicable implicit style instead of merging multiple styles from the type hierarchy.
Issues Fixed
Fixes #33203
Test Results
Maui33203 Tests (6/6 PASS):
ImplicitStyleWithBasedOnKeyedStyleWorks- All 3 inflators PASSED ✅DerivedImplicitStyleOverridesBaseStyle- All 3 inflators PASSED ✅Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.