diff --git a/src/Avalonia.Base/PropertyStore/ValueStore.cs b/src/Avalonia.Base/PropertyStore/ValueStore.cs index 9b80002a33..7fe0213148 100644 --- a/src/Avalonia.Base/PropertyStore/ValueStore.cs +++ b/src/Avalonia.Base/PropertyStore/ValueStore.cs @@ -313,9 +313,14 @@ namespace Avalonia.PropertyStore continue; if (values.TryGetValue(key, out var existing)) - values[key] = existing.WithNewValue(value); + { + if (existing.NewValue is null) + values[key] = existing.WithNewValue(value); + } else + { values.Add(key, new(null, value)); + } } f = f.InheritanceAncestor;