static ViewModelLocator() { ServiceLocator.SetLocatorProvider(() => SimpleIoc.Default); // TODO - setup your models, views and viewmodels // setup app services SimpleIoc.Default.Register<INavigationService2>(() => { var nav = new SKELETON.Service.NavigationService(); nav.Configure("Home", typeof(HomePage)); nav.Configure("Settings", typeof(SettingsPage)); return nav; }); SimpleIoc.Default.Register<IDialogService, DialogService>(); // setup models SimpleIoc.Default.Register<IAbout, About>(); SimpleIoc.Default.Register<ISettings>(() => new Settings(ApplicationData.Current.LocalSettings)); // setup view models SimpleIoc.Default.Register<MainViewModel>(); SimpleIoc.Default.Register<AboutViewModel>(); SimpleIoc.Default.Register<SettingsViewModel>(); }
static ViewModelLocator() { ServiceLocator.SetLocatorProvider(() => SimpleIoc.Default); // TODO - setup your models, views and viewmodels // setup app services SimpleIoc.Default.Register <INavigationService2>(() => { var nav = new SKELETON.Service.NavigationService(); nav.Configure("Home", typeof(HomePage)); nav.Configure("Settings", typeof(SettingsPage)); return(nav); }); SimpleIoc.Default.Register <IDialogService, DialogService>(); // setup models SimpleIoc.Default.Register <IAbout, About>(); SimpleIoc.Default.Register <ISettings>(() => new Settings(ApplicationData.Current.LocalSettings)); // setup view models SimpleIoc.Default.Register <MainViewModel>(); SimpleIoc.Default.Register <AboutViewModel>(); SimpleIoc.Default.Register <SettingsViewModel>(); }