The API for `ScrollChangedEventArgs` is different to WPF's here, because:
- Avalonia's `ScrollViewer` exposes `Extent`, `Offset` and `Viewport` as `Size`/`Vector` structs whereas WPF exposes separate `double` values for the X and Y components for each of these
- The current values are not included in the event args: then can easily be read from the `sender`
- UWP doesn't expose these values at all
For non-logical scrolling:
- Use 16 for small scroll size (value taken from WPF)
- Use viewport size for large scroll
For logical scrolling, use the `ScrollSize`/`PageScrollSize` defined on `ILogicalScrollable`. Note that this required a small breaking change to `ILogicalScrollable`.
Fixed#3245
...during ApplyTemplate. This was so that ItemsControls could their find
ItemsPresenters nested in other templated controls. Instead use
IItemsPresenterHost to make the presenter register itself with its
TemplatedParent.
Usually controls are only registered with their name scope when they get
added to a rooted visual tree, but this causes problems for tests, and
would mean the templated control wouldn't work if the client called
ApplyTemplate themselves before the control is added to the visual tree.
Work around this by explicitly registering template controls with the
name scope when the template is applied.
To allow this, we need to allow controls to be registered with a name
scope multiple times.
Some tests still failing as controls are only registered with name scope
when attached to a rooted visual tree. Need to work around this by
explicitly registering controls when applying template.
Currently works so far as to scroll an image in the Images tab of the
test app. Hiding the scrollbars is currently disabled as it requires a
layout pass to be triggered during a layout pass. Need to work out a
way around that...