- peerlessDJ
- Posts: 34
- Joined:
About ObservableCollection (Help)
In Xaml, ObservableCollection is binded on ListBox. Now, i attempt to change property(eg filename) of one item, and call OnPropertyChanged, why this item is not changed
-
sfernandez
Site Admin
- Posts: 2991
- Joined:
Re: About ObservableCollection (Help)
Hi, if I understand correctly, you are changing a property of an ExeShortcut item, so you need to notify of that property change, not that the whole collection of items changed.
To do that your item has to implement INotifyPropertyChanged interface, and then call PropertyChanged delegate on the modified item with the property "FileName".
Could you please try it and let us know if worked?
To do that your item has to implement INotifyPropertyChanged interface, and then call PropertyChanged delegate on the modified item with the property "FileName".
Could you please try it and let us know if worked?
- peerlessDJ
- Posts: 34
- Joined:
Re: About ObservableCollection (Help)
Thank you. It worksHi, if I understand correctly, you are changing a property of an ExeShortcut item, so you need to notify of that property change, not that the whole collection of items changed.
To do that your item has to implement INotifyPropertyChanged interface, and then call PropertyChanged delegate on the modified item with the property "FileName".
Could you please try it and let us know if worked?
Re: About ObservableCollection (Help)
Thanks for the feedback! Closing this
Who is online
Users browsing this forum: Bing [Bot], Google [Bot] and 14 guests