Share via


AsyncPackage.InitializeToolWindowAsync(Type, Int32, CancellationToken) Method

Definition

Performs initialization in preparation for creating the tool window identified by toolWindowType.

protected:
 virtual System::Threading::Tasks::Task<System::Object ^> ^ InitializeToolWindowAsync(Type ^ toolWindowType, int id, System::Threading::CancellationToken cancellationToken);
protected virtual System.Threading.Tasks.Task<object> InitializeToolWindowAsync (Type toolWindowType, int id, System.Threading.CancellationToken cancellationToken);
abstract member InitializeToolWindowAsync : Type * int * System.Threading.CancellationToken -> System.Threading.Tasks.Task<obj>
override this.InitializeToolWindowAsync : Type * int * System.Threading.CancellationToken -> System.Threading.Tasks.Task<obj>
Protected Overridable Function InitializeToolWindowAsync (toolWindowType As Type, id As Integer, cancellationToken As CancellationToken) As Task(Of Object)

Parameters

toolWindowType
Type

Type of the window to be created

id
Int32

The instance identifier for the tool window

cancellationToken
CancellationToken

The cancellation token for the asynchronous operation

Returns

A task representing the initialization work. The result of the task is a context object that will be passed to the passed to the matching ToolWindowPane constructor. If no object needs to be passed to the pane constructor, Unspecified can be returned. In this case, the pane's default constructor will be invoked.

Applies to