Share via


Navigating the Element Hierarchy of a WPF Document

The Document Outline window is a useful tool to view a XAML document in a hierarchical fashion. You can use the Document Outline window to preview or select XAML elements.

Viewing Your Document in the Document Outline Window

The following are the ways that you can open the Document Outline window in a Windows Presentation Foundation (WPF) project.

  • On the View menu, point to Other Windows, and then select Document Outline.

  • Use the keyboard shortcut CTRL+ALT+T.

  • In Design view of the WPF Designer, right-click and select Document Outline on the shortcut menu.

  • Starting in Visual Studio 2008 SP1, in the lower-left corner of the WPF Designer, below XAML view and just to the left of the tag navigator, click the Document Outline button.

The Document Outline window displays the hierarchy of the document in a tree-style view with the root window or user control at the top and child elements underneath. You can view the hierarchy by expanding or collapsing the child elements. The name of an element is displayed in parentheses next to the element. Moving the mouse pointer over an element in the Document Outline window causes a rendered thumbnail of that element to appear in a pop-up window.

Selecting an element in the Document Outline window causes that element to be selected in Design view and XAML view of the WPF Designer.

Note

The Document Outline window does not allow you to reposition elements in the hierarchy.

See Also

Concepts

Split View: Viewing the WPF Design Surface and XAML at the Same Time

Other Resources

Using Resources

Change History

Date

History

Reason

July 2008

Added information about Document Outline button.

SP1 feature change.