Beispiel #1
0
 /// <summary>
 /// 设置指定的元素.
 /// </summary>
 /// <param name="index"></param>
 /// <param name="item"></param>
 protected override void SetItem(int index, KeyedValue <T> item)
 {
     this.CheckReentrancy();
     base.SetItem(index, item);
     this.OnCollectionChanged(new NotifyCollectionChangedEventArgs(
                                  NotifyCollectionChangedAction.Replace, item, index));
     this.OnPropertyChanged("Count");
     this.OnPropertyChanged("Item[]");
 }
Beispiel #2
0
 /// <summary>
 /// 获取元素对应的键.
 /// </summary>
 /// <param name="item"></param>
 /// <returns></returns>
 protected override string GetKeyForItem(KeyedValue <T> item)
 {
     return(item.Key);
 }