i'm confused view model locator used in mvvm light. know allows data context binding of particular view static view model instance in locator class.
but why need separate locator class view model instances? pros it? else locator used besides instantiating view models , data context purposes? example, can instantiate view model in code behind , set data context of view.
i use view model locator because write views "view first" opposed "view model first" lot of people do. think "view first" makes lot more sense. not that, allows vms new'ed automatically via di assuming you've set correctly. way don't have new them manually , set datacontexts, etc.
Comments
Post a Comment