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

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

# Window.MaxWidth

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

## MaxWidth

Get / Set the window maximum width

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 double MaxWidth {get; set;}
```

Python:

```python
window.MaxWidth: float
```

### Returns

`double` — 

### Examples

C#:

```csharp
var window = new Window { Title = "Resizable", Width = 300, Height = 250, MaxWidth = 800 };
window.Show();
Print("Maximum width: {0}", window.MaxWidth);
```

Python:

```python
window = Window()
window.Title = "Resizable"
window.Width = 300
window.Height = 250
window.MaxWidth = 800
window.Show()
api.Print(f"Maximum width: {window.MaxWidth}")
```

