CommandBar.FindControl(Object, Object, Object, Object, Object) 方法

定义

返回与指定条件匹配的命令栏控件。

Microsoft::VisualStudio::CommandBars::CommandBarControl FindControl(winrt::Windows::Foundation::IInspectable const & Type, winrt::Windows::Foundation::IInspectable const & Id, winrt::Windows::Foundation::IInspectable const & Tag, winrt::Windows::Foundation::IInspectable const & Visible, winrt::Windows::Foundation::IInspectable const & Recursive);
[System.Runtime.InteropServices.DispId(1610874887)]
public Microsoft.VisualStudio.CommandBars.CommandBarControl FindControl (object Type, object Id, object Tag, object Visible, object Recursive);
[<System.Runtime.InteropServices.DispId(1610874887)>]
abstract member FindControl : obj * obj * obj * obj * obj -> Microsoft.VisualStudio.CommandBars.CommandBarControl
Public Function FindControl (Optional Type As Object, Optional Id As Object, Optional Tag As Object, Optional Visible As Object, Optional Recursive As Object) As CommandBarControl

参数

Type
Object

[in,可选] MsoControlType 控件的。 值-1 与任何控件类型匹配。 如果未指定此参数,则默认值为-1。

Id
Object

[in,可选]一个表示控件 id 的整数。值-1 与任何控件 id 匹配。如果未指定此参数,则默认值为-1。

Tag
Object

[in,可选]控件的标记。 值 null 匹配任何标记。 如果未指定此参数,则默认值为 null。

Visible
Object

[in,可选]一个布尔值,表示控件的可见性。 true 仅匹配可见控件。 false 匹配任何控件,而不考虑可见性。 如果未指定此参数,则默认值为 false

Recursive
Object

[in,可选]指示如何搜索的布尔值。 如果 true 为,则仅搜索当前命令栏; 如果为 false ,则搜索当前命令栏和所有子代命令栏。 如果未指定此参数,则默认值为 false。

返回

CommandBarControl

Microsoft.VisualStudio.CommandBarsl.CommandBarControl

属性

适用于