public void RemoveCommand(NavbarCommand command) { _commands.Remove(command); NotifyPropertyChanged(this, new PropertyChangedEventArgs("Commands")); }
private void Setup() { //NavbarTab search = new NavbarTab(); //search.Header.HeaderText = "Search"; //search.Header.ImageResource = "appbar_magnify"; //search.Title = "Pick one of the search modes"; //search.TabContent = null; //_shellCoordinator.Invoke<NavbarContainer>(NavbarContainer.AddTabAction, search); NavbarCommand signIn = new NavbarCommand(); signIn.HeaderText = "Sign in"; signIn.ImageResource = "appbar_user"; signIn.ClickHandler = new Action<object>(delegate (object parameter) { AuthDialogViewModel loginModel = new AuthDialogViewModel(); loginModel.AuthenticationForm = new AuthFormViewModel(); _shellCoordinator.ShowDialog<LoginDialog>(this._shellCoordinator.MainWindow, loginModel); }); _shellCoordinator.Invoke<NavbarContainer>(NavbarContainer.AddCommandAction, signIn); NavbarCommand settings = new NavbarCommand(); settings.HeaderText = "Settings"; settings.ImageResource = "appbar_cog"; settings.ClickHandler = new Action<object>(delegate (object parameter) { //LoginDialog loginDialog = new LoginDialog(this); //loginDialog.ShowDialog(); }); _shellCoordinator.Invoke<NavbarContainer>(NavbarContainer.AddCommandAction, settings); this._shellCoordinator.Invoke<UpperStripViewModel>(UpperStripViewModel.SetCurrentTitleAction, "Test title"); this._shellCoordinator.Invoke<StatusBarViewModel>(StatusBarViewModel.SetCurrentStatusAction, "Ready."); this._shellCoordinator.Invoke<StatusBarViewModel>(StatusBarViewModel.SetCurrentLocationAction, "Belgrade, Serbia"); IModuleInitializer searchModule = AppCoordinator.Instance.LoadModule(@"D:\Programming\Astronomy\Dev\Zenith\src\Client\Zenith.SearchModule\bin\Debug\Zenith.SearchModule.dll"); _navbarPresenter.Render(searchModule.GetMetadata(), _shellCoordinator); IModuleInitializer workspaceModule = AppCoordinator.Instance.LoadModule(@"D:\Programming\Astronomy\Dev\Zenith\src\Client\Zenith.WorkspaceModule\bin\Debug\Zenith.WorkspaceModule.dll"); _navbarPresenter.Render(workspaceModule.GetMetadata(), _shellCoordinator); IModuleInitializer filesModule = AppCoordinator.Instance.LoadModule(@"D:\Programming\Astronomy\Dev\Zenith\src\Client\Zenith.FileModule\bin\Debug\Zenith.FilesModule.dll"); _navbarPresenter.Render(filesModule.GetMetadata(), _shellCoordinator); }