Browse Source

Don't call obsolete API.

refactor/bindingexpressions-in-valuestore
Steven Kirk 3 years ago
parent
commit
5ea703e48b
  1. 4
      src/Avalonia.Base/Animation/AnimatorKeyFrame.cs
  2. 2
      src/Avalonia.Base/ClassBindingManager.cs
  3. 2
      src/Avalonia.Controls/AutoCompleteBox/AutoCompleteBox.cs

4
src/Avalonia.Base/Animation/AnimatorKeyFrame.cs

@ -59,11 +59,11 @@ namespace Avalonia.Animation
if (value is IBinding binding) if (value is IBinding binding)
{ {
return this.Bind(ValueProperty, binding, targetControl); return this.Bind(ValueProperty, binding);
} }
else else
{ {
return this.Bind(ValueProperty, Observable.SingleValue(value).ToBinding(), targetControl); return this.Bind(ValueProperty, Observable.SingleValue(value).ToBinding());
} }
} }

2
src/Avalonia.Base/ClassBindingManager.cs

@ -14,7 +14,7 @@ namespace Avalonia
{ {
if (!s_RegisteredProperties.TryGetValue(className, out var prop)) if (!s_RegisteredProperties.TryGetValue(className, out var prop))
s_RegisteredProperties[className] = prop = RegisterClassProxyProperty(className); s_RegisteredProperties[className] = prop = RegisterClassProxyProperty(className);
return target.Bind(prop, source, anchor); return target.Bind(prop, source);
} }
[System.Diagnostics.CodeAnalysis.SuppressMessage("AvaloniaProperty", "AVP1001:The same AvaloniaProperty should not be registered twice", [System.Diagnostics.CodeAnalysis.SuppressMessage("AvaloniaProperty", "AVP1001:The same AvaloniaProperty should not be registered twice",

2
src/Avalonia.Controls/AutoCompleteBox/AutoCompleteBox.cs

@ -2094,7 +2094,7 @@ namespace Avalonia.Controls
{ {
_binding = value; _binding = value;
if (value is not null) if (value is not null)
AvaloniaObjectExtensions.Bind(this, ValueProperty, value); Bind(ValueProperty, value);
} }
} }

Loading…
Cancel
Save