CommandContextBoundMenuCommand 构造函数

定义

构造新的 CommandContextBoundMenuCommand

public:
 CommandContextBoundMenuCommand(IServiceProvider ^ serviceProvider, EventHandler ^ handler, System::ComponentModel::Design::CommandID ^ id, ... cli::array <Guid> ^ commandContext);
public CommandContextBoundMenuCommand (IServiceProvider serviceProvider, EventHandler handler, System.ComponentModel.Design.CommandID id, params Guid[] commandContext);
new Microsoft.VisualStudio.Modeling.Shell.CommandContextBoundMenuCommand : IServiceProvider * EventHandler * System.ComponentModel.Design.CommandID * Guid[] -> Microsoft.VisualStudio.Modeling.Shell.CommandContextBoundMenuCommand
Public Sub New (serviceProvider As IServiceProvider, handler As EventHandler, id As CommandID, ParamArray commandContext As Guid())

参数

serviceProvider
IServiceProvider

用于获取外壳服务的服务提供程序。 需要访问 IMonitorSelectionService。

handler
EventHandler

用于执行命令的处理程序。

id
CommandID

标识此菜单命令的命令 id。

commandContext
Guid[]

Guid (s) 指示此命令绑定到的命令上下文。

适用于