---
id: "P:cAlgo.API.Window.IsVisible"
kind: "property"
type: "T:cAlgo.API.Window"
url: "https://help.ctrader.com/ctrader-algo/references/Controls/Windows/Window/IsVisible/"
---

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

# Window.IsVisible

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

## IsVisible

Get / Set the window visibility flag, if Yes then the window will be shown otherwise it will be hidden

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 bool IsVisible {get;}
```

Python:

```python
window.IsVisible: bool
```

### Returns

`bool` — 

### Examples

C#:

```csharp
var window = new Window { Title = "Toggle me", Width = 250, Height = 120 };
window.Show();
var toggleButton = new Button { Text = "Show / hide window" };
toggleButton.Click += args =>
{
    if (window.IsVisible)
        window.Hide();
    else
        window.Show();
};
Chart.AddControl(toggleButton);
```

Python:

```python
window = Window()
window.Title = "Toggle me"
window.Width = 250
window.Height = 120
window.Show()
toggleButton = Button()
toggleButton.Text = "Show / hide window"
toggleButton.Click += lambda args: window.Hide() if window.IsVisible else window.Show()
api.Chart.AddControl(toggleButton)
```

