---
id: "E:cAlgo.API.Window.IsVisibleChanged"
kind: "event"
type: "T:cAlgo.API.Window"
url: "https://help.ctrader.com/ctrader-algo/references/Controls/Windows/Window/IsVisibleChanged/"
---

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

# Window.IsVisibleChanged

Member of [Window](https://help.ctrader.com/ctrader-algo/references/Controls/Windows/Window/index.md).

## IsVisibleChanged

This event gets triggered when window visibility changes

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

- CLI: Never shown: Show, Hide and Close send nothing; IsVisible stays false and window events never fire.
- Cloud: Never shown: Show, Hide and Close send nothing; IsVisible stays false and window events never fire.

C#:

```csharp
public event Action<WindowIsVisibleChangedEventArgs> IsVisibleChanged;
```

Python:

```python
window.IsVisibleChanged += handler  # handler(obj: WindowIsVisibleChangedEventArgs)
```

### Returns

`Action<WindowIsVisibleChangedEventArgs>` — 

### Examples

C#:

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

Python:

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

