private void MapWindows() { ViewService.Configure(e => { e.Bind <AddRelationView, AddRelationViewModel>() .OnClosing(vm => MvvmHelper.GetViewModel(workbench).Refresh()); }); }
public static void Register() { builder.Register(_ => Application.Current).As <Application>(); builder.RegisterType <Shell>().AsSelf(); //Services builder.RegisterType <ModalService>().As <IModalService>(); builder.RegisterType <ApplicationService>().As <IApplicationService>(); //Components //builder.RegisterInstance(App.Current).As<IApplication>().SingleInstance(); //Views //Assembly.GetCallingAssembly().ExportedTypes // .Where(t => t.IsClass && !t.IsInterface && !t.IsAbstract && typeof(IView).IsAssignableFrom(t)) // .ForEach(t => builder.RegisterType(t).AsImplementedInterfaces()); //ViewModels Assembly.GetCallingAssembly().ExportedTypes .Where(t => t.IsClass && !t.IsInterface && !t.IsAbstract && typeof(ViewModelBase).IsAssignableFrom(t)) .ForEach(t => builder.RegisterType(MvvmHelper.CreateViewModelProxyType(t)).As(t)); }