diff --git a/src/Avalonia.Base/AvaloniaObject.cs b/src/Avalonia.Base/AvaloniaObject.cs
index 761c0618da..9fd2acbe5f 100644
--- a/src/Avalonia.Base/AvaloniaObject.cs
+++ b/src/Avalonia.Base/AvaloniaObject.cs
@@ -22,7 +22,7 @@ namespace Avalonia
///
/// This class is analogous to DependencyObject in WPF.
///
- public class AvaloniaObject : IAvaloniaObject, IAvaloniaObjectDebug, INotifyPropertyChanged, IPriorityValueOwner
+ public class AvaloniaObject : IAvaloniaObject, IAvaloniaObjectDebug, INotifyPropertyChanged
{
///
/// The parent object that inherited values are inherited from.
@@ -414,9 +414,8 @@ namespace Avalonia
VerifyAccess();
_values?.Revalidate(property);
}
-
- ///
- void IPriorityValueOwner.Changed(AvaloniaProperty property, int priority, object oldValue, object newValue)
+
+ internal void PriorityValueChanged(AvaloniaProperty property, int priority, object oldValue, object newValue)
{
oldValue = (oldValue == AvaloniaProperty.UnsetValue) ?
GetDefaultValue(property) :
@@ -439,9 +438,8 @@ namespace Avalonia
(BindingPriority)priority);
}
}
-
- ///
- void IPriorityValueOwner.BindingNotificationReceived(AvaloniaProperty property, BindingNotification notification)
+
+ internal void BindingNotificationReceived(AvaloniaProperty property, BindingNotification notification)
{
UpdateDataValidation(property, notification);
}
@@ -566,15 +564,15 @@ namespace Avalonia
T value)
{
Contract.Requires(setterCallback != null);
- return DirectPropertyDeferredSetter.SetAndNotify(
+ return _values.Setter.SetAndNotify(
property,
ref field,
- (object val, ref T backing, Action notify) =>
+ ((object value, int) update, ref T backing, Action notify) =>
{
- setterCallback((T)val, ref backing, notify);
+ setterCallback((T)update.value, ref backing, notify);
return true;
},
- value);
+ (value, 0));
}
///
diff --git a/src/Avalonia.Base/IPriorityValueOwner.cs b/src/Avalonia.Base/IPriorityValueOwner.cs
index 5f63f6ef91..3a931d6b35 100644
--- a/src/Avalonia.Base/IPriorityValueOwner.cs
+++ b/src/Avalonia.Base/IPriorityValueOwner.cs
@@ -2,6 +2,7 @@
// Licensed under the MIT license. See licence.md file in the project root for full license information.
using Avalonia.Data;
+using Avalonia.Utilities;
namespace Avalonia
{
@@ -31,5 +32,7 @@ namespace Avalonia
/// Ensures that the current thread is the UI thread.
///
void VerifyAccess();
+
+ DeferredSetter Setter { get; }
}
}
diff --git a/src/Avalonia.Base/PriorityValue.cs b/src/Avalonia.Base/PriorityValue.cs
index c474f9098e..bc09a41e5f 100644
--- a/src/Avalonia.Base/PriorityValue.cs
+++ b/src/Avalonia.Base/PriorityValue.cs
@@ -21,7 +21,7 @@ namespace Avalonia
/// priority binding that doesn't return . Where there
/// are multiple bindings registered with the same priority, the most recently added binding
/// has a higher priority. Each time the value changes, the
- /// method on the
+ /// method on the
/// owner object is fired with the old and new values.
///
internal class PriorityValue
@@ -30,7 +30,6 @@ namespace Avalonia
private readonly SingleOrDictionary _levels = new SingleOrDictionary();
private readonly Func