c# - When and where to use NotifyPropertyChanged -
could explain use of notify property changed , in cases should using it?
for example: have in silverlight application domain data source loads data , event loadeddata set lists (list) content of entities domain context , bind lists girds.
do need use notyfipropertychanged on lists?
thanks,
i think getting concepts confused here...
there 2 relevant notification interfaces use xaml binding technologies.
inotifycollectionchanged
- notifies listeners when collection of items changes (as in add/remove/replace/reorder actions).
inotifypropertychanged
- notifies listeners content of object has changed (as in values have been set , , other properties have changed).
in case, if want notify contents of list
have changed, need use inotifycollectionchanged
enabled collection (i.e. not list
- typically observablecollection
).
if wanted notify item within list
has changed object type contained in list
should implement inotifypropertychanged
.
Comments
Post a Comment