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

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

# ControlBase.VerticalAlignment

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

## VerticalAlignment

Gets or sets the vertical alignment of the chart control instance.

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

Python:

```python
controlBase.VerticalAlignment: VerticalAlignment
```

### Returns

`VerticalAlignment` — 

### Examples

C#:

```csharp
var textBlock = new TextBlock { Text = "Bottom right", VerticalAlignment = VerticalAlignment.Bottom, HorizontalAlignment = HorizontalAlignment.Right };
Chart.AddControl(textBlock);
Print("Vertical alignment: {0}", textBlock.VerticalAlignment);
```

Python:

```python
textBlock = TextBlock()
textBlock.Text = "Bottom right"
textBlock.VerticalAlignment = VerticalAlignment.Bottom
textBlock.HorizontalAlignment = HorizontalAlignment.Right
api.Chart.AddControl(textBlock)
api.Print(f"Vertical alignment: {textBlock.VerticalAlignment}")
```

