Skip to content

WindowIsVisibleChangedEventArgs.NewValue

property · WindowIsVisibleChangedEventArgs · cAlgo.API

DesktopCLICloud

The value of window IsVisible property after got changed

Environment behaviour

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

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

Definition

public bool NewValue {get;}
windowIsVisibleChangedEventArgs.NewValue: bool

Returns bool

Examples

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

private void OnWindowIsVisibleChanged(WindowIsVisibleChangedEventArgs args)
{
    if (args.NewValue)
        Print("Window {0} is shown", args.Window.Title);
}
def on_start(self):
    window = Window()
    window.Title = "Trade Panel"
    window.Width = 300
    window.Height = 200
    window.IsVisibleChanged += self.on_window_is_visible_changed
    window.Show()

def on_window_is_visible_changed(self, args):
    if args.NewValue:
        api.Print(f"Window {args.Window.Title} is shown")