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

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

# WindowActivatedEventArgs.Window

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

## Window

The Window that got activated

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

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

C#:

```csharp
public Window Window {get;}
```

Python:

```python
windowActivatedEventArgs.Window: Window
```

### Returns

`Window` — 

### Examples

C#:

```csharp
protected override void OnStart()
{
    var window = new Window { Title = "Trade Panel", Width = 300, Height = 200 };
    window.Activated += OnWindowActivated;
    window.Show();
}

private void OnWindowActivated(WindowActivatedEventArgs args)
{
    Print("Window is active: {0}, state: {1}", args.Window.IsActive, args.Window.WindowState);
}
```

Python:

```python
def on_start(self):
    window = Window()
    window.Title = "Trade Panel"
    window.Width = 300
    window.Height = 200
    window.Activated += self.on_window_activated
    window.Show()

def on_window_activated(self, args):
    api.Print(f"Window is active: {args.Window.IsActive}, state: {args.Window.WindowState}")
```

