CommandContextBoundMenuCommand 类
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重要
此 API 不符合 CLS。
表示绑定到特定 UI 上下文的菜单命令。 仅当给定的命令 UI 上下文处于活动状态时,才会显示此命令。 应将这些命令与 .CTC 文件的 VISIBILITY_SECTION 中的条目一起使用。
public ref class CommandContextBoundMenuCommand : Microsoft::VisualStudio::Shell::OleMenuCommand
[System.CLSCompliant(false)]
public class CommandContextBoundMenuCommand : Microsoft.VisualStudio.Shell.OleMenuCommand
[<System.CLSCompliant(false)>]
type CommandContextBoundMenuCommand = class
inherit OleMenuCommand
Public Class CommandContextBoundMenuCommand
Inherits OleMenuCommand
- 继承
- 属性
构造函数
| CommandContextBoundMenuCommand(IServiceProvider, EventHandler, CommandID, Guid[]) |
构造新的 CommandContextBoundMenuCommand |
属性
| AutomationName | (继承自 OleMenuCommand) |
| MatchedCommandId |
获取或设置命令 ID。 (继承自 OleMenuCommand) |
| OleStatus |
获取此菜单项的 OLE 命令状态代码。 (继承自 OleMenuCommand) |
| ParametersDescription |
获取或设置命令的参数说明。 (继承自 OleMenuCommand) |
| Text |
获取或设置命令的文本。 (继承自 OleMenuCommand) |
方法
| DynamicItemMatch(Int32) |
允许动态项命令与列表中的后续项匹配。 (继承自 OleMenuCommand) |
| Invoke(Object) |
执行命令。 (继承自 OleMenuCommand) |
| Invoke(Object, IntPtr) |
执行命令。 (继承自 OleMenuCommand) |
| Invoke(Object, IntPtr, OLECMDEXECOPT) |
用指定的参数和执行选项执行命令。 (继承自 OleMenuCommand) |
事件
| BeforeQueryStatus |
当客户端请求命令的状态时调用。 (继承自 OleMenuCommand) |