protected override void Configure() { container = new PhoneContainer(RootFrame); container.RegisterPhoneServices(); container.PerRequest<MainPageViewModel>(); container.PerRequest<PivotPageViewModel>(); container.PerRequest<TabViewModel>(); AddCustomConventions(); }
protected override void Configure() { container = new PhoneContainer(this); container.RegisterPhoneServices(); container.RegisterAllViewModelsForPages(); container.RegisterPerRequest<TabViewModel, TabViewModel>(); container.InstallChooser<PhoneNumberChooserTask, PhoneNumberResult>(); container.InstallLauncher<EmailComposeTask>(); AddCustomConventions(); }
protected override void Configure() { container = new PhoneContainer(); container.RegisterSingleton(typeof(MainPageViewModel), "MainPageViewModel", typeof(MainPageViewModel)); container.RegisterSingleton(typeof(PageTwoViewModel), "PageTwoViewModel", typeof(PageTwoViewModel)); container.RegisterPerRequest(typeof(TabViewModel), null, typeof(TabViewModel)); container.RegisterInstance(typeof(INavigationService), null, new FrameAdapter(RootFrame)); container.RegisterInstance(typeof(IPhoneService), null, new PhoneApplicationServiceAdapter(PhoneService)); container.Activator.InstallChooser<PhoneNumberChooserTask, PhoneNumberResult>(); container.Activator.InstallLauncher<EmailComposeTask>(); }