Skip to content

WindowActivatedEventArgs.Window

property · WindowActivatedEventArgs · cAlgo.API

DesktopCLICloud

The Window that got activated

Environment behaviour

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

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

Definition

public Window Window {get;}
windowActivatedEventArgs.Window: Window

Returns Window

Examples

protected override void OnStart()
{
    var window = new Window { Title = "Trade Panel", Width = 300, Height = 200 };
    window.Activated += OnWindowActivated;
    window.Show();
}

private void OnWindowActivated(WindowActivatedEventArgs args)
{
    Print("Window is active: {0}, state: {1}", args.Window.IsActive, args.Window.WindowState);
}
def on_start(self):
    window = Window()
    window.Title = "Trade Panel"
    window.Width = 300
    window.Height = 200
    window.Activated += self.on_window_activated
    window.Show()

def on_window_activated(self, args):
    api.Print(f"Window is active: {args.Window.IsActive}, state: {args.Window.WindowState}")