-
-
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
Proxy or Calculated Property #11180
Comments
I would also add an inherited readonly properties support. Or, readonly styled properties. 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
. Support at ActualWidth and ActualHeight #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.
The text was updated successfully, but these errors were encountered: