-
[WPF] ObservableCollection and Item PropertyChangedC#/WPF 2023. 4. 20. 16:22
ObservableCollection<INotifyPropertyChanged> items = new ObservableCollection<INotifyPropertyChanged>(); items.CollectionChanged += items_CollectionChanged; static void items_CollectionChanged(object sender, NotifyCollectionChangedEventArgs e) { if (e.OldItems != null) { foreach (INotifyPropertyChanged item in e.OldItems) item.PropertyChanged -= item_PropertyChanged; } if (e.NewItems != null) { foreach (INotifyPropertyChanged item in e.NewItems) item.PropertyChanged += item_PropertyChanged; } } static void item_PropertyChanged(object sender, PropertyChangedEventArgs e) { throw new NotImplementedException(); }
https://stackoverflow.com/questions/901921/observablecollection-and-item-propertychanged
ObservableCollection and Item PropertyChanged
I've seen lots of talk about this question but maybe I'm just too much of a newbie to get it. If I have an observable collection that is a collection of "PersonNames" as in the msdn example (http: ...
stackoverflow.com
728x90'C# > WPF' 카테고리의 다른 글
[WPF] 인터넷 link (0) 2023.05.17 [WPF] initializecomponent(); 에러 (0) 2023.05.12 [WPF] MarkupExtension, IValueConverter (0) 2023.03.17 [WPF] DevExpress Xaml 변경 시 팅기는 현상 (0) 2023.03.16 [WPF] Behaviors, Service (0) 2023.03.15 댓글