Browse Source

Update ScrollBar visibility with local value priority.

Using `SetValue` with `Style` priority caused a new entry to be added to the `IsVisible` priority store each time the value was updated, causing a leak. Setting it with local value priority subtly changes its semantics but hopefully not so that anyone notices.
Steven Kirk 5 years ago
parent
commit
126737fd1b
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/Avalonia.Controls/Primitives/ScrollBar.cs

+ 1 - 1
src/Avalonia.Controls/Primitives/ScrollBar.cs

@@ -141,7 +141,7 @@ namespace Avalonia.Controls.Primitives
                 _ => throw new InvalidOperationException("Invalid value for ScrollBar.Visibility.")
             };
 
-            SetValue(IsVisibleProperty, isVisible, BindingPriority.Style);
+            SetValue(IsVisibleProperty, isVisible);
         }
 
         protected override void OnKeyDown(KeyEventArgs e)