Exemple #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="EditableListView{T}"/> class.
 /// </summary>
 /// <param name="list">The collection to decorate.</param>
 /// <param name="leaveOpen">True means that <paramref name="list"/> is not disposed when this instance is diposed.</param>
 public EditableListView(IObservableCollection <T> list, bool leaveOpen)
     : base(list)
 {
     this.leaveOpen     = leaveOpen;
     this.subscriptions = new CompositeDisposable(2)
     {
         list.ObservePropertyChangedSlim()
         .Subscribe(this.OnPropertyChanged),
         list.ObserveCollectionChangedSlim(signalInitial: false)
         .Subscribe(this.OnCollectionChanged)
     };
 }