IMenuCommandService.FindCommand(CommandID) 方法

定义

搜索指定的命令 ID 并返回与之关联的菜单命令。Searches for the specified command ID and returns the menu command associated with it.

public:
 System::ComponentModel::Design::MenuCommand ^ FindCommand(System::ComponentModel::Design::CommandID ^ commandID);
public System.ComponentModel.Design.MenuCommand FindCommand (System.ComponentModel.Design.CommandID commandID);
abstract member FindCommand : System.ComponentModel.Design.CommandID -> System.ComponentModel.Design.MenuCommand
Public Function FindCommand (commandID As CommandID) As MenuCommand

参数

commandID
CommandID

要搜索的 CommandIDThe CommandID to search for.

返回

MenuCommand

与该命令 ID 相关联的 MenuCommand,或者在未找到命令的情况下返回 nullThe MenuCommand associated with the command ID, or null if no command is found.

适用于

另请参阅