Share via


_CommandBars.FindControl(Object, Object, Object, Object) Method

Definition

Finds the command bar control that has the specified characteristics.

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);
[System.Runtime.InteropServices.DispId(1610809352)]
public Microsoft.VisualStudio.CommandBars.CommandBarControl FindControl (object Type, object Id, object Tag, object Visible);
public Microsoft.VisualStudio.CommandBars.CommandBarControl FindControl (object Type, object Id, object Tag, object Visible);
[<System.Runtime.InteropServices.DispId(1610809352)>]
abstract member FindControl : obj * obj * obj * obj -> Microsoft.VisualStudio.CommandBars.CommandBarControl
abstract member FindControl : 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) 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 ID of the control. 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. A value of true matches only visible controls; a value of false matches any control regardless of visibility. If this parameter is not specified, the default value is false.

Returns

The matching CommandBarControl.

Attributes

Applies to