Instead of using `Observable.ObserveOn` in bindings, interface with `Dispatcher.UIThread` to schedule binding notifications on the UI thread. This saves a significant amount of memory.
We're potentially creating a new immutable version of the opacity mask each time the `VisualNode` is updated. Need to implement comparison between mutable and immutable brushes.
Previously we were creating a new render layer for all controls with `Opacity != 1`. This was causing the `Calendar` page in ControlCatalog to render _really_ slowly. Instead, only create a new render layer when `Opacity` is being animated.
Also don't even render controls where `Opacity == 0`.
Control enter/leave events seem to sometimes get raised in the wrong order, this needs investigation. However in the meantime, make sure that if there's an existing adorner it's removed before adding a new one.
Fixes#1299
Make the `ContentPresenter.Content` property depend on `ContentPresenter.ContentTemplate` because otherwise a temporary control will be created by the presenter using the default template between the time `Content` and `ContentTemplate` is bound.
However, because Portable.Xaml doesn't actually _support_ `DependsOnAttribute` yet, also move the bindings for `ContentTemplate` above `Content` in the default themes.
This works around #1271 although #1284 fixes the underlying cause of the leak - this is more to prevent unnecessary controls being created.
`ContentPresenter` should only be manually setting its child's logical parent when it is outside of a control template. When it's inside a control template, setting the logical parent will be handled by `ContentControlMixin`.
Fixes#1271.
You can now set up serilog logging to `Debug` or `Trace` by calling e.g.:
```
AppBuilder.Configure<App()
.LogToDebug()
.UsePlatformDetect();
```
The methods accept an optional `level` parameter to control the minimum log level.