다음을 통해 공유


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
Assemblies:   Microsoft.VisualStudio.Shell (in Microsoft.VisualStudio.Shell.dll)
  Microsoft.VisualStudio.Shell.10.0 (in Microsoft.VisualStudio.Shell.10.0.dll)
  Microsoft.VisualStudio.Shell.9.0 (in Microsoft.VisualStudio.Shell.9.0.dll)

Syntax

‘선언
<AttributeUsageAttribute(AttributeTargets.Class, AllowMultiple := True, Inherited := True)> _
Public NotInheritable Class ProvideToolWindowVisibilityAttribute _
    Inherits RegistrationAttribute
‘사용 방법
Dim instance As ProvideToolWindowVisibilityAttribute
[AttributeUsageAttribute(AttributeTargets.Class, AllowMultiple = true, Inherited = true)]
public sealed class ProvideToolWindowVisibilityAttribute : RegistrationAttribute
[AttributeUsageAttribute(AttributeTargets::Class, AllowMultiple = true, Inherited = true)]
public ref class ProvideToolWindowVisibilityAttribute sealed : public RegistrationAttribute
[<SealedAttribute>]
[<AttributeUsageAttribute(AttributeTargets.Class, AllowMultiple = true, Inherited = true)>]
type ProvideToolWindowVisibilityAttribute =  
    class
        inherit RegistrationAttribute
    end
public final class ProvideToolWindowVisibilityAttribute extends RegistrationAttribute

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 VISIBILITY_SECTION – VISIBILITY_END section of its package's .ctc 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.

Inheritance Hierarchy

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

Thread Safety

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

See Also

Reference

ProvideToolWindowVisibilityAttribute Members

Microsoft.VisualStudio.Shell Namespace