Skip to content

Window.IsVisibleChanged

event · Window · cAlgo.API

DesktopCLICloud

This event gets triggered when window visibility changes

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 event Action<WindowIsVisibleChangedEventArgs> IsVisibleChanged;
window.IsVisibleChanged += handler  # handler(obj: WindowIsVisibleChangedEventArgs)

Examples

var window = new Window { Title = "Watch list", Width = 300, Height = 200 };
window.IsVisibleChanged += args => Print("Visibility changed from {0} to {1}", args.OldValue, args.NewValue);
window.Show();
window.Hide();
def on_start(self):
    window = Window()
    window.Title = "Watch list"
    window.IsVisibleChanged += self.on_is_visible_changed
    window.Show()

def on_is_visible_changed(self, args):
    api.Print(f"Visibility changed from {args.OldValue} to {args.NewValue}")