-
-
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
Switch TreeViewItem.IsExpanded to a StyledProperty #10137
Switch TreeViewItem.IsExpanded to a StyledProperty #10137
Conversation
Includes other small fixes and updates
You can test this PR using the following package version. |
You can test this PR using the following package version. |
You can test this PR using the following package version. |
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.
Things are a bit broken here because the control calls SetValue
(via IsExpanded
) in several places. This sets a value with local priority, which overrides any value that was applied by a style/template/etc.
This cannot be fixed until #9985 is complete.
Good point, I'll update after that PR is merged. |
What does the pull request do?
Switches the TreeViewItem.IsExpanded property to a StyledProperty. This follows the Expander control changes.
What is the current behavior?
IsExpanded is a DirectProperty and cannot be styled (see discussion #9719) cc @cristinathoughtpennies
What is the updated/expected behavior with this PR?
IsExpanded is now a full StyledProperty and usable in the styling system.
How was the solution implemented (if it's not obvious)?
See code.
Checklist
[ ] Added unit tests (if possible)?[ ] Added XML documentation to any related classes?[ ] Consider submitting a PR to https://github.com/AvaloniaUI/Documentation with user documentationBreaking changes
Yes, StyledProperty instead of DirectProperty but functionality is largely only expanded for app developers.
Obsoletions / Deprecations
None
Fixed issues
Part of #9944