---
id: "T:cAlgo.API.DetachedWindow"
kind: "interface"
namespace: "cAlgo.API"
url: "https://help.ctrader.com/ctrader-algo/references/Controls/Windows/DetachedWindow/"
---

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

# DetachedWindow (interface)

Used to represent the properties of a detached window.

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

- CLI: Values start at 0 and are only stored in the algo; no window is read or changed.
- Cloud: Values start at 0 and are only stored in the algo; no window is read or changed.

## Definition

```csharp
public interface DetachedWindow
```

## Remarks

Its being used by UI components that can be detached on a separate window and algos can use it to manage that detached window.

## Examples

C#:

```csharp
var block = Asp.SymbolTab.AddBlock("Risk calculator");
var detachedWindow = block.DetachedWindow;
detachedWindow.Width = 400;
detachedWindow.Height = 300;
detachedWindow.ResizeMode = ResizeMode.CanResize;
detachedWindow.WindowStartupLocation = WindowStartupLocation.CenterScreen;
Print("Detached window size: {0}x{1}", detachedWindow.Width, detachedWindow.Height);
```

Python:

```python
block = api.Asp.SymbolTab.AddBlock("Risk calculator")
detachedWindow = block.DetachedWindow
detachedWindow.Width = 400
detachedWindow.Height = 300
detachedWindow.ResizeMode = ResizeMode.CanResize
detachedWindow.WindowStartupLocation = WindowStartupLocation.CenterScreen
api.Print(f"Detached window size: {detachedWindow.Width}x{detachedWindow.Height}")
```

## Properties

- `double Height {get; set;}` — Get / Set height of the Window [details](https://help.ctrader.com/ctrader-algo/references/Controls/Windows/DetachedWindow/Height/index.md)
- `double Left {get; set;}` — Get / Set window left margin (X) [details](https://help.ctrader.com/ctrader-algo/references/Controls/Windows/DetachedWindow/Left/index.md)
- `double MaxHeight {get; set;}` — Get / Set the window maximum height [details](https://help.ctrader.com/ctrader-algo/references/Controls/Windows/DetachedWindow/MaxHeight/index.md)
- `double MaxWidth {get; set;}` — Get / Set the window maximum width [details](https://help.ctrader.com/ctrader-algo/references/Controls/Windows/DetachedWindow/MaxWidth/index.md)
- `double MinHeight {get; set;}` — Get / Set the window minimum height [details](https://help.ctrader.com/ctrader-algo/references/Controls/Windows/DetachedWindow/MinHeight/index.md)
- `double MinWidth {get; set;}` — Get / Set the window minimum width [details](https://help.ctrader.com/ctrader-algo/references/Controls/Windows/DetachedWindow/MinWidth/index.md)
- `ResizeMode ResizeMode {get; set;}` — Get / Set the window resize mode [details](https://help.ctrader.com/ctrader-algo/references/Controls/Windows/DetachedWindow/ResizeMode/index.md)
- `double Top {get; set;}` — Get / Set window top margin (Y) [details](https://help.ctrader.com/ctrader-algo/references/Controls/Windows/DetachedWindow/Top/index.md)
- `double Width {get; set;}` — Get / Set width of the window [details](https://help.ctrader.com/ctrader-algo/references/Controls/Windows/DetachedWindow/Width/index.md)
- `WindowStartupLocation WindowStartupLocation {get; set;}` — Get / Set the window startup location [details](https://help.ctrader.com/ctrader-algo/references/Controls/Windows/DetachedWindow/WindowStartupLocation/index.md)

