This documentation is archived and is not being maintained.

How to: Create a Tool Window (C#)

The Visual Studio Integration Package Wizard creates a boilerplate implementation of a simple tool window and the VSPackage that provides it.

To create a tool window by using the Visual Studio Integration Package Wizard

  1. On the File menu, point to New, and then click Project.

  2. In the New Project dialog box, expand Other Project Types, and click Extensibility.

  3. In the Templates pane click Visual Studio Integration Package.

  4. In the Location box, type the file path for your VSPackage.

  5. In the Name box, type the name for the solution and click OK to start the wizard.

  6. On the Select a Programming Language page, select C#. Have the wizard generate a key.snk file to sign the assembly. Alternately, Browse to your own key file. The wizard makes a copy of your key file and names it key.snk.

  7. On the Basic VSPackage Information page, specify any details about the VSPackage or accept the defaults. For more information, see How to: Create VSPackages (C# and Visual Basic).

  8. On the Select VSPackage Options page, check Tool Window.

  9. On the Tool Window Options page, type the name for the title bar in the Window Name box. This name is also used as display text for the menu command for your tool window. The menu command is added to the Other Windows submenu on the View menu. Type the command ID for your tool window in the Command ID box, or accept the default.

  10. Click Finish to create your VSPackage in the folder that you specified.

To test your tool window

  1. On the View menu, point to Other Windows, and then click your tool window command. A tool window with a Click Me! button appears.

  2. Click the button. A message appears with the text:

    We are inside [Company.<VSPackage name>.MyControl].button1_Click().