using Xamarin.Forms;
using XamFormsMVVM.ViewModels;
using XamFormsMVVM.Views;
using XLabs.Forms.Mvvm;

namespace XamFormsMVVM
{
    public class App : Application
    {
        public App()
        {
            // Główna strona aplikacji
            RegisterViews();
            MainPage = new NavigationPage((ContentPage)ViewFactory.CreatePage<ContactListViewModel, ContactListPage>());
        }

        private void RegisterViews()
        {
            ViewFactory.Register<ContactListPage, ContactListViewModel>();
            ViewFactory.Register<ContactDetailsPage, ContactDetailsViewModel>();
        }
    }
}
