Skip to content

WindowClosedEventArgs

class cAlgo.API

DesktopCLICloud

Provides data for WindowClosed event handlers

Environment behaviour

CLI — not supported. Never raised in the CLI: the events that pass it never fire there (Window.Closed).

Cloud — not supported. Never raised in the cloud: the events that pass it never fire there (Window.Closed).

Definition

public class WindowClosedEventArgs

Namespace: cAlgo.API · Group: EventArgs

Examples

protected override void OnStart()
{
    var window = new Window { Title = "Trade Panel", Width = 300, Height = 200, Child = new TextBlock { Text = "Hello" } };
    window.Closed += OnWindowClosed;
    window.Show();
}

private void OnWindowClosed(WindowClosedEventArgs args)
{
    Print("Window {0} closed", args.Window.Title);
}
def on_start(self):
    text_block = TextBlock()
    text_block.Text = "Hello"
    window = Window()
    window.Title = "Trade Panel"
    window.Width = 300
    window.Height = 200
    window.Child = text_block
    window.Closed += self.on_window_closed
    window.Show()

def on_window_closed(self, args):
    api.Print(f"Window {args.Window.Title} closed")

Properties

Name Description
WindowDesktopCLICloudWindow The window the got closed

See also