From 9507439b8b65fcee7f16b45ab3b4fa6916c6b91f Mon Sep 17 00:00:00 2001 From: Steven Kirk Date: Sat, 18 Mar 2023 23:25:24 +0100 Subject: [PATCH] Check for SetCurrentValue when reevaluating. --- src/Avalonia.Base/PropertyStore/ValueStore.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Avalonia.Base/PropertyStore/ValueStore.cs b/src/Avalonia.Base/PropertyStore/ValueStore.cs index 53cd3ff307..81206d3065 100644 --- a/src/Avalonia.Base/PropertyStore/ValueStore.cs +++ b/src/Avalonia.Base/PropertyStore/ValueStore.cs @@ -810,10 +810,13 @@ namespace Avalonia.PropertyStore // We're interested in the value if: // - There is no current effective value, or // - The value's priority is higher than the current effective value's priority, or + // - The value's priority is equal to the current effective value's priority, but the effective + // value was set via SetCurrentValue, or // - The value is a non-animation value and its priority is higher than the current // effective value's base priority var isRelevantPriority = current is null || (priority < current.Priority && priority < current.BasePriority) || + (priority == current.Priority && current.IsOverridenCurrentValue) || (priority > BindingPriority.Animation && priority < current.BasePriority); if (foundEntry && isRelevantPriority && entry!.HasValue)