private static IMenuBarSubMenu createGroupingSubMenu(ITreeNode <RootNodeType> treeNode, IExplorerPresenter presenter) { var groupMenu = CreateSubMenu.WithCaption(MenuNames.GroupBy); presenter.AvailableClassificationCategories(treeNode) .Each(classification => groupMenu.AddItem( CreateMenuButton.WithCaption(classification.ClassificationName) .WithActionCommand(() => presenter.AddToClassificationTree(treeNode, classification.ClassificationName)))); return(groupMenu); }