Partager via


CommandBar.FindControl(Object, Object, Object, Object, Object) Method

Definition

Returns a command bar control that matches the specified criteria.

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

Parameters

Type
Object

[in, optional] The MsoControlType of the control. A value of -1 matches any control type. If this parameter is not specified, the default value is -1.

Id
Object

[in, optional] An integer representing the control id. A value of -1 matches any control id. If this parameter is not specified, the default value is -1.

Tag
Object

[in, optional] The tag of the control. A value of null matches any tag. If this parameter is not specified, the default value is null.

Visible
Object

[in, optional] A Boolean representing the visibility of the control. true matches only visible controls. false matches any control regardless of visibility. If this parameter is not specified, the default value is false.

Recursive
Object

[in, optional] Boolean indicating how to search. If true, search only the current command bar; if false, search the current command bar and all descendent command bars. If this parameter is not specified, the default value is false.

Returns

The Microsoft.VisualStudio.CommandBarsl.CommandBarControl.

Attributes

Applies to