Multiple ViewModels in view

Nov 17, 2011 at 5:23 PM

Hi - I have a a view that allows editing of 2 grids and therefore has 2 save, reject buttons etc. I would ideally like to use a seperate viewmodel for each grid so as to cut down on the amount of code in a single viewmodel and serviceagent.  I have seen examples where people have created a MasterViewModel which has multiple public properties that hold other view models. However, I have not had much succeess in implementing that with simplemvvm. Can anybody help? Thanks

Nov 21, 2011 at 12:58 PM

It's entirely possible to have multiple "child" ViewModels that are consumed by a "parent" ViewModel.  What problems are you having?


Nov 21, 2011 at 2:00 PM
Thanks for your reply Tony. I think I was being lazy and hoping that there was an example of how to do this - thats what happens when you are so generous with all the other documentation :)

I am not sure what I need to put into the Xaml and how the parent can then talk to the child (to give it a selected Item value for example). Also whether the child needs to go in the locator - to set it up with a service agent.

I understand that I should probably spend some more time attempting this so that I can be more specific on the help I need.


On 21 November 2011 12:58, tonysneed <> wrote:

From: tonysneed

It's entirely possible to have multiple "child" ViewModels that are consumed by a "parent" ViewModel. What problems are you having?


Read the full discussion online.

To add a post to this discussion, reply to this email (

To start a new discussion for this project, email

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe on

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at