# AllowedDockStates

**AllowedDockState** property gives you the ability to determine the available dock states per **ToolWindow**. There are several options for this properties which can be combined by bitwise operations. For example:

## Allow two states only.

```C#
toolWindow1.AllowedDockState = AllowedDockState.Docked | AllowedDockState.Floating;
```

```VB.NET
toolWindow1.AllowedDockState = AllowedDockState.Docked Or AllowedDockState.Floating
```

This automatically will remove the caption buttons that may be responsible for an unwanted state, for example *Closed*. In addition, the unwanted menu items from the context menu will be disabled:

![WinForms RadDock AllowedDockStates](https://www.telerik.com/products/winforms/documentation/assets/84db9478aa97cdd60af976936815f361/dock-object-model-allowed-dock-states001.png)

The following setting will disable the **Floating** option:

## Disable the floating dock state

```C#
toolWindow1.AllowedDockState = ~AllowedDockState.Floating; 
```

```VB.NET
toolWindow1.AllowedDockState = Not AllowedDockState.Floating
```

![WinForms RadDock Disable the Floating Dock State](https://www.telerik.com/products/winforms/documentation/assets/282635f3ff8909afb836404eb6e4ff4f/dock-object-model-allowed-dock-states002.png)

## See Also

* [Accessing DockWindows](https://www.telerik.com/products/winforms/documentation/controls/dock/object-model/accessing-dockwindows)
* [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)
* [ToolWindow and DocumentWindow Properties and Methods](https://www.telerik.com/products/winforms/documentation/controls/dock/object-model/toolwindow-and-documentwindow-properties-and-methods)
* [Tracking the ActiveWindow](https://www.telerik.com/products/winforms/documentation/controls/dock/object-model/tracking-the-activewindow)
