Partager via


IVsPackageDynamicToolOwnerEx Interface

Definition

Enables dynamic control of tool window visibility. This interface extends the IVsPackageDynamicToolOwner interface by adding a parameter for the multi-instance ID. This version controls the number of instances that are shown, while the previous version controls only the kind of tool window that is shown, regardless of its instance ID.This primarily affects tool windows that have the CTW_fForceCreate flag that causes them to be loaded by the shell on startup or when the context is changed.

public interface class IVsPackageDynamicToolOwnerEx
public interface class IVsPackageDynamicToolOwnerEx
__interface IVsPackageDynamicToolOwnerEx
[System.Runtime.InteropServices.Guid("91C30F81-E72A-4997-9B07-A0AECB8C9169")]
[System.Runtime.InteropServices.InterfaceType(1)]
public interface IVsPackageDynamicToolOwnerEx
[<System.Runtime.InteropServices.Guid("91C30F81-E72A-4997-9B07-A0AECB8C9169")>]
[<System.Runtime.InteropServices.InterfaceType(1)>]
type IVsPackageDynamicToolOwnerEx = interface
Public Interface IVsPackageDynamicToolOwnerEx
Attributes

Remarks

The shell calls the QueryShowTool method when the user switches window contexts such as debugging or design.

To use this interface, a VSPackage must be registered with a SupportsDynamicToolOwner key. If the registration key SupportsDynamicToolOwner exists on a VSPackage that owns a tool window, the shell loads the package before displaying the tool so that the package can control visibility. Subsequent sessions will not cause the package to be loaded if the tool was not shown again in the previous session, because the window layout is persisted with the window being hidden. Without the SupportsDynamicToolOwner registration, the tool window may be visible initially, since VSPackages are not loaded at startup.

The PackageRegistrationAttribute automatically registers the SupportsDynamicToolOwner key if this interface is implemented by the package.

Methods

QueryShowTool(Guid, UInt32, Int32)

Enables the VSPackage to control whether to show or hide the tool window. The shell calls this method when the user switches views or contexts, for example Design, Debugging, Full Screen.

Applies to