protected override void SetValueImpl(object target, object value) { if (_canExecuteSubscription != null) { _canExecuteSubscription.Dispose(); _canExecuteSubscription = null; } _command = value as ICommand; if (_command != null) { _canExecuteSubscription = _command.WeakSubscribe(_canExecuteEventHandler); } RefreshEnabledState(); }
protected override void SetValueImpl(object target, object value) { if (_canExecuteSubscription != null) { _canExecuteSubscription.Dispose(); _canExecuteSubscription = null; } _command = value as ICommand; if (_command != null) { _canExecuteSubscription = _command.WeakSubscribe(_canExecuteEventHandler); } RefreshEnabledState(); }
protected override void Dispose(bool isDisposing) { if (isDisposing) { var view = Control; if (view != null) { view.ValueChanged -= OnValueChanged; } if (_canExecuteSubscription != null) { _canExecuteSubscription.Dispose(); _canExecuteSubscription = null; } } base.Dispose(isDisposing); }
protected override void Dispose(bool isDisposing) { if (isDisposing) { var view = Control; if (view != null) { view.ValueChanged -= OnValueChanged; } if (_canExecuteSubscription != null) { _canExecuteSubscription.Dispose(); _canExecuteSubscription = null; } } base.Dispose(isDisposing); }
public void Include(MvxCanExecuteChangedEventSubscription subsctiption) { subsctiption = new MvxCanExecuteChangedEventSubscription(null, null); subsctiption.Dispose(); }