Browse Source

Unsubscribe on Stop, don't re-subscribe.

D'oh.
pull/13970/head
Steven Kirk 3 years ago
parent
commit
b6cb62e884
  1. 4
      src/Avalonia.Base/Data/Core/BindingExpression.cs

4
src/Avalonia.Base/Data/Core/BindingExpression.cs

@ -395,9 +395,9 @@ internal partial class BindingExpression : UntypedBindingExpressionBase, IDescri
var trigger = UpdateSourceTrigger;
if (trigger is UpdateSourceTrigger.PropertyChanged)
target.PropertyChanged += OnTargetPropertyChanged;
target.PropertyChanged -= OnTargetPropertyChanged;
else if (trigger is UpdateSourceTrigger.LostFocus && target is IInputElement ie)
ie.LostFocus += OnTargetLostFocus;
ie.LostFocus -= OnTargetLostFocus;
}
}

Loading…
Cancel
Save