CommandContextBoundMenuCommand 构造函数
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
构造新的 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) 指示此命令绑定到的命令上下文。