jjzjj

CollectionItemChanged

全部标签

c# - 观察集合中项目的 PropertyChanged

我正在尝试挂接到集合中INotifyPropertyChanged对象上的事件。我见过的这个问题的每个答案都说要按如下方式处理:voidNotifyingItems_CollectionChanged(objectsender,NotifyCollectionChangedEventArgse){if(e.NewItems!=null){foreach(INotifyPropertyChangeditemine.NewItems){item.PropertyChanged+=newPropertyChangedEventHandler(CollectionItemChanged);}}