title: Should each view model be handled by a single ViewModelLocator?
body: <p>I am starting to explore the MVVM light and start to design my different viemModels. I have browsed for long time to find out what I am looking for but I could not get it :-(.</p>
  
  <p>One sample I have is based on a single MainViewModel, which is handled inside a ModelViewLocator. In most cases we will have more than one viewModel, so should all viewModels be defined in a single ViewModelLocator file or do I have to have one ViewModelLocator per view?</p>
  
  <p>In other words do I need to get this :
  MainViewModel -> MainViewModelLocator
  PictureViewModel -> PictureViewModelLocator</p>
  
  <hr>
  
  <p>Ok fine but sill one question:
  let say that I have 3 viewModels that I have create as ViewModel1, 2 and 3
  In ViewModelLocation, I have create same structure as the MainViewModel in order to create the instance of it and have create a main property to access Models instance.</p>
  
  <p>The problem I have found is that If each of my Views corresponding to each viewModels is set to is own datacontext as ViewModelLocator.ViewModelx, the view instance is create at design time and it makes me trouble if during the constructor of my view I need to call an external class which get data from a WCF service. It generate an "instance creation error".</p>
  
  <p>In an other hand if in each view I bind then NOT from ViewModelLocator.ViewModelx but instead as directly ViewModelx then I do not get that error and works better.</p>
  
  <p>So what is the properway to do and the logic path :</p>
  
  <p>1 - Does the MainViewModel should create all other viewModel's ?
  2 - Does each View must be bound to it's own MainStatic propery in ViewModelLocator ?
  3 - Does each View create their own Instance of ViewModel ?</p>
  
  <p>The way I have done is that my View which return service data from an external class during ViewModel constructor creation works only if I bind it directly to the ViewModel, does it have trouble doing it so ?</p>