# LibTmux.DisplayMenuRequest.ToCommand

- **Module:** LibTmux.DisplayMenuRequest
- **Package:** LibTmux
- **Language:** .NET
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-dotnet/blob/320dc64f4b8b7815842471327a5e6b84a1499bf8/src/LibTmux/Requests/DisplayMenuRequest.cs#L72
- **Page:** https://libtmux.org/en/dotnet/latest/reference/libtmux-displaymenurequest-tocommand/

```
LibTmux.DisplayMenuRequest.ToCommand(server: Server) -> TmuxCommand
```

Returns a menu request as one tmux command.

The style flags arrived in tmux 3.4 and the mouse flag in 3.5, so the
server decides which of them the built command carries.

## Parameters

- `server` (Server): The server the menu is shown on.

## Returns

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

## Raises

- `ArgumentNullException`: <paramref name="server" /> is null.
