Skip to content
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

Merged
merged 4 commits into from
Jan 31, 2023

Conversation

robloo
Copy link
Contributor

@robloo robloo commented Jan 31, 2023

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

Breaking changes

Yes, StyledProperty instead of DirectProperty but functionality is largely only expanded for app developers.

Obsoletions / Deprecations

None

Fixed issues

Part of #9944

Includes other small fixes and updates
@avaloniaui-team
Copy link
Contributor

You can test this PR using the following package version. 11.0.999-cibuild0029297-beta. (feed url: https://pkgs.dev.azure.com/AvaloniaUI/AvaloniaUI/_packaging/avalonia-all/nuget/v3/index.json) [PRBUILDID]

@avaloniaui-team
Copy link
Contributor

You can test this PR using the following package version. 11.0.999-cibuild0029331-beta. (feed url: https://pkgs.dev.azure.com/AvaloniaUI/AvaloniaUI/_packaging/avalonia-all/nuget/v3/index.json) [PRBUILDID]

@avaloniaui-team
Copy link
Contributor

You can test this PR using the following package version. 11.0.999-cibuild0029355-beta. (feed url: https://pkgs.dev.azure.com/AvaloniaUI/AvaloniaUI/_packaging/avalonia-all/nuget/v3/index.json) [PRBUILDID]

@maxkatz6 maxkatz6 merged commit 0a11b45 into AvaloniaUI:master Jan 31, 2023
@avaloniaui-team
Copy link
Contributor

You can test this PR using the following package version. 11.0.999-cibuild0029363-beta. (feed url: https://pkgs.dev.azure.com/AvaloniaUI/AvaloniaUI/_packaging/avalonia-all/nuget/v3/index.json) [PRBUILDID]

@robloo robloo deleted the treeviewitem-styledproperty branch January 31, 2023 23:12
Copy link
Contributor

@TomEdwardsEnscape TomEdwardsEnscape left a 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.

@robloo
Copy link
Contributor Author

robloo commented Feb 2, 2023

Good point, I'll update after that PR is merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants