Table of Contents
Regular Dock View and Document View

A DockContainer can contain multiple DockViews. Each DockView can be a regular dock view or a document view. A DockView is a document view when its IsDocumentView property is set to true.

The main purpose of a document view is to host "document items" as oppose to various "tool items". For example, in Visual Studio, the main document area would be a "document view", which hosts multiple "document items", with each item hosting an editor to edit the corresponding document. In EO.Wpf terminology, the "document view" would be represented by a DockView whose IsDocumentView is set to true, while each document would be represented by a DocumentItem. Other items such as "Solution Explorer", "ToolBox", are all "tool items", these items are represented by regular DockItem objects and they can be grouped into multiple regular DockView objects (whose IsDocumentView is the default value false).

While both document view and regular dock view are represented by DockView object, they behave quite differently. The main differences between these two types of views are:

  • By default, a DockContainer's AllowMultiDocumentViews is set to false, which means a DockContainer can only have one document view at most. On the other hand, a DockContainer can have as many regular dock views as needed;
  • When the last DockItem in a regular DockView is closed, the DockView is automatically closed. On the contrary, when the last DockItem is a document view is closed, the document view does not close. The following image demonstrates this behavior:

  • When a document view contains multiple items, it creates a tab strip at the top of the view. For a regular dock view, the tab strip is created at the bottom of the view. The following image demonstrates this difference:

    The default styles for the tab buttons are also different for document view and regular dock views.

  • Only a document view can contain DocumentItem. While user can drag a regular DockItem into the document view, user can not drag a DocumentItem into a regular dock view;

Because of the uniqueness of a document view, a DockContainer usually should only have one document view even though EO.Wpf supports multiple document views. You can call GetDocumentView method to get the first document view, or GetDocumentViews method to get all document views.