コード例 #1
0
 public CommandBarContextMenu(ICommandService commandService)
 {
     if (commandService == null)
     {
         throw new ArgumentNullException("commandService");
     }
     this.commandService = commandService;
     this.items          = new CommandBarItemCollection(this.commandService, CommandInvocationSource.ContextMenu, base.Items, false);
 }
コード例 #2
0
 public CommandBarMenu(ICommandService commandService, bool displayShortcut, bool isCollapsible)
 {
     this.isCollapsible = isCollapsible;
     this.items         = new CommandBarItemCollection(commandService, CommandInvocationSource.MenuItem, base.Items, displayShortcut);
 }