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.
pull/4620/head
Steven Kirk 6 years ago
parent
commit
126737fd1b
  1. 2
      src/Avalonia.Controls/Primitives/ScrollBar.cs

2
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)

Loading…
Cancel
Save