To do this needed to change behavior a little in that now binding errors update the target. Previously in the case of a binding error at the first node in the binding chain, we were converting the `BindingNotification` to `UnsetValue` which had the effect of updating the target value. Now we're passing the `BindingNotification` back, we need to make sure this happens. I believe this is the right thing to do as the behavior should be the same no matter where in the binding chain the error occurs. Data validation errors continue to not update the target.
1. Fixed some tests to expect `BindingNotification`s to be returned on a broken binding chain.
2. Changed logging of `BindingNotification`s - log at `Warning` level (instead of `Error`) except when the binding chain is broken at the root, in which case log at `Information` level. Do this to prevent flooding the output window when initializing.
Lots of `Avalonia.Markup.UnitTests` were failing intermittently. This is because in release mode, in a method like this:
```
[Fact]
public void SetValue_Should_Return_False_For_Missing_Object()
{
var data = new Class1();
var target = new ExpressionObserver(data, "Next.Bar");
using (target.Subscribe(_ => { }))
{
Assert.False(target.SetValue("baz"));
}
}
```
`data` can get GC'ed at any point after creating target. Added `GC.KeepAlive()` calls to prevent this.
Fixes#1035Fixes#1036Fixes#1037
Use `CurrentCulture` instead of `CurrentUICulture` in converters etc. `CurrentUICulture` should be used for translations, `CurrentCulture` should be used for things like numbers, dates etc.
It's a bad idea - if you put say a `3` into a `BindingNotification`, that `int` will get boxed and then put into a `WeakReference`, which means that the `3` can get GC'd. That's not a desireable behavior!
Controls not attached to the visual tree should not notify the `LayoutManager` that they have had their layout invalidated. Similarly when added to the visual tree their parents and themselves should have their layout invalidated.