共用方式為


Document windows

Applies to: yesVisual Studio noVisual Studio for Mac

Note

This article applies to Visual Studio 2017. If you're looking for the latest Visual Studio documentation, see Visual Studio documentation. We recommend upgrading to the latest version of Visual Studio. Download it here

In Visual Studio, a document window is a framed child window that is associated with a multiple-document interface (MDI) window. Document windows are typically used for the display and modification of source code or text, but they can also host other functional types. Document windows:

  • Can be organized in separate horizontal or vertical tab groups in the parent MDI so that multiple files can be viewed at the same time.

  • Can be docked in any order in the parent MDI.

  • Can be floated freely.

  • Are linked in tab order to other MDI windows.

    The commands for grouping, docking, and floating can be found on the shortcut menu for a document window tab.

    For more information about window behavior in Visual Studio, see Customize window layouts.

Document window implementation

Document windows are created by implementing an editor. The IVsEditorFactory interface creates document windows as part of instantiating an editor. For more information, see Legacy interfaces in the editor.

Note

To provide backward and forward navigation points in a window, implement the IVsBackForwardNavigation interface. The text editor uses text markers to identify navigation points in the document.

The Running document table

The IDE uses the Running document table (RDT) to track the status of every document window. The RDT is the mechanism through which document windows are notified of events, such as when a solution is closed or when a file has been edited. For more information, see Running document table.

See also