---
id: "P:cAlgo.API.WindowIsVisibleChangedEventArgs.OldValue"
kind: "property"
type: "T:cAlgo.API.WindowIsVisibleChangedEventArgs"
url: "https://help.ctrader.com/ctrader-algo/references/EventArgs/WindowIsVisibleChangedEventArgs/OldValue/"
---

> Documentation index for agents: https://help.ctrader.com/ctrader-algo/llms.txt · machine index: https://help.ctrader.com/ctrader-algo/api.json

# WindowIsVisibleChangedEventArgs.OldValue

Member of [WindowIsVisibleChangedEventArgs](https://help.ctrader.com/ctrader-algo/references/EventArgs/WindowIsVisibleChangedEventArgs/index.md).

## OldValue

The value of window IsVisible property before got changed

Environments: Desktop supported · CLI not supported · Cloud not supported.

- CLI: Never raised in the CLI: the events that pass it never fire there (Window.IsVisibleChanged).
- Cloud: Never raised in the cloud: the events that pass it never fire there (Window.IsVisibleChanged).

C#:

```csharp
public bool OldValue {get;}
```

Python:

```python
windowIsVisibleChangedEventArgs.OldValue: bool
```

### Returns

`bool` — 

### Examples

C#:

```csharp
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);
}
```

Python:

```python
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")
```

