WeakEventHandlerManager.

Subscribe<TTarget, TEventArgs, TSubscriber>(TTarget, string, EventHandler<TEventArgs>) Method

Summary

Subscribes to an event on an object using a weak subscription.
Namespace
Avalonia.Utilities
Containing Type
WeakEventHandlerManager

Syntax

public static void Subscribe<TTarget, TEventArgs, TSubscriber>(TTarget target, string eventName, EventHandler<TEventArgs> subscriber) 
    where TEventArgs : EventArgs where TSubscriber : class

Type Parameters

Name Description
TTarget The type of the target.
TEventArgs The type of the event arguments.
TSubscriber The type of the subscriber.

Parameters

Name Type Description
target TTarget The event source.
eventName string The name of the event.
subscriber EventHandler<TEventArgs> The subscriber.

Return Value

Type Description
void