# ToolWindow and DocumentWindow Properties and Methods

## Properties

**ToolWindow** and **DocumentWindow** both implement the same interfaces, such as **IDockWindow** and have a common set of properties even though their runtime behavior differs.

* **AllowedDockState:** Specifies the allowed dock states for a **DockWindow**.

* **DockState:** Specifies the current state of the **DockWindow**. You can set **DockState** to **Docked**, **Floating**, **AutoHide**, **Hidden**, **TabbedDocument**.

* **DockType:** This read-only property contains one of the **Telerik.WinControls.Dock.DockType** enumeration members **ToolWindow** (for **ToolWindow**) or **Document** (for **DocumentWindow**).

* **Name:** This property uniquely identifies each dock panel or tabbed document. Use this property when saving and restoring content. See [Loading and Saving Layouts](https://www.telerik.com/products/winforms/documentation/controls/dock/loading-and-saving-layouts/loading-and-saving-layouts) for more information.

* **Image:** Used to assign an image that displays in the tab for the **ToolWindow** or **DocumentWindow**.

* **Text:** Specifies the text to display in the caption bar at the top of the **ToolWindow** and on the tab at the bottom of the **ToolWindow**.

## Methods

* **Close:** Closes a **ToolWindow** or a **DocumentWindow**. The **ToolWindow**/**DocumentWindow** can be just hidden or directly disposed. This depends on its default behavior and the **CloseAction** property. For additional information refer to [Removing ToolWindow and DocumentWindow at Runtime](https://www.telerik.com/products/winforms/documentation/controls/dock/object-model/removing-toolwindow-and-documentwindow-at-runtime).

* **Show:** Shows a hidden **ToolWindow** or **DocumentWindow**.

* **DockTo(DockWindow window, DockPosition dockPosition):** Docks a window with another window in the same container. The example below docks "Bottom Window" to the container of "Top Window".

  ![WinForms RadDock DockTo Method](https://www.telerik.com/products/winforms/documentation/assets/b0efa74476110db0e6050ec465cd84d3/dock-object-model-toolwindow-and-documentwindow-properties-at-runtime001.png)

#### Using DockTo()

```C#
toolWindow2.DockTo(toolWindow1, DockPosition.Fill);
```

```VB.NET
toolWindow2.DockTo(ToolWindow1, DockPosition.Fill)
```

## See Also

* [AllowedDockStates](https://www.telerik.com/products/winforms/documentation/controls/dock/object-model/alloweddockstates)
* [Creating a RadDock at Runtime](https://www.telerik.com/products/winforms/documentation/controls/dock/object-model/creating-a-raddock-at-runtime)
* [ Creating ToolWindow and DocumentWindow at Runtime](https://www.telerik.com/products/winforms/documentation/controls/dock/object-model/creating-toolwindow-and-documentwindow-at-runtime)
* [Customizing Floating Windows](https://www.telerik.com/products/winforms/documentation/controls/dock/object-model/customizing-floating-windows)
* [Customizing TabStrip Items](https://www.telerik.com/products/winforms/documentation/controls/dock/object-model/customizing-tabstrip-items)
* [Building an Advanced Layout at Runtime](https://www.telerik.com/products/winforms/documentation/controls/dock/object-model/example-building-an-advanced-layout-at-runtime)
* [RadDock Properties and Methods](https://www.telerik.com/products/winforms/documentation/controls/dock/object-model/raddock-properties-and-methods)
* [Removing ToolWindow and DocumentWindow at Runtime](https://www.telerik.com/products/winforms/documentation/controls/dock/object-model/removing-toolwindow-and-documentwindow-at-runtime)
* [Tabs and Captions](https://www.telerik.com/products/winforms/documentation/controls/dock/object-model/tabs-and-captions)
* [Accessing DockWindows](https://www.telerik.com/products/winforms/documentation/controls/dock/object-model/accessing-dockwindows)
* [Tracking the ActiveWindow](https://www.telerik.com/products/winforms/documentation/controls/dock/object-model/tracking-the-activewindow)
