Document Outline


The Document Outline window exposes a hierarchical view of elements residing on a Windows form or web form. This window is a fantastic tool for "reparenting" form items or changing the z-order of a control within its parent. In addition, it assists with understanding the exact logical structure of a form that may have a lot happening on it from a visual perspective.

Figures 5.17 and 5.18 show the Document Outline windows for a simple web form and a slightly more complicated Windows form.

Figure 5.17. A web form.


Figure 5.18. A Windows form.


The Document Outline toolbar allows you to control the display of the types within the tree view and also facilitates reordering and repositioning elements within the outline. Table 5.13 shows the toolbar commands available in the Document Outline window.

Table 5.13. Document Outline Toolbar Commands

Icon

Description

Type Name Display Style. This drop-down button allows you to control how type names are displayed in the tree-view:

  • None No type names are displayed.

  • Short The local, unqualified type name is displayed.

  • Long The fully qualified type name is displayed.

Expand All. Causes all of the parent nodes to expand.

Collapse All. Causes all of the parent nodes to collapse.

Move Down in Container. Moves the currently selected item down one place within its order in the current container.

Move Up in Container. Moves the currently selected item up one place within its order in the current container.

Move Out of Current Container. Moves the currently selected item out of its current container and places it in the next, higher container (or within the root level if no container exists).

Move into Next Container. Moves the currently selected item out of its current container (or root level) and into the next container.


Editing Elements

The Document Outline makes it easy to instantly jump from the hierarchical element view directly to the underlying code for an item. If an item is currently being edited in the designer/code window, it will be highlighted within the outline tree. Conversely, selecting an item within the outline view will cause the item to be selected/highlighted within the designer/code window.

Besides the toolbar commands in Table 5.13, you can use drag-and-drop actions within the tree view to move elements around in the outline.




Microsoft Visual Studio 2005 Unleashed
Microsoft Visual Studio 2005 Unleashed
ISBN: 0672328194
EAN: 2147483647
Year: 2006
Pages: 195

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net