IVsPackageDynamicToolOwner Interface

Definition

Enables a package to show or hide its tool windows dynamically. You can get an instance of the interface from the SIVsPackageDynamicToolOwner (SID_SVsPackageDynamicToolOwner) service.

public interface class IVsPackageDynamicToolOwner
public interface class IVsPackageDynamicToolOwner
__interface IVsPackageDynamicToolOwner
[System.Runtime.InteropServices.Guid("7DB81657-7722-4407-B675-9F4A6FEEEA15")]
[System.Runtime.InteropServices.InterfaceType(1)]
public interface IVsPackageDynamicToolOwner
[System.Runtime.InteropServices.Guid("7DB81657-7722-4407-B675-9F4A6FEEEA15")]
[System.Runtime.InteropServices.InterfaceType(System.Runtime.InteropServices.ComInterfaceType.InterfaceIsIUnknown)]
public interface IVsPackageDynamicToolOwner
[<System.Runtime.InteropServices.Guid("7DB81657-7722-4407-B675-9F4A6FEEEA15")>]
[<System.Runtime.InteropServices.InterfaceType(1)>]
type IVsPackageDynamicToolOwner = interface
[<System.Runtime.InteropServices.Guid("7DB81657-7722-4407-B675-9F4A6FEEEA15")>]
[<System.Runtime.InteropServices.InterfaceType(System.Runtime.InteropServices.ComInterfaceType.InterfaceIsIUnknown)>]
type IVsPackageDynamicToolOwner = interface
Public Interface IVsPackageDynamicToolOwner
Attributes

Remarks

Only packages that own tool windows not created with the CTW_fForceCreate flag need to implement this interface. You can also retrieve the interface by querying IVsPackage.

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 registers the SupportsDynamicToolOwner flag automatically, if the interface is implemented by the VSPackage.

Methods

QueryShowTool(Guid, Int32)

Allows the package to control whether the tool window should be shown or hidden. This method is called by the shell when the user switches to a different window view or context, for example Design, Debugging, Full Screen, etc.

Applies to