BindableCollection item property should change parent property

Topics: Conventions, Framework Services
Nov 14, 2012 at 2:37 AM

ParentViewModel has an Items property of BindableCollection<ChildViewModel>. ParentViewModel.CanCancel relies on a property being set one way or another in all Items. 

The problem is, when I change that property, .CanCancel isn't notified. This could be solved by giving BindableCollection a Notify event or making the Child aware of its parent (which I would rather not do!).

Nov 14, 2012 at 7:33 AM

If I understand your scenario correctly, it is up to you to implement this logic.

The parent is responsible to monitor children PropertyChanged notifications, and notify about the CanCancel property chamged. This has nothing to do with the BindableCollection implementation.