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

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

# TabItem.Content

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

### Returns

`ControlBase` — 

Available since cAlgo.API 5.2.

### Examples

C#:

```csharp
var content = new StackPanel();
foreach (var position in Positions)
    content.AddChild(new TextBlock { Text = position.SymbolName + ": " + position.NetProfit });
var tabItem = new TabItem { Header = new TextBlock { Text = "Positions" }, Content = content };
var tabControl = new TabControl();
tabControl.AddTab(tabItem);
Chart.AddControl(tabControl);
```

Python:

```python
content = StackPanel()
for position in api.Positions:
    row = TextBlock()
    row.Text = f"{position.SymbolName}: {position.NetProfit}"
    content.AddChild(row)
header = TextBlock()
header.Text = "Positions"
tabItem = TabItem()
tabItem.Header = header
tabItem.Content = content
tabControl = TabControl()
tabControl.AddTab(tabItem)
api.Chart.AddControl(tabControl)
```

