public ShellViewModel( CommandService commandService, Lazy <StatusBarViewModel> statusBar, MainMenuService mainMenuService, ToolbarService toolbarService, [ImportMany] IEnumerable <Lazy <IExtension> > extensions, [ImportMany] IEnumerable <Lazy <ToolViewModel> > toolControls) { _extensions = extensions; _toolControls = toolControls; _commandService = commandService; MainMenu = mainMenuService.GetMainMenu(); var toolbars = toolbarService.GetToolbars(); StandardToolbar = toolbars.Single(t => t.Key == "Standard").Value; _statusBar = statusBar; _keyBindings = new List <KeyBinding>(); ModalDialog = new ModalDialogViewModelBase("Dialog"); _documents = new List <IDocumentTabViewModel>(); }
public ShellViewModel( CommandService commandService, Lazy <StatusBarViewModel> statusBar, MainMenuService mainMenuService, ToolbarService toolbarService, [ImportMany] IEnumerable <Lazy <IExtension> > extensions, [ImportMany] IEnumerable <Lazy <ToolViewModel> > toolControls) { _extensions = extensions; _toolControls = toolControls; _commandService = commandService; MainMenu = mainMenuService.GetMainMenu(); var toolbars = toolbarService.GetToolbars(); StandardToolbar = toolbars.SingleOrDefault(t => t.Key == "Standard").Value; _statusBar = statusBar; _keyBindings = new List <KeyBinding>(); ModalDialog = new ModalDialogViewModelBase("Dialog"); _documents = new List <IDocumentTabViewModel>(); _documentViews = new Dictionary <IDocumentTabViewModel, IDockable>(); _perspectives = new List <IPerspective>(); this.WhenAnyValue(x => x.CurrentPerspective).Subscribe(perspective => { if (perspective != null) { //Root.Navigate(perspective.Root); ApplyPerspective(perspective.Root); } }); }