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

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

# FrameDetachedEventArgs (class)

Provides data for the frame detached event.

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

- CLI: Available to plugins only, and plugins cannot run in the CLI.
- Cloud: Available to plugins only, and plugins cannot run in the cloud.

## Definition

```csharp
public class FrameDetachedEventArgs
```

## Examples

C#:

```csharp
protected override void OnStart()
{
    var frame = ChartManager.AddChartFrame("EURUSD", TimeFrame.Hour);
    frame.Detached += OnFrameDetached;
}

private void OnFrameDetached(FrameDetachedEventArgs args)
{
    Print("Frame {0} detached into its own window", args.Frame.Id);
}
```

Python:

```python
def on_start(self):
    frame = api.ChartManager.AddChartFrame("EURUSD", TimeFrame.Hour)
    frame.Detached += self.on_frame_detached

def on_frame_detached(self, args):
    api.Print(f"Frame {args.Frame.Id} detached into its own window")
```

## Properties

- `public Frame Frame {get;}` — Returns the frame. [details](https://help.ctrader.com/ctrader-algo/references/EventArgs/FrameDetachedEventArgs/Frame/index.md)

