WindowIsVisibleChangedEventArgs.OldValue
property · WindowIsVisibleChangedEventArgs · cAlgo.API
DesktopCLICloud
The value of window IsVisible property before 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 OldValue {get;}
windowIsVisibleChangedEventArgs.OldValue: 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.OldValue)
Print("Window {0} was hidden", 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.OldValue:
api.Print(f"Window {args.Window.Title} was hidden")