There is one thing missing from the FreshMVVM quick start that I felt should blog about. You need to put everything in a fresh navigation container if you want the pages and page models to resolve and of course be able to navigate.
http://www.michaelridland.com/xamarin/freshmvvm-quick-start-guide/
In the app class this is how you need to set MainPage to an instance to show the first page.
public App()
{
// The root page of your application
var homePage = FreshMvvm.FreshPageModelResolver.ResolvePageModel<HomePageModel>();
var navConatiner = new FreshMvvm.FreshNavigationContainer(homePage);
MainPage = navConatiner;
}
This is just perfect and EXACTLY what is missing
ReplyDeleteThanks for posting this. I knew I was missing something.
ReplyDelete