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

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

# Border.Padding

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

## Padding

Gets or sets the border padding thickness. Property value can be set using Thickness, number, or a string new Thickness(5), new Thickness(1, 2, 3, 4), 5, "5", "1 2 3 4".

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 Thickness Padding {get; set;}
```

Python:

```python
border.Padding: Thickness
```

### Returns

`Thickness` — 

### Examples

C#:

```csharp
var border = new Border { BackgroundColor = Color.DarkSlateGray, Padding = new Thickness(10, 5, 10, 5) };
border.Child = new TextBlock { Text = "Padded content" };
Chart.AddControl(border);
```

Python:

```python
border = Border()
border.BackgroundColor = Color.DarkSlateGray
border.Padding = Thickness(10, 5, 10, 5)
textBlock = TextBlock()
textBlock.Text = "Padded content"
border.Child = textBlock
api.Chart.AddControl(border)
```

