|
|
|
@ -26,6 +26,7 @@ namespace Avalonia.PropertyStore |
|
|
|
{ |
|
|
|
Value = value; |
|
|
|
Priority = priority; |
|
|
|
BasePriority = BindingPriority.Unset; |
|
|
|
|
|
|
|
if (property.HasCoercion && |
|
|
|
property.GetMetadata(owner.GetType()) is { } metadata && |
|
|
|
@ -40,17 +41,6 @@ namespace Avalonia.PropertyStore |
|
|
|
|
|
|
|
value = coerce(owner, value); |
|
|
|
} |
|
|
|
|
|
|
|
if (priority >= BindingPriority.LocalValue && priority < BindingPriority.Inherited) |
|
|
|
{ |
|
|
|
_baseValue = value; |
|
|
|
BasePriority = priority; |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
_baseValue = default; |
|
|
|
BasePriority = BindingPriority.Unset; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
@ -68,17 +58,6 @@ namespace Avalonia.PropertyStore |
|
|
|
SetAndRaiseCore(owner, (StyledPropertyBase<T>)value.Property, (T)value.GetValue()!, priority); |
|
|
|
} |
|
|
|
|
|
|
|
public override void SetAndRaise( |
|
|
|
ValueStore owner, |
|
|
|
IValueEntry value, |
|
|
|
BindingPriority priority, |
|
|
|
IValueEntry baseValue, |
|
|
|
BindingPriority basePriority) |
|
|
|
{ |
|
|
|
Debug.Assert(priority != BindingPriority.LocalValue); |
|
|
|
SetAndRaiseCore(owner, (StyledPropertyBase<T>)value.Property, (T)value.GetValue()!, priority, (T)baseValue!, basePriority); |
|
|
|
} |
|
|
|
|
|
|
|
public void SetLocalValueAndRaise( |
|
|
|
ValueStore owner, |
|
|
|
StyledPropertyBase<T> property, |
|
|
|
@ -165,11 +144,6 @@ namespace Avalonia.PropertyStore |
|
|
|
|
|
|
|
protected override object? GetBoxedValue() => Value; |
|
|
|
|
|
|
|
protected override object? GetBoxedBaseValue() |
|
|
|
{ |
|
|
|
return BasePriority != BindingPriority.Unset ? _baseValue : AvaloniaProperty.UnsetValue; |
|
|
|
} |
|
|
|
|
|
|
|
private void SetAndRaiseCore( |
|
|
|
ValueStore owner, |
|
|
|
StyledPropertyBase<T> property, |
|
|
|
|