CommandBar.FindControl 方法

返回符合指定条件的命令栏控件。

命名空间:  Microsoft.VisualStudio.CommandBars
程序集:  Microsoft.VisualStudio.CommandBars(在 Microsoft.VisualStudio.CommandBars.dll 中)

语法

声明
Function FindControl ( _
    Type As Object, _
    Id As Object, _
    Tag As Object, _
    Visible As Object, _
    Recursive As Object _
) As CommandBarControl
CommandBarControl FindControl(
    Object Type,
    Object Id,
    Object Tag,
    Object Visible,
    Object Recursive
)

参数

  • Type
    类型:System.Object
    [in, optional] 控件的 MsoControlType 。值 -1 与任何控件类型。如果此参数未指定,则默认值为 -1。
  • Id
    类型:System.Object
    [in, optional] 表示控件 ID 的整数.值 -1 与任何控件 ID.如果此参数未指定,则默认值为 -1。
  • Tag
    类型:System.Object
    [in, optional] 控件的标记。nullnull 引用(在 Visual Basic 中为 Nothing) 的值与所有标记。 如果此参数未指定,则默认值为空。
  • Visible
    类型:System.Object
    [in, optional] 布尔值表示控件的可见性。 true 匹配才能看到控件。无论可见性,false 与任何控件。如果此参数未指定,则默认值为 false。
  • Recursive
    类型:System.Object
    [in, optional] 布尔值指示如何搜索。如果 true,只搜索当前命令栏;如果 false,搜索当前命令栏和所有子代命令栏。如果此参数未指定,则默认值为 false。

返回值

类型:Microsoft.VisualStudio.CommandBars.CommandBarControl
CommandBarControl 。

.NET Framework 安全性

请参见

参考

CommandBar 接口

Microsoft.VisualStudio.CommandBars 命名空间