protected override void AddAdditionalCommandGroups() { base.AddAdditionalCommandGroups(); RibbonPageGroup group = new RibbonPageGroup(); group.Caption = DefaultCommandGroupName; BarButtonItem buttonSave = new BarButtonItem(); buttonSave.Content = "Save"; buttonSave.Glyph = AppImageHelper.GetImageSource("Save", ImageSize.Size16x16); buttonSave.LargeGlyph = AppImageHelper.GetImageSource("Save", ImageSize.Size32x32); buttonSave.Command = _viewModel.SaveCommand; BarButtonItem buttonEdit = new BarButtonItem(); buttonEdit.Content = "Edit"; buttonEdit.Glyph = AppImageHelper.GetImageSource("Edit", ImageSize.Size16x16); buttonEdit.LargeGlyph = AppImageHelper.GetImageSource("Edit", ImageSize.Size32x32); buttonEdit.Command = _viewModel.EditCommand; BarButtonItem buttonCancel = new BarButtonItem(); buttonCancel.Content = "Cancel"; buttonCancel.Glyph = AppImageHelper.GetImageSource("Cancel", ImageSize.Size16x16); buttonCancel.LargeGlyph = AppImageHelper.GetImageSource("Cancel", ImageSize.Size32x32); buttonCancel.Command = _viewModel.CancelCommand; group.ItemLinks.Add(buttonSave); group.ItemLinks.Add(buttonEdit); group.ItemLinks.Add(buttonCancel); ShellExtensionService.AddCommandGroupExtension(WorkItemName, DefaultCommandPageName, group); }
protected virtual void AddCloseCommandGroups() { RibbonPageGroup group1 = new RibbonPageGroup(); group1.Caption = "Close"; BarButtonItem closeButton = new BarButtonItem(); closeButton.Content = "Close"; closeButton.Glyph = AppImageHelper.GetImageSource("Close", ImageSize.Size16x16); closeButton.LargeGlyph = AppImageHelper.GetImageSource("Close", ImageSize.Size32x32); closeButton.Command = CloseCommand; group1.ItemLinks.Add(closeButton); ShellExtensionService.AddCommandGroupExtension(WorkItemName, DefaultCommandPageName, group1); }
public override void OnInitialized(IContainerProvider containerProvider) { base.OnInitialized(containerProvider); this._container = containerProvider; this._regionManager = this._container.Resolve <IRegionManager>(); EventAggregator.GetEvent <AuthenticatedEvent>().Subscribe(HandleUserAuthenticated); BarButtonItem loginButton = new BarButtonItem(); loginButton.Content = "Login"; loginButton.Command = ToCommand(StartAuthenticationProccess); loginButton.Glyph = AppImageHelper.GetImageSource("BOUser", ImageSize.Size16x16); loginButton.LargeGlyph = AppImageHelper.GetImageSource("BOUser", ImageSize.Size32x32); ShellExtensionService.AddCommandExtension(loginButton); StartAuthenticationProccess(); }