protected virtual void BindList <T>(BindableList <T> bindableList, BindableListWatcherCallback <T> listener) where T : IBindable { var watcher = new BindableListWatcher <T>(bindableList, listener); // remember the watcher so we can destroy it when the mediator is destroyed RegisteredBindableListWatchers.Add(watcher); }
public void Init() { WatchedList = new BindableList <IBindable <int> >(); Watcher = new BindableListWatcher <IBindable <int> >( WatchedList, (newItems, remainingItems, removedItems) => { AddedItemsList = newItems; RemainingItemsList = remainingItems; RemovedItemsList = removedItems; } ); AddedItemsList = new List <IBindable <int> >(); RemainingItemsList = new List <IBindable <int> >(); RemovedItemsList = new List <IBindable <int> >(); }