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); }
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(); }