I'm writing a Silverlight app using the MVVM pattern. I have a main view (UserList.xaml) and corresponding vm (UserListViewModel.cs). This is used to list a collection of users. I also have a UserControl (User.xaml - invoked as a modal dialog) that is used to add details for a new user. This also has a viewmodel of it's own (UserViewModel.cs).
My questions is how do you pass information (a user object) from the child viewmodel back up to the parent once the child view is dismissed? I need to update the collection in the parent viewmodel when I do a save on the child viewmodel. Should be simple enough but the parent viewmodel has no idea when the child is dismissed. Even if the UserViewModel.User property is changed and it's PropertyChanged event is raised, UserListViewModel is not aware of it.
Any help here is greatly appreciated. I've read everything about mvvm in Silverlight that I can find but there are still some gaps. I hope I've outlined my issue clearly.