Okay, so I'm not all too good with this kind of thing. I currently have the following for configuring my view model locator in the bootstrapper.
ViewModelLocationProvider.SetDefaultViewTypeToViewModelTypeResolver(viewType =>
{
var viewName = viewType.FullName;
viewName = viewName.Replace("Views", "ViewModels");
var viewAssemblyName = viewType.GetTypeInfo().Assembly.FullName;
var viewModelName = string.Format(CultureInfo.InvariantCulture, " {0}Model, {1} ", viewName,
viewAssemblyName);
return Type.GetType(viewModelName);
});
ViewModelLocationProvider.SetDefaultViewModelFactory(type => Kernel.Get(type));
To my understanding, this searches the assembly the view is in, and binds the datacontext of any views ending in view, to the matching named viewmodel. (sorry I'm terrible at explaining these things too)
However we want to separate the modules even further. Could anyone explain to me a way we could link the view models to the views if they reside in a different project?
IE if I had the two projects
ModuleA.Views
ModuleA.ViewModels
I'd want to bind the viewmodels from one project, to the views of the other. Is this doable? And if it is, how would one do this? Any help would be appreciated.