-
Notifications
You must be signed in to change notification settings - Fork 2
loading views and view models from different assemblies #61
Comments
I believe this is similar to #45 The presenter need to use the registered View Assemblies to look up Views, just like for ViewModels. |
Could you be more specific? As I understand Views and ViewModels are registred via overriding GetViewAssemblies() and GetViewModelAssemblies(). And it is done correctly in provided source https://bitbucket.org/equo/mvvmcross_test.git. Then what is wrong? |
The method in the presenter which locates the View. |
Could you provide some example? |
Put some breakpoints in here and see what is happening https://github.com/MvvmCross/MvvmCross-Forms/blob/master/MvvmCross.Forms.Presenter.Core/MvxFormsPageLoader.cs |
The above method (from MvxFormsPageLoader class) assumes that View is in ViewModel assembly. Will it be somehow fixed? |
Yes, when someone rewrites it to get rid of that assumption. |
Would we have to create a way for the user to specify View location? |
Doing it the Mvx-Way, I guess, is to override the CreateViewsContainer method in your Setup.cs:
You can also specify your own naming convention here. |
The problem in details is described here:
http://stackoverflow.com/questions/39044800/mvvmcross-loading-views-and-view-models-from-different-assemblies
Git with source: https://bitbucket.org/equo/mvvmcross_test.git
Expected behavior
MVVMCROSS should be able to link View and ViewModel by naming convention.
Actual behavior
MVVMCROSS does not link View and ViewModel by naming convention when are in separate assemblies.
Configuration
Version: 4.4
Platform: Windows Store (other patforms not tested)
The text was updated successfully, but these errors were encountered: