# Sandbox.UI.FloatingWindow.OnLayout

```csharp
void OnLayout(ref Rect layoutRect)
```

Apply the saved position and keep the window inside the viewport using its measured size.

### Parameters

- `ref layoutRect` (`Rect`)

Declared in [Sandbox.UI.FloatingWindow](/api/Sandbox.UI.FloatingWindow).
Assembly: `Sandbox.Engine`.
