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.
`ExpressionSubject` wasn't a good name as the important thing it isn't
convert an `ExpressionObserver` into an `ISubject`. The important thing
it does is insert an `IValueConverter` into the pipeline.
- Don't log an error when the target for the root ExpressionNode is
null. This is usually because the `DataContext` hasn't been set up yet
and it spewed a load of useless error messages.
- Add a Description field to `ExpressionObserver` that can be used in
the case of e.g. #control bindings to record the whole expression (with
the "#control" part) rather than just the part tracked by the
`ExpressionObserver`.
OneTime bindings were failing in BindingTest because the initial binding
error was being counted as the single value to transfer. Don't do this
with OneTime bindings - only transfer valid values.
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".
This speeds up the common path of no data validation: this way we don't
need to get the metadata unless a binding notification is received. This
means that if a binding with data validation is assigned to a property
that isn't interested then UpdateDataValidation will be called, but the
control should just ignore it.
This reverts commit 57e646583f.
For TextBox there can be 2 bindings to Text: one which is the binding to the
view model which should have data validation enabled, and another binding to
the TextPresenter in the template which should not have data validation
enabled, or it will override the view model data validation. For this we need
to be able to distinguish between the two and so bindings with data validation
enabled need to always send BindingNotifications.
Conflicts:
src/Avalonia.Base/AvaloniaObject.cs
tests/Avalonia.Markup.Xaml.UnitTests/Data/BindingTests_Validation.cs