ProvideToolWindowVisibilityAttribute Class

 

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.

Namespace:   Microsoft.VisualStudio.Shell
Assembly:  Microsoft.VisualStudio.Shell.14.0 (in Microsoft.VisualStudio.Shell.14.0.dll)

System.Object
  System.Attribute
    Microsoft.VisualStudio.Shell.RegistrationAttribute
      Microsoft.VisualStudio.Shell.ProvideToolWindowVisibilityAttribute

[AttributeUsageAttribute(AttributeTargets.Class, AllowMultiple = true, 
	Inherited = true)]
public sealed class ProvideToolWindowVisibilityAttribute : RegistrationAttribute

NameDescription
System_CAPS_pubmethodProvideToolWindowVisibilityAttribute(Object, String)

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

NameDescription
System_CAPS_pubpropertyCommandUIGuid

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

System_CAPS_pubpropertyName

Gets or sets the name of the window.

System_CAPS_pubpropertyTypeId

Gets the current instance of this attribute.(Inherited from RegistrationAttribute.)

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.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top
Show: