How does the "new" ViewModelTypeResolver work?

Feb 19, 2015 at 2:15 PM
Edited Feb 19, 2015 at 2:16 PM
SORRY - WRONG P&P FORUM !!

Hi all,

In our solution we upgraded to the latest available versions (1.1 and 2.0) of StoreApps, PubSubEvents and Mvvm prism libraries.

Now we are experiencing trouble to resolve ViewModels that are located in a different assembly. Before the newest library versions we used to have this:
            ViewModelLocator.SetDefaultViewTypeToViewModelTypeResolver((viewType) =>
                {
                    var viewModelTypeName = string.Format(CultureInfo.InvariantCulture, "FutureModels.ViewModels.{0}ViewModel, FutureModels, Version=1.0.0.0, Culture=neutral, PublicKeyToken=SN_Generated_Key", viewType.Name);
                    var viewModelType = Type.GetType(viewModelTypeName);
                    return viewModelType;
                });
But that is no longer supported by the Mvvm library. We have concluded that it is not enough to simply change from ViewModelLocator to ViewModelLocationProvider. That won't bind the ViewModels and we get a black screen after the splashscreen.

How do we use the newer library and what is the correct statement to resolve ViewModels?


SORRY - WRONG P&P FORUM !!!