/// <inheritdoc/>
 protected override void OnActivated(ActivationEventArgs eventArgs)
 {
     Items.OfType <IActivatable>().ForEach(item => item.OnActivate());
     base.OnActivated(eventArgs);
 }
 /// <inheritdoc/>
 protected override void OnActivated(ActivationEventArgs eventArgs)
 {
     (_activeItem as IActivatable)?.OnActivate();
     base.OnActivated(eventArgs);
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Raises the <see cref="Activated"/> event.
 /// </summary>
 /// <param name="eventArgs">
 /// <see cref="ActivationEventArgs"/> object that provides the arguments for the event.
 /// </param>
 /// <remarks>
 /// <strong>Notes to Inheritors:</strong> When overriding <see cref="OnActivated"/> in a
 /// derived class, be sure to call the base class's <see cref="OnActivated"/> method so that
 /// registered delegates receive the event.
 /// </remarks>
 protected virtual void OnActivated(ActivationEventArgs eventArgs)
 {
     Activated?.Invoke(this, eventArgs);
 }