Skip to content

WindowActivatedEventArgs

class cAlgo.API

DesktopCLICloud

Provides data for WindowActivated event handlers

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 class WindowActivatedEventArgs

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.Activated += OnWindowActivated;
    window.Show();
}

private void OnWindowActivated(WindowActivatedEventArgs args)
{
    Print("Window {0} activated", 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.Activated += self.on_window_activated
    window.Show()

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

Properties

Name Description
WindowDesktopCLICloudWindow The Window that got activated

See also