# Sandbox.UI.DockHost.Register

## Overload 1

```csharp
DockItem Register(string id, string title, Panel content, bool canClose = True, string icon = null)
```

Registers content, initially closed. A panel instance can belong to only one registration.

### Parameters

- `id` (`string`)
- `title` (`string`)
- `content` (`Panel`)
- `canClose` (`bool`), default `True`
- `icon` (`string`), default `null`

### Returns

`DockItem`

## Overload 2

```csharp
DockItem Register(string id, string title, System.Func<Panel> create, bool canClose = True, string icon = null)
```

### Parameters

- `id` (`string`)
- `title` (`string`)
- `create` (`System.Func<Panel>`)
- `canClose` (`bool`), default `True`
- `icon` (`string`), default `null`

### Returns

`DockItem`

Declared in [Sandbox.UI.DockHost](/api/Sandbox.UI.DockHost).
Assembly: `Sandbox.Engine`.
