private void RegisterServices() { _container = new WinRTContainer(); _container.Activated += TryRegister; _container.RegisterWinRTServices(); _container .AssemblyContainingType<MainViewModel>() .RegisterViewModels(); #if WINDOWS_PHONE_APP _container.Singleton<BackButtonHandler>(); #endif _container.Instance(AutoMaps.Initialize()); _container.Singleton<ICacheService, CacheService>(); _container.Singleton<IFilePickerService, FilePickerService>(); _container.Singleton<IRegisteredDbsService, RegisteredDbsService>(); _container.PerRequest<IEntrySubViewModel, EntryDetailsViewModel>(); _container.PerRequest<IEntrySubViewModel, EntryNotesViewModel>(); _container.PerRequest<IEntrySubViewModel, EntryAttachmentsViewModel>(); _container.PerRequest<IEntrySubViewModel, EntryFieldsViewModel>(); }