Class WeakEventExtensions
public static class WeakEventExtensions
- Inheritance
-
WeakEventExtensions
- Inherited Members
Methods
AddWeakPropertyChangedEventListener(INotifyPropertyChanged, EventHandler<PropertyChangedEventArgs>)
public static void AddWeakPropertyChangedEventListener(this INotifyPropertyChanged self, EventHandler<PropertyChangedEventArgs> handler)
Parameters
selfINotifyPropertyChangedhandlerEventHandler<PropertyChangedEventArgs>
Remarks
Callers must keep a reference to handler or else it will be garbage collected and the event handler will not run. The best way to do this is to provide a method from the caller as the delegate.
AddWeakValueChangedEventListener(INotifyValueChanged, EventHandler<EventArgs>)
public static void AddWeakValueChangedEventListener(this INotifyValueChanged self, EventHandler<EventArgs> handler)
Parameters
selfINotifyValueChangedhandlerEventHandler<EventArgs>
Remarks
Callers must keep a reference to handler or else it will be garbage collected and the event handler will not run. The best way to do this is to provide a method from the caller as the delegate.