# LibTmux.Window.DisplayMessageAsync

- **Module:** LibTmux
- **Package:** LibTmux
- **Language:** C#
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-dotnet/blob/cf34b255c896d19a97e7d7fabea58609c916012d/src/LibTmux/Window.Display.cs#L25
- **Page:** https://libtmux.org/en/csharp/latest/reference/libtmux-window-displaymessageasync/

```
LibTmux.Window.DisplayMessageAsync(request: DisplayMessageRequest, cancellationToken: CancellationToken) -> Task<IReadOnlyList<string>?>
```

Shows a message on the client viewing this window.

A message with no client to show it on is not a failure, so tmux's
complaint is logged rather than raised.

## Parameters

- `request` (`DisplayMessageRequest`): The message to show.
- `cancellationToken` (`CancellationToken`): Cancels the tmux command.

## Returns

The printed lines when the request asked for them, else null.

## Raises

- [`ArgumentException`](https://learn.microsoft.com/dotnet/api/system.argumentexception): The request asks to redraw the pane, which only a pane can honour.
