TabItem.Content
property · TabItem · cAlgo.API Since 5.2
DesktopCLICloud
Gets or sets the content.
Environment behaviour
CLI — not supported. Accepted without error but never displayed, so control events such as Click are never raised.
Cloud — not supported. Accepted without error but never displayed, so control events such as Click are never raised.
Definition
public ControlBase Content {get; set;}
tabItem.Content: ControlBase
Returns ControlBase
Examples
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);
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)