/// <summary> /// Remove a handler for the given source's event. /// </summary> public static void RemoveHandler(DelegateCommandBase source, EventHandler handler) { if (source == null) { throw new ArgumentNullException(nameof(source)); } if (handler == null) { throw new ArgumentNullException(nameof(handler)); } CurrentManager.ProtectedRemoveHandler(source, handler); }
/// <summary> /// Stop listening to the given source for the event. /// </summary> protected override void StopListening(object source) { DelegateCommandBase typedSource = (DelegateCommandBase)source; typedSource.CanExecuteChangedInternal -= this.OnCanExecuteChangedInternal; }