-
-
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
Refactor RangeBase
to use StyledProperty
#10803
Refactor RangeBase
to use StyledProperty
#10803
Conversation
Will look at fixing #10684 now. |
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.
Just some comments on looking through the code so far. I think we need to decide just how far we want to take this for 11.0... ScrollViewer
in particular is really in need of a general overhaul but I'm not sure that can be done before 12.0.
Default value coercion should be fixed in #10822. |
I think most controls should be looked at (I keep the list updated in #9944) but some are clearly special cases that should be handled later. I'm personally not a fan of converting all properties whether they make sense or not. ScrollViewer is a special case. Upstream WinUI is completely redoing this control for a number of reasons. Avalonia should likely follow that API after its implemented and tested. I think there are even things done there to fix some of the ItemsRepeater edge cases that never worked. The new specs are here: microsoft/microsoft-ui-xaml#7245. No idea if it will be completed but if so, I think it would be a candidate for Avalonia 12. |
Normalised ScrollViewer internal properties and bindings
Added missing binding of IsScrollInertiaEnabled in the simple theme
c833baf
to
a4f4661
Compare
Fixes offset resetting when switching between tabs
a4f4661
to
87e2ed8
Compare
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. |
Sorry, I thought I'd already approved this but appears not. LGTM, lets get this into master to see if it breaks anything ;) |
You can test this PR using the following package version. |
Already fixed the first bug with #10929. Should have spotted it in this PR! |
Since #10803, the `ScrollContentPresenter.Content` binding is managed internally, not via a binding in the template.
What does the pull request do?
This PR changes direct properties within
RangeBase
to styled properties, as part of #9944.How was the solution implemented (if it's not obvious)?
ScrollViewer
has been switched from a model in which the viewer provides template components with esoteric properties (many with "backdoor" property setters), to a model in which the template components automatically subscribe to the standard viewer properties and derive their own values. This eliminates backdoor property setters, reduces API surface area, and simplifies templates and tests.Breaking changes
ScrollViewer
templates will need to have various bindings removed, so that theScrollBar
andScrollTemplatePresenter
can generate their own.StyledProperty
.Obsoletions / Deprecations
None