Skip to content

Panel.ChildCount

property · Panel · cAlgo.API Since 5.4

DesktopCLICloud

Gets count of panel children.

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 int ChildCount {get;}
panel.ChildCount: int

Returns int

Examples

var panel = new StackPanel();
foreach (var position in Positions)
    panel.AddChild(new TextBlock { Text = position.SymbolName + " " + position.NetProfit });
Chart.AddControl(panel);
Print("Rows: {0}", panel.ChildCount);
panel = StackPanel()
for position in api.Positions:
    row = TextBlock()
    row.Text = f"{position.SymbolName} {position.NetProfit}"
    panel.AddChild(row)
api.Chart.AddControl(panel)
api.Print(f"Rows: {panel.ChildCount}")