|
|
|
@ -184,7 +184,7 @@ namespace Avalonia.PropertyStore |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
var effectiveValue = new EffectiveValue<T>(Owner, property); |
|
|
|
var effectiveValue = CreateEffectiveValue(property); |
|
|
|
AddEffectiveValue(property, effectiveValue); |
|
|
|
effectiveValue.SetAndRaise(this, result, priority); |
|
|
|
} |
|
|
|
@ -200,7 +200,7 @@ namespace Avalonia.PropertyStore |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
var effectiveValue = new EffectiveValue<T>(Owner, property); |
|
|
|
var effectiveValue = CreateEffectiveValue(property); |
|
|
|
AddEffectiveValue(property, effectiveValue); |
|
|
|
effectiveValue.SetLocalValueAndRaise(this, property, value); |
|
|
|
} |
|
|
|
@ -217,7 +217,7 @@ namespace Avalonia.PropertyStore |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
var effectiveValue = new EffectiveValue<T>(Owner, property); |
|
|
|
var effectiveValue = CreateEffectiveValue(property); |
|
|
|
AddEffectiveValue(property, effectiveValue); |
|
|
|
effectiveValue.SetCurrentValueAndRaise(this, property, value); |
|
|
|
} |
|
|
|
@ -287,6 +287,16 @@ namespace Avalonia.PropertyStore |
|
|
|
return false; |
|
|
|
} |
|
|
|
|
|
|
|
public EffectiveValue<T> CreateEffectiveValue<T>(StyledProperty<T> property) |
|
|
|
{ |
|
|
|
EffectiveValue<T>? inherited = null; |
|
|
|
|
|
|
|
if (property.Inherits && TryGetInheritedValue(property, out var v)) |
|
|
|
inherited = (EffectiveValue<T>)v; |
|
|
|
|
|
|
|
return new EffectiveValue<T>(Owner, property, inherited); |
|
|
|
} |
|
|
|
|
|
|
|
public void SetInheritanceParent(AvaloniaObject? newParent) |
|
|
|
{ |
|
|
|
var values = AvaloniaPropertyDictionaryPool<OldNewValue>.Get(); |
|
|
|
|