New to Telerik UI for WinForms? Download free 30-day trial

Document Manager

The DocumentManager object manages all DockWindows that are parented in the main DocumentCountainer of RadDock. A Document (a window which is parented in a DocumentContainer) is either a DocumentWindow instance or a ToolWindow, that has its current DockState set to DockState.TabbedDocument. The DocumentManager exposes several important properties which will allow you to easily customize the way Documents behave in the MainDocumentContainer.


This property allows you to get the currently active document among the documents in a RadDock instance. This property is not equal to the ActiveWindow property, because the currently active window can be a ToolWindow, but still there will be one document that is active among the rest of the documents. For example, in the screenshot below the ActiveWindow is ToolWindow1, but the ActiveDocument of DocumentManager is DocumentWindow3:


Get the active DocumentWindow\ToolWindow

DockWindow activeDocument = this.radDock1.DocumentManager.ActiveDocument; //documentWindow2
DockWindow activeWindow = this.radDock1.ActiveWindow; //toolWindow2
//set active window/document
this.radDock1.ActiveWindow = activeDocument;

Dim activeDocument As DockWindow = Me.RadDock1.DocumentManager.ActiveDocument 'documentWindow2
Dim activeWindow As DockWindow = Me.RadDock1.ActiveWindow 'toolWindow2


Determines whether the currently active document's Text will be displayed in bold Font in its corresponding TabItem. The ActiveDocument in the screenshot below is DocumentWindow2, but its text is not bold due to setting the BoldActiveDocument to false:

Use the BoldActiveDocument property

this.radDock1.DocumentManager.BoldActiveDocument = false;

Me.RadDock1.DocumentManager.BoldActiveDocument = False


Gets or sets the insert order to be used when adding new documents. By default, the insert order is set to InFront and the behavior resembles the behavior of VisualStudio. The screenshot below shows what happens after three clicks on the Add Document button when DocumentInsertOrder is set to Default or InFront:

Set the DocumentInsertOrder property

this.radDock1.DocumentManager.DocumentInsertOrder = DockWindowInsertOrder.InFront;

Me.RadDock1.DocumentManager.DocumentInsertOrder = DockWindowInsertOrder.InFront

Figure 1: New DocumentWindows are inserted before the firs window.

dock-architecture-and-features-document-manager 002

The other available option for this property is ToBack. The behavior of DocumentTabStrip in this case resembles the behavior of most web browsers. The screenshot below demonstrates what happens after three clicks on the AddDocument button:

Use the ToBack insert order

this.radDock1.DocumentManager.DocumentInsertOrder = DockWindowInsertOrder.ToBack;

Me.RadDock1.DocumentManager.DocumentInsertOrder = DockWindowInsertOrder.ToBack

Figure 2: New Document windows are inserted after the first window.

dock-architecture-and-features-document-manager 003 

See Also

In this article
Not finding the help you need? Improve this article