Previously `PropertyChanged` was raised on the child before the parent because the inherited value change was being notified by listening to the parent `PropertyChanged` event, and this event handler was added first.
Added an `InheritablePropertyChanged` event which will be called only after all other property changed events have been raised and only for inheritable properties.
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.
Rather than adding a TakeUntil(control.StyleDetach) to each applied
style, keep track of the applied styles in a static list. This
dramatically reduces memory usage.
This is needed so that things like the following can be done:
<TreeView>
<TreeView.Styles>
<Style Selector="TreeViewItem">
<Setter Property="IsExpanded" Value="{Binding IsExpanded}"/>
</Style>
</TreeView.Styles>
<TreeView>
(At the moment we have TreeDataTemplate.IsExpanded but this isn't good
enough: it only supports setting IsExpanded on creation of the item with
no binding.)
With this commit, setters can now contain bindings, but they aren't yet
applied correctly. As part of this commit, classes related to binding
have been moved to the Perspex.Data namespace.
Most controls want to be styled based on their type, however windows
derived from Window will usually want to be styled as Window. Added an
IStyleable.StyleKey property to select the type that a control is styled
on.