/// <summary> /// Raises the <see cref="Deactivated"/> event. /// </summary> /// <param name="eventArgs"> /// <see cref="DeactivationEventArgs"/> object that provides the arguments for the event. /// </param> /// <remarks> /// <strong>Notes to Inheritors:</strong> When overriding <see cref="OnDeactivated"/> in a /// derived class, be sure to call the base class's <see cref="OnDeactivated"/> method so /// that registered delegates receive the event. /// </remarks> protected virtual void OnDeactivated(DeactivationEventArgs eventArgs) { Deactivated?.Invoke(this, eventArgs); }
protected override void OnDeactivated(DeactivationEventArgs eventArgs) { (Item as IActivatable)?.OnDeactivate(eventArgs.Closed); base.OnDeactivated(eventArgs); }