Open robloo opened 1 year ago
I would also add an inherited readonly properties support. Or, readonly styled properties. Use case - ActualThemeVariant, which right now implemented as an inherited property, and technically can be changed by the user (using SetValue directly).
It alternatively can be a computed property as well. But it would require adding some inheritance functionality to the same.
I would support the first idea, but against WPF compatibility consideration. There should be less ambiguity in API design.
@rabbitism, The WPF compatibility considerations were an example. There may be other use cases for this concept.
That said, avoiding ambiguity and duplication is important so I see your point there.
In general, I agree with @rabbitism and right now WPF compatibility is less important when we have XPF for project that need highest level of compatibility.
Adding Visibility and ActualHeight/Width make less sense now. Possibly as attached proxy properties from a special compatibility project, but this would be quite tricky to do I suppose.
I remembered the other reason for proxy properties that was discussed in the past. It allows us to fix API mistakes while keeping compatibility. Currently it is very difficult to rename a Styled/DirectProperty. With such a mechanism we can rename a property then keep an old, obsolete proxy/alias property (with the original name/type) around for compatibility until the next major version.
Is your feature request related to a problem? Please describe.
Shortcoming have been discovered in the property system related to dependent properties and properties calculated from others. These same deficiencies existed in WPF so this is nothing new. However, there is an opportunity to solve this better in the future.
Describe the solution you'd like
SelectedItem
andSelectedIndex
, if styled properties, have some synchronization issues.Visibility
property could be an alias ofIsVisible
.ActualHeight
andActualWidth
property could be an alias ofBounds
. #11325Describe alternatives you've considered
None, these are issues that haven't been solved in WPF or WinUI and weren't fully solved with DirectProperty either.
Additional context Add any other context or screenshots about the feature request here.