protected void AddExpandMenuItems(IMenuBarSubMenu subMenuExpand) { subMenuExpand.AddItem(CreateMenuButton.WithCaption("Expand Selection").WithActionCommand(() => Presenter.ExpandSelection())); subMenuExpand.AddItem(CreateMenuButton.WithCaption("Collapse Selection").WithActionCommand(() => Presenter.CollapseSelection())); subMenuExpand.AddItem(CreateMenuButton.WithCaption("Collapse all Except Selection").WithActionCommand(() => Presenter.CollapseAllExceptSelection()).AsGroupStarter()); }
private void createUpdateMenu(IMenuBarSubMenu chartTemplate) { var chartTemplates = allSimulationTemplates().ToList(); if (chartTemplates.Any()) { var overwrite = CreateSubMenu.WithCaption(MenuNames.UpdateExistingTemplate) .WithIcon(ApplicationIcons.SaveAsTemplate); chartTemplates.Each(t => overwrite.AddItem(updateMenuFor(t))); chartTemplate.AddItem(overwrite); } }
public static IMenuBarSubMenu WithItem(this IMenuBarSubMenu barSubMenu, IMenuBarItem subElement) { barSubMenu.AddItem(subElement); return(barSubMenu); }