Table of Contents

Class WeakEventExtensions

Namespace
The.WPF.Shell
Assembly
Instagile.WPF.dll
public static class WeakEventExtensions
Inheritance
WeakEventExtensions
Inherited Members

Methods

AddWeakPropertyChangedEventListener(INotifyPropertyChanged, EventHandler<PropertyChangedEventArgs>)

public static void AddWeakPropertyChangedEventListener(this INotifyPropertyChanged self, EventHandler<PropertyChangedEventArgs> handler)

Parameters

self INotifyPropertyChanged
handler EventHandler<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

self INotifyValueChanged
handler EventHandler<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.