---
id: "P:cAlgo.API.DropZone.IsDirectoryDropAllowed"
kind: "property"
type: "T:cAlgo.API.DropZone"
url: "https://help.ctrader.com/ctrader-algo/references/Controls/DropZone/IsDirectoryDropAllowed/"
---

> Documentation index for agents: https://help.ctrader.com/ctrader-algo/llms.txt · machine index: https://help.ctrader.com/ctrader-algo/api.json

# DropZone.IsDirectoryDropAllowed

Member of [DropZone](https://help.ctrader.com/ctrader-algo/references/Controls/DropZone/index.md).

## IsDirectoryDropAllowed

Gets or sets whether user can drop directories or not.

Environments: Desktop supported · CLI not supported · Cloud not supported.

- CLI: Accepted without error but never displayed, so control events such as Click are never raised.
- Cloud: Accepted without error but never displayed, so control events such as Click are never raised.

C#:

```csharp
public bool IsDirectoryDropAllowed {get; set;}
```

Python:

```python
dropZone.IsDirectoryDropAllowed: bool
```

### Returns

`bool` — 

Available since cAlgo.API 5.1.

### Examples

C#:

```csharp
var dropZone = new DropZone { Child = new TextBlock { Text = "Drop a folder" }, IsDirectoryDropAllowed = true };
Chart.AddControl(dropZone);
Print("Directories allowed: {0}", dropZone.IsDirectoryDropAllowed);
```

Python:

```python
dropZone = DropZone()
child = TextBlock()
child.Text = "Drop a folder"
dropZone.Child = child
dropZone.IsDirectoryDropAllowed = True
api.Chart.AddControl(dropZone)
api.Print(f"Directories allowed: {dropZone.IsDirectoryDropAllowed}")
```

