Open Youssef1313 opened 1 month ago
ContentPresenter's code in WinUI actually pulls such properties from the parent, with one gotcha. If the parent is a PopupRoot, the logical parent is used. Otherwise, the visual parent is used
The assumption here isn't always true. It's possibly true for all SparseGroup DPs though. See findings in https://github.com/unoplatform/uno/pull/17766#issuecomment-2294936199
Current behavior
Currently, our implementation of DP inheritance works by matching the DP name and having the Inherits option. This doesn't match WinUI
Expected behavior
In WinUI, it either has to be the exact same DP, or otherwise, it matches against hardcoded set of DPs.
Looking more carefully at what WinUI does, there is
InheritedProperties::GetCorrespondingInheritedProperty
with the following code:It looks like ContentPresenter.Foreground may not be inheriting the Foreground from other classes? etc
How to reproduce it (as minimally and precisely as possible)
No response
Workaround
No response
Works on UWP/WinUI
None
Environment
No response
NuGet package version(s)
No response
Affected platforms
No response
IDE
No response
IDE version
No response
Relevant plugins
No response
Anything else we need to know?
No response