I came to the following situation:
I have 2 view models and one view that contains 2 user controls to which view models are attached. The first virtual machine is a search function that returns a list of faces, and the second virtual machine is a more detailed description of each person.
I want to do the following:
public CompositeVM { public SearchVM SearchViewModel{get;set;} public DescriptionVM DescriptionViewModel{get;set;} }
As I said, the view model also includes a list of found faces, so I wish DescriptionVM to be updated accordingly when choosing a person.
How can I achieve this type of interaction between virtual machines? Should I set the SelectedPerson property in SearchVM and pass it to DescriptionVM when the selected list item changes (quite a high connection with me)? Is there a simpler approach to this?
source share