Summary
Subscribes to the CollectionChanged event using a weak subscription.
- Namespace
- Avalonia
.Collections - Containing Type
- Notify
Collection Changed Extensions
Syntax
public static IDisposable WeakSubscribe(this INotifyCollectionChanged collection, Action<NotifyCollectionChangedEventArgs> handler)
Parameters
Name | Type | Description |
---|---|---|
collection | I |
The collection. |
handler | Action |
An action called when the collection event is raised. |
Return Value
Type | Description |
---|---|
IDisposable | A disposable used to terminate the subscription. |