示例#1
0
 protected virtual void OnCollectionChanged(NotifyCollectionChangedAction action, List <T> items, int?index = null)
 {
     if (index.HasValue)
     {
         CollectionChanged(this, new NotifyCollectionChangedEventArgs(action, items, index.Value));
     }
     else
     {
         CollectionChanged(this, new NotifyCollectionChangedEventArgs(action, items));
     }
     OnPropertyChanged(ClrExtensions.PropertyName(() => Count));
 }
示例#2
0
 public new virtual void TrimExcess()
 {
     base.TrimExcess();
     OnPropertyChanged(ClrExtensions.PropertyName(() => Count));
 }