Hi guys, I'm following the TodoMVVM sample on GitHub to build a properly structured MVVM Xamarin.Forms app. Right now I'm just testing it out on iOS. I'm using Xamarin.Forms.Labs 1.2.1-pre2 and Xamarin.Forms 1.3.
I'm running into an issue when I try to get the ViewFactory to create a page using an existing ViewModel. In my ViewModel constructor I have:
MessagingCenter.Subscribe<InitialPageViewModel, Prospect>(mainNav, "ProspectSelected", (sender, model) =>
{
var prospectDetailsViewModel = new ProspectDetailPageViewModel(model);
mainNav.Navigation.PushAsync(ViewFactory.CreatePage(prospectDetailsViewModel));
});
However, when I build the project I get the following error:
Error CS0411: The type arguments for method Xamarin.Forms.Labs.Mvvm.ViewFactory.CreatePage<TViewModel>(System.Action<TViewModel,Xamarin.Forms.Page>)' cannot be inferred from the usage. Try specifying the type arguments explicitly (CS0411) (MLMApp)
I've been at this for several hours and can't wrap my head around the issue here. Previously I used MessagingCenter for all my data update/saving needs, and I really want to build this app the right way using MVVM. Any help would be greatly appreciated!