public class MyCollection<T> : IEnumerable<T> private ObservableCollection<T> currentList =+=Items_CollectionChanged;}
我希望跟踪哪些项目被添加或删除。此外,我的项目是数据库到一个UI数据在WPF。如果绑定到项而不是MyCollection,则绑定工作正常。但是,我想跟踪添加的,
<-Can't access any of the subitems of this itemvs listView.Items[i].Subitems[1] <- Here I can access the sub items我正在尝试使用foreach循环,这样我可以更容易地从ListView中删除项。
我不能从一个IEnumerable列表中移除一个元素,但是这个列表是对一个列表的引用,一个其他类的私有属性。如果我将personsCollection.Remove(theElement)放在同一个类(类管理器)中,它会完美地工作,但我需要删除元素,因为另一个类(类ManagerDelete)。class Other //Some code {