Adds the provided listener to the provided source for the event being managed.
Assembly: WindowsBase (in WindowsBase.dll)
Call this method within your manager class AddListener methods on WeakEventManager implementations. AddListener is the suggested name for the static method you define on your manager class to enable other classes to add a listener for your weak event pattern. AddListener should take two parameters: the source where the listener is attached, and the listener instance. For your AddListener implementation, call the method on the current manager and pass the same two parameters.
adds listeners to a single internal WeakEventManager.ListenerList per source. If your manager implementation maintains more than one list of listeners for each event-source combination, do not use . Instead, your implementation should create its own WeakEventManager.ListenerList instances, AddListener should add listeners to the appropriate list, and events should be delivered to the appropriate listener list by calling the DeliverEventToList event instead of the DeliverEvent method.
Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.