Beispiel #1
0
        protected async override void OnStart()
        {
            // Initialize Services and Stack
            var appLoader = new AppLoader();
            SimpleIoc.Default.Register<IAppLoader>(() => appLoader);
            appLoader.InitializeViewModels();

            // Load initial navigation stack
            await ServiceLocator.Current.GetInstance<IAppLoader>().LoadStack(StackEnum.Authentication);
        }
Beispiel #2
0
        public App()
        {
            InitializeComponent();
         
            // Set default ServiceLocatorProvider 
            ServiceLocator.SetLocatorProvider(() => SimpleIoc.Default);

            // Initialize Services and Stack
            var appLoader = new AppLoader();            
            SimpleIoc.Default.Register<IAppLoader>(() => appLoader);
            appLoader.InitializeViewModels();
           
            // Load initial navigation stack
            ServiceLocator.Current.GetInstance<IAppLoader>().LoadStack(StackEnum.Authentication).Wait();

        }