ProvideToolWindowVisibilityAttribute Class

Definition

Maps a tool window to one or more UI contexts, so that the window is displayed when the user switches to one of those contexts and is hidden when the user switches away from one of the contexts.

public ref class ProvideToolWindowVisibilityAttribute sealed : Microsoft::VisualStudio::Shell::RegistrationAttribute
public ref class ProvideToolWindowVisibilityAttribute sealed : Microsoft::VisualStudio::Shell::RegistrationAttribute
[System.AttributeUsage(System.AttributeTargets.Class, AllowMultiple=true, Inherited=true)]
public sealed class ProvideToolWindowVisibilityAttribute : Microsoft.VisualStudio.Shell.RegistrationAttribute
type ProvideToolWindowVisibilityAttribute = class
    inherit RegistrationAttribute
Public NotInheritable Class ProvideToolWindowVisibilityAttribute
Inherits RegistrationAttribute
Inheritance
ProvideToolWindowVisibilityAttribute
Attributes

Remarks

Applying this attribute to a subclass of the ToolWindowPane results in a tool window that the Visual Studio shell automatically shows or hides. The appearance of this window depends on the internal visibility attribute and the UI context information described in the package's .vsct file. If Visual Studio automatically shows a window and the user closes it, after that Visual Studio will never automatically show the window again. In order to see the tool window again after it has been closed, the user must manually open the window or delete \<USER>\Application Data\Microsoft\Visual Studio\<version>\1033\windows.prf, the Visual Studio file that saves shell information (including which windows are open, their location and size) when Visual Studio shuts down. After the window's internal visibility state is reset to true, the expected visibility behavior again occurs.

Constructors

ProvideToolWindowVisibilityAttribute(Object, String)

Initializes a new instance of ProvideToolWindowVisibilityAttribute for the specified type of the tool window and a GUID to associate with its visibility.

Properties

CommandUIGuid

Gets the GUID of a command associated with showing or hiding the tool window.

Name

Gets or sets the name of the window.

TypeId

Override the TypeID property in order to let the RegistrationAttribute derived classes to work with System.ComponentModel.TypeDescriptor.GetAttributes(...). An attribute derived from this one will have to override this property only if it needs a better control on the instances that can be applied to a class.

(Inherited from RegistrationAttribute)

Methods

GetPackageRegKeyPath(Guid)

Gets the registry path (relative to the registry root of the application) of the VSPackage.

(Inherited from RegistrationAttribute)
Register(RegistrationAttribute+RegistrationContext)

Registers the tool window visibility.

Unregister(RegistrationAttribute+RegistrationContext)

Removes the registry key.

Applies to