Arvo Bowen
Arvo Bowen

Reputation: 4929

Show different windows when editing a form vs editing a class

When in Visual Studio 2010 is it possible to have presets on window layouts? I would like to have VS auto show/hide windows depending on what type of document I'm viewing at the time. For example...

When editing a FORM I want to see the following windows in the IDE

When editing a CLASS I want to see the following windows in the IDE

It would also be acceptable to simply have a quick way to change layouts manually instead of it happening automatically based on the type of document I'm viewing at the time.

Upvotes: 1

Views: 37

Answers (1)

Arvo Bowen
Arvo Bowen

Reputation: 4929

Just found the answer after some helpful feedback from CodingGorilla!

Solution:

Install the Layouts O Rama Visual Studio extension. enter image description here

How To Install The Extension:

  1. Open up Tools -> Extension Manager
  2. On the left, click on Online Gallery
  3. On the top right click in the Search Online Gallery text box.
  4. Search for Layouts O Rama
  5. Click install
  6. Restart Visual Studio

The new options will be located under the Tools menu. enter image description here

How To Assign Shortcuts To Access The Layouts Quickly

Once you set all your layouts up with Save Windows Layout for each layout, you can then assign some keyboard shortcuts to each layout for quick access!

  1. Open Tools -> Layouts O Rama Window
  2. Click the little lightning bolt at the top
  3. Setup your layouts for quick access. For me personally I just set 1 to my layout Code Layout and 2 to my layout Design Layout
  4. Close the Layouts O Rama Window window
  5. Open Tools -> Options
  6. Find Enviroment -> Keyboard on the left side
  7. In the Show commands containing: text box to the right type windowslayout
  8. For each Tools.LoadWindowsLayout (0-9) do the following steps 9-12
  9. Click on Tools.LoadWindowsLayout0 (0 should be the number layout you are working with ex: 0, 1, 2, 3, 4, 5, 6, 7, 8 or 9)
  10. Click in the Press shortcut keys: text box
  11. Press Ctrl+W then press 0 (0 should be the number layout you are working with ex: 0, 1, 2, 3, 4, 5, 6, 7, 8 or 9)
  12. Click the Assign button

enter image description here

Upvotes: 2

Related Questions