# LibTmux.NewPaneRequest.ToCommand

- **Module:** LibTmux
- **Package:** LibTmux
- **Language:** C#
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-dotnet/blob/cf34b255c896d19a97e7d7fabea58609c916012d/src/LibTmux/Requests/NewPaneRequest.cs#L148
- **Page:** https://libtmux.org/en/csharp/latest/reference/libtmux-newpanerequest-tocommand/

```
LibTmux.NewPaneRequest.ToCommand(pane: Pane) -> TmuxCommand
```

Returns a floating-pane request as one tmux command.

The command arrived whole in tmux 3.7, so batching does not soften the
refusal below that: an older server has nothing to send it to.

## Parameters

- `pane` (`Pane`): The pane the new one is created from.

## Returns

The command, ready to add to a <see cref="TmuxChain" />.

## Raises

- [`ArgumentNullException`](https://learn.microsoft.com/dotnet/api/system.argumentnullexception): <paramref name="pane" /> is null.
- [`TmuxVersionTooLowException`](/en/csharp/latest/reference/libtmux-tmuxversiontoolowexception/): tmux is older than 3.7.
