public MenuViewModel(IMenuRegistry registry) { IMenuContainer container = registry.Register("Product Catalog").ToContainer(); IMenuContainer menuContainer = container.Register("Menu Item").ToContainer(); menuContainer.Register("MenuItem2").ToScreen<TestScreen>(); menuContainer.Register("MenuItem2").ToScreen<TestScreen2>(); Menus = new ObservableCollection<MenuItemViewModel>(); new ObservableCollectionSynchronizer<IMenuItem, MenuItemViewModel>(registry, Menus, (x) => new MenuItemViewModel(x)); }
public MenuViewModel(IMenuRegistry registry) { IMenuContainer container = registry.Register("Product Catalog").ToContainer(); IMenuContainer menuContainer = container.Register("Menu Item").ToContainer(); menuContainer.Register("MenuItem2").ToScreen <TestScreen>(); menuContainer.Register("MenuItem2").ToScreen <TestScreen2>(); Menus = new ObservableCollection <MenuItemViewModel>(); new ObservableCollectionSynchronizer <IMenuItem, MenuItemViewModel>(registry, Menus, (x) => new MenuItemViewModel(x)); }
public void Start() { _menuRegistry.Register(this); }
public void Initialize() { _container.Configure(x => x.AddRegistry(new ProcurementRegistry())); _registry.Register("Procurement").ToScreen <PurchaseOrderScreen>(); }