# LibTmux.DisplayMenuRequest.ToCommand

- **Module:** LibTmux
- **Package:** LibTmux
- **Language:** C#
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-dotnet/blob/cf34b255c896d19a97e7d7fabea58609c916012d/src/LibTmux/Requests/DisplayMenuRequest.cs#L72
- **Page:** https://libtmux.org/en/csharp/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`](https://learn.microsoft.com/dotnet/api/system.argumentnullexception): <paramref name="server" /> is null.
