static ViewModelLocator() { ServiceLocator.SetLocatorProvider(() => SimpleIoc.Default); var nav = new NavigationService(); //nav.Configure(SecondPageKey, typeof(SecondPage)); SimpleIoc.Default.Register <INavigationService>(() => nav); var pons = new PonsRestService(); pons.SetSecretKey(Constants.PonsApiSecret); SimpleIoc.Default.Register <IPonsRestService>(() => pons); SimpleIoc.Default.Register <IPonsDictionaryService, PonsDictionaryService>(); //if (ViewModelBase.IsInDesignModeStatic) //{ // SimpleIoc.Default.Register<IDataService, Design.DesignDataService>(); //} //else //{ // SimpleIoc.Default.Register<IDataService, DataService>(); //} SimpleIoc.Default.Register <MainViewModel>(); }
static ViewModelLocator() { ServiceLocator.SetLocatorProvider(() => SimpleIoc.Default); var pons = new PonsRestService(); pons.SetSecretKey(Constants.PonsApiSecret); SimpleIoc.Default.Register <IPonsRestService>(() => pons); SimpleIoc.Default.Register <IPonsDictionaryService, PonsDictionaryService>(); SimpleIoc.Default.Register <ILanguagesTreeService, LanguagesTreeService>(); //if (ViewModelBase.IsInDesignModeStatic) //{ // SimpleIoc.Default.Register<IDataService, Design.DesignDataService>(); //} //else //{ // SimpleIoc.Default.Register<IDataService, DataService>(); //} SimpleIoc.Default.Register <MainViewModel>(); }