---
id: "T:cAlgo.API.WindowIsVisibleChangedEventArgs"
kind: "class"
namespace: "cAlgo.API"
url: "https://help.ctrader.com/ctrader-algo/references/EventArgs/WindowIsVisibleChangedEventArgs/"
---

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

# WindowIsVisibleChangedEventArgs (class)

Provides data for WindowIsVisibleChanged event handlers

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).

## Definition

```csharp
public class WindowIsVisibleChangedEventArgs
```

## Examples

C#:

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

private void OnWindowIsVisibleChanged(WindowIsVisibleChangedEventArgs args)
{
    Print("Window {0} visibility changed from {1} to {2}", args.Window.Title, args.OldValue, args.NewValue);
}
```

Python:

```python
def on_start(self):
    text_block = TextBlock()
    text_block.Text = "Hello"
    window = Window()
    window.Title = "Trade Panel"
    window.Width = 300
    window.Height = 200
    window.Child = text_block
    window.IsVisibleChanged += self.on_window_is_visible_changed
    window.Show()

def on_window_is_visible_changed(self, args):
    api.Print(f"Window {args.Window.Title} visibility changed from {args.OldValue} to {args.NewValue}")
```

## Properties

- `public bool NewValue {get;}` — The value of window IsVisible property after got changed [details](https://help.ctrader.com/ctrader-algo/references/EventArgs/WindowIsVisibleChangedEventArgs/NewValue/index.md)
- `public bool OldValue {get;}` — The value of window IsVisible property before got changed [details](https://help.ctrader.com/ctrader-algo/references/EventArgs/WindowIsVisibleChangedEventArgs/OldValue/index.md)
- `public Window Window {get;}` — The window which it is IsVisible property got changed [details](https://help.ctrader.com/ctrader-algo/references/EventArgs/WindowIsVisibleChangedEventArgs/Window/index.md)

