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.
Editing ElementsThe 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. |