Skip to content

Window.Close

method · Window · cAlgo.API

DesktopCLICloud

Closes the 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 void Close()
window.Close() -> None

Examples

var window = new Window { Title = "Confirm", Width = 250, Height = 120 };
var okButton = new Button { Text = "OK" };
okButton.Click += args => window.Close();
window.Child = okButton;
window.Show();
window = Window()
window.Title = "Confirm"
window.Width = 250
window.Height = 120
okButton = Button()
okButton.Text = "OK"
okButton.Click += lambda args: window.Close()
window.Child = okButton
window.Show()