Partilhar via


AsyncPackage.FindWindowPaneAsync Method

Definition

Asynchronously locates the window pane corresponding to the specified type and ID. If it does not exist, it creates and returns one if create is true, or returns null if create is false.

public:
 System::Threading::Tasks::Task<Microsoft::VisualStudio::Shell::WindowPane ^> ^ FindWindowPaneAsync(Type ^ toolWindowType, int id, bool create, System::Threading::CancellationToken cancellationToken);
public System.Threading.Tasks.Task<Microsoft.VisualStudio.Shell.WindowPane> FindWindowPaneAsync (Type toolWindowType, int id, bool create, System.Threading.CancellationToken cancellationToken);
member this.FindWindowPaneAsync : Type * int * bool * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.VisualStudio.Shell.WindowPane>
Public Function FindWindowPaneAsync (toolWindowType As Type, id As Integer, create As Boolean, cancellationToken As CancellationToken) As Task(Of WindowPane)

Parameters

toolWindowType
Type

Type of the window to be created

id
Int32

Instance ID

create
Boolean

Create if none exist?

cancellationToken
CancellationToken

The cancellation token for the asynchronous operation

Returns

A task returning an instance of a class derived from WindowPane

Applies to