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

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

# Button.Content

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

## Content

Gets or sets the content.

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

Python:

```python
button.Content: ControlBase
```

### Returns

`ControlBase` — 

### Examples

C#:

```csharp
var content = new StackPanel { Orientation = Orientation.Horizontal };
content.AddChild(new Ellipse { Width = 8, Height = 8, FillColor = Color.LimeGreen, Margin = 3 });
content.AddChild(new TextBlock { Text = "Buy" });
var button = new Button { Content = content };
Chart.AddControl(button);
```

Python:

```python
content = StackPanel()
content.Orientation = Orientation.Horizontal
dot = Ellipse()
dot.Width = 8
dot.Height = 8
dot.FillColor = Color.LimeGreen
label = TextBlock()
label.Text = "Buy"
content.AddChild(dot)
content.AddChild(label)
button = Button()
button.Content = content
api.Chart.AddControl(button)
```

