There are still a few bugs around scrollbar behavior, and maybe Grid. To
see them, add a long item in the middle of VirtualizationTest's items,
resize the window to require a scrollbar and scroll up and down.
In Release build in main Avalonia assemblies (couldn't do it in
Avalonia.Markup.Xaml due to warnings in OmniXaml). To do this, fixed a
number of warnings.
Instead of `ContentPresenter`. This fixes a memory leak whereby
`DropDown` wasn't correctly parenting the `Rectangle` created for
`SelectionBoxItem` when the selected item is a control. Fixes#706.
After items are added or removed then the virtualizing panel must be
remeasured. It's usually not remeasured if the available size is the
same as on the last measure as that causes an infinite loop; this adds a
`ForceInvalidateMeasure` to `IVirtualizingPanel` which will force a
remeasure even if the available size hasn't changed. Also adds tests for
the behavior.
If a TextBox is e.g. bound to an int and the user types "02" then the
TextBox text should be "02" - not the value that comes back from the
binding which will be "2".
@donandren correctly identified a problem with the `ItemsPresenter` but
he put the tests in the `ListBox` tests. Moved them to the correct
place. Also tweak formatting in `ItemContainerGenerator.InsertSpace`.
When a virtualized list was scrolled to the bottom and then the list was
measured with a size larger than needed to fit all items (in this case
we use infinity) then the virtualizer tries to go backwards to add items
at the top of the currently visible items by setting `step = -1`;
however it didn't check whether the current index was < 0.
Fixes#589.
Don't add virtualized items before the virtualizing panel is attached to
the visual tree, as bindings etc won't be set and so measurement will
produce 0,0 causing all items to be materialized.