简体   繁体   中英

Binding a property in a object list which is in-turn a property of another list from View to ViewModel

I have a property (text box) which is a part of a list. And that list is a property in another list (class). Now when I write something in that text box , the ancestor one should get updated. I have tried RaisePropertyChanged() but its not working out. Can anyone provide me with right syntax??

When binding lists you should take a look at INotifyCollectionChanged . RaisePropertyChanged propagates that the list itself (not just one item in it) changed. If bound to a GUI the GUI will check for a change and sees the same old list in place, so it takes no further action.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM