public App()
        {
            NostromoApp.Setup()
            .UseAutofacContainer()
            .UseXamarinFormsViewActivator()
            .RegisterViewsInAssemblyOf <App>()
            .RegisterDependenciesInAssemblyOf <App> ()
            .Init();


            Startup();
        }
Example #2
0
        public App()
        {
            InitializeComponent();

            var initializer = NostromoApp
                              .Setup()
                              .UseAutofacContainer()
                              .UseGenericPlatformViewActivator()
                              .RegisterViewsInAssemblyOf <App>()
                              .RegisterDependenciesInAssemblyOf <App>();

            initializer.Init();

            //var vm = Build.ViewModel(() => new RankingAtletiViewModel());
            var vm = Build.ViewModel(() => new HomeViewModel());

            var firstView = Build.View <Page>(vm);

            firstView.BindingContext = vm;
            vm.Navigator             = this;
            ReplaceMainPage(firstView);
        }