Tool Window Essentials

Tools windows are child windows of the Visual Studio integrated development environment (IDE) that are used to display information. The Toolbox, Solution Explorer, Properties Window, and Web Browser are examples of tool windows provided by the IDE.

  • Tool windows typically do not have associated documents. For more information on associating a document with a window, see Document Windows.

  • Tool windows typically are single-instance windows, such as the Toolbox and Properties windows. For information on multi-instanced tool windows, see the Multi-Instance Tool Window Sample.

  • Tool windows are typically created or opened from a menu command. To create a tool window programmatically, see How to: Open a Tool Window Programmatically (C#).

  • Once opened, a single-instance tool window remains open until the IDE closes. When you close a single-instance tool window, only its visibility changes.

  • Tool windows have frames and client areas. The frame is provided by the Visual Studio IDE and controls the size, location, docking state, and other persistent properties. The client area or pane displays the tool window contents.

  • Tool window panes can host .NET user controls and support toolbars. You can override the Window property to return the handle of the hosted control. For more information, see Reference.ToolWindow (C#).

  • Tool window panes can subscribe to window events like OnShow, OnMove, OnSize, and so on.

  • A VSPackage that provides tool windows registers each tool window with Visual Studio, along with its default size and location. For more information, see Registering Tool Windows.

    Nota

    Default size and location apply only when the tool window is first opened. Thereafter, the tool window state is persisted by Visual Studio.

  • Tool windows can be docked, floating, or tabbed in the document frame.

  • Tool windows can be dynamic, also called auto-visible. In this state, the tool window is visible whenever the user interface (UI) context to which the window is assigned applies. Auto-visibility can reduce the clutter of windows in the IDE. For more information, see How to: Open a Dynamic Tool Window.

Nota

VSIP extensibility is not the only way to create a tool window. Add-ins can create a tool window through the Visual Studio Automation model.

See Also

Concepts

Tool Windows