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

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

# ToggleButton.Content

Member of [ToggleButton](https://help.ctrader.com/ctrader-algo/references/Controls/ToggleButton/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
toggleButton.Content: ControlBase
```

### Returns

`ControlBase` — 

### Examples

C#:

```csharp
var content = new StackPanel { Orientation = Orientation.Horizontal };
content.AddChild(new Rectangle { Width = 8, Height = 8, FillColor = Color.Orange, Margin = 3 });
content.AddChild(new TextBlock { Text = "Alerts" });
var toggleButton = new ToggleButton { Content = content };
Chart.AddControl(toggleButton);
```

Python:

```python
content = StackPanel()
content.Orientation = Orientation.Horizontal
label = TextBlock()
label.Text = "Alerts"
content.AddChild(label)
toggleButton = ToggleButton()
toggleButton.Content = content
api.Chart.AddControl(toggleButton)
```

