Window.Child
property · Window · cAlgo.API
DesktopCLICloud
Get / Set the main content control of window
Environment behaviour
CLI — not supported. Never shown: Show, Hide and Close send nothing; IsVisible stays false and window events never fire.
Cloud — not supported. Never shown: Show, Hide and Close send nothing; IsVisible stays false and window events never fire.
Definition
public ControlBase Child {get; set;}
window.Child: ControlBase
Returns ControlBase
Examples
var panel = new StackPanel { Margin = 10 };
panel.AddChild(new Button { Text = "Buy" });
panel.AddChild(new Button { Text = "Sell" });
var window = new Window { Title = "Orders", Child = panel };
window.Show();
panel = StackPanel()
for text in ["Buy", "Sell"]:
button = Button()
button.Text = text
panel.AddChild(button)
window = Window()
window.Title = "Orders"
window.Child = panel
window.Show()