Log In
Home
Support
Demos
Documentation
Blogs
Training
Webinars
[Expand]General Information
[Collapse]WinForms Controls
  Prerequisites
 [Expand]What's Installed
 [Expand]Build an Application
 [Collapse]Controls and Libraries
  [Expand]Forms and User Controls
  [Expand]Messages, Notifications and Dialogs
  [Expand]Editors and Simple Controls
  [Expand]Ribbon, Bars and Menu
  [Collapse]Application UI Manager
   [Expand]Views
    Documents
   [Expand]Deferred Load
   [Expand]Interaction with Dock Panels
   [Expand]Bar and Ribbon Merging
   [Expand]Examples
  [Expand]Docking Library
  [Expand]Data Grid
  [Expand]Vertical Grid
  [Expand]Pivot Grid
  [Expand]Tree List
  [Expand]Chart Control
  [Expand]Diagrams
  [Expand]Gauges
  [Expand]Map Control
  [Expand]Scheduler
  [Expand]Spreadsheet
  [Expand]Rich Text Editor
  [Expand]Spell Checker
  [Expand]Form Layout Managers
  [Expand]Navigation Controls
  [Expand]Printing-Exporting
  [Expand]PDF Viewer
   Reporting
  [Expand]Snap
  [Expand]TreeMap Control
 [Expand]Common Features
  Get More Help
 [Expand]API Reference
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Document Server
[Expand]Reporting
[Expand]Report Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]CodeRush
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

Documents

Documents are content wrappers that feature different appearance and behavior depending on their parent View.

Expanded Parent Classes

Each View manages Documents of different classes, which all derive from the base BaseDocument class.

Expanded Content Types

Documents can wrap the following content:

Expanded Add and Populate Documents

There are several ways to add a Document to a View.

Important

The Document Manager identifies its child documents by the names of controls hosted within these documents. Thus, it is recommended that you set unique names for these controls. Failure to comply with this recommendation will result in an exception for certain scenarios (e.g., saving and restoring a View layout).

Expanded Pre-Customize Documents

Most Document Manager Views provide the DocumentSettings class that allows you to customize the document before it is created and shown. To do so, use the static Attach method to attach an instance of the DocumentSettings class to document content. The code snippet below illustrates an example.

This code will result in adding a document that has a ready-set caption, float location and size.

Expanded Example: Adding Documents at Runtime

Show Me

A complete sample project is available in the DevExpress Code Examples database at http://www.devexpress.com/example=E3912.

This example shows how a control can be added to the DocumentManager as a document. The application creates a new RichEditControl and docks it as a tab to DocumentManager each time the 'Add Tabbed Document' button is clicked. A click on the 'Add Float Document' button results in adding a floating document that contains a new RichEditControl object. For every RichEditControl a Document object is created. The figure below shows the result:

A click on the 'Remove All' button closes all documents within the view.

The DocumentManager uses the Tabbed View UI.

How would you rate this topic?​​​​​​​