I've used MVVM before, but MVVM-Light confuses the hell out of me, so I'm sorry if this is dumb (it's just that there's barely any documentation).
Anyways, I've learnt that you use the ViewModelLocator only for "singleton" views from Laurent's answer here.
So how do I handle view-models that aren't in the locator? because it seems like I'm losing the benefits MVVM-Light has there.
What I do now is go to the view's code-behind and create a dependency property for my view-model and set my data-context to it.
Is there a better way? because I get no blendability whatsoever (Visual Studio and ReSharper doesn't even recognize the data context in the XAML editor). Not to mention I have no dummy data to design against.
In other words:
From what I've seen the blendability comes from a dependency injection found the locator, so what do you do when you're not using the locator?
ServiceLocator. You're not tied into having to use the VMLocator for just singleton's that way. - Vivhow could I bind a view-model instance to the view (that's not in the locator)not sure if I follow this right, but you could just setDataContext = new MyDummyVM();in the View's code-behind constructor or if you want it to be for design time alone, with MVVM light you could doif (ViewModelBase.IsInDesignModeStatic) DataContext = new MyDummyVM();- Viv