Document Outline: Windows Form Projects

Keyboard:  CTRL + ALT + T
Menu:  View -> Other Windows -> Document Outline
Command:  View.DocumentOutline
Versions:  2008,2010
Published:  11/30/2010
Code:  vstipTool0118

 

The Document Outline is used to get a bird's eye view of items in your project.  I've already shown you how to use it with web projects (vstipTool0116 - https://blogs.msdn.com/b/zainnab/archive/2010/11/28/document-outline-web-projects-vstiptool0116.aspx) and WPF/Silverlight projects (vstipTool0117 - https://blogs.msdn.com/b/zainnab/archive/2010/11/29/document-outline-wpf-and-silverlight-projects-vstiptool0117.aspx)  now let's look at using it with Windows Form projects.

 

For this example, I've created a new Windows Forms Application and put a few sample controls on it.  Here is what the Document Outline (CTRL + ALT + T) looks like:

image

 

 

Selection

By clicking on any item in the list it will select the item on the Form in Design view:

image

 

 

 

Context Commands

Additionally, you can access a variety of commands by RIGHT CLICKING any item including renaming the control from the Document Outline:

image

image

 

 

 

View Code

You can also press F7 with any item selected to view the code for it but, interestingly, once you do, the Document Outline will not work while in Code view:

image

 

 

 

Relocate Items

The ability to move items from one container to another is supported as well:

image

 

 

 

Toolbar Controls

The toolbar supports a variety of functions:

 

Name Display

You an select different name display styles:

image

 

 

Expand / Collapse

You can expand or collapse the entire outline:

image

 

 

Moving Around

The toolbar even supports moving around within and between containers.  I'm personally not a big fan of them over just clicking and dragging but you may find them useful:

image