# LibTmux.SwapPaneRequest.SwapPaneRequest

- **Module:** LibTmux.SwapPaneRequest
- **Package:** LibTmux
- **Language:** .NET
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-dotnet/blob/6656a563ec9e07ab52e0c3ac96f7704fc94cc0c0/src/LibTmux/Requests/SwapPaneRequest.cs#L28
- **Page:** https://libtmux.org/reference/dotnet/libtmux-swappanerequest-swappanerequest/

```
LibTmux.SwapPaneRequest.SwapPaneRequest(target: string?, direction: PaneSwapDirection?, detach: bool, keepZoom: bool)
```

Initializes a pane-swap request.

## Parameters

- `target` (string?) — The pane to swap with.
- `direction` (PaneSwapDirection?) — The neighbour to swap with instead.
- `detach` (bool) — Whether the swapped pane is left unselected.
- `keepZoom` (bool) — Whether a zoomed pane stays zoomed.

## Raises

- `ArgumentException` — Neither a target nor a direction is given, or both are.
