# Control Bar Position

You can use the ControlBar.PositionMode property to set the position mode of the ControlBar.

## Content



You can use the **ControlBar.PositionMode** property to set the position mode of the ControlBar.

When the **ControlBar.PositionMode** property value is set to **Dock**, the Control bar will dock in the parent form. When the parent form's size is changed, the control bar will adjust the position.

![setting the control bar position](https://cdn.mescius.io/document-site-files/images/b72f799f-5669-44a4-8119-5f3343d59999/images/controlbar_position.png)

If you want to make a space between the Form's border and the ControlBar, you can use the **ControlBar.Margin** property to make the space. The following table shows which property takes effect when the **DockPosition** is changed:

|   DockPosition   |   Margin   |
| --- | --- |
|   **TopLeft**   |   **Top, Left**   |
|   **TopCenter**   |   **Top**   |
|   **TopRight**   |   **Top, Right**   |
|   **MiddleLeft**   |   **Left**   |
|   **MiddleCenter**   |   **Not available**   |
|   **MiddleRight**   |   **Right**   |
|   **BottomLeft**   |   **Bottom, Left**   |
| **BottomCenter** | Bottom |
| **BottomRight** | Bottom, Right |

When the **ControlBar.PositionMode** property value is **Floating**, you can change the ControlBar's position by code or dragging it in the UI.

![control bar in floating mode](https://cdn.mescius.io/document-site-files/images/b72f799f-5669-44a4-8119-5f3343d59999/images/controlbar_floating.png)

When the **ControlBar.PositionMode** property value is **Fixed**, you can change the ControlBar's position by code, but you can't change it by dragging it in the UI.