# .NET MAUI Chat Events

The Telerik UI for .NET MAUI Chat allows you to attach events that will be raised when certain actions occur.

Here is a list of the available events:

* `SendMessage`—Raised when a message is sent from the chat by the current author (by clicking the send message button or pressing Enter).

* `AttachFiles`—Raised when the end user picks files to attach.
  * The `sender` argument, which is of type `object`, but can be cast to the `RadChat` type.
  * A `ChatAttachFilesEventArgs` object which provides the list of files (`IList<IFileInfo> FilesToAttach`) to attach to the chat message.

* `RemoveAttachedFile`—Raised when the end user removes an attached file, via the `X` button of the `ChatInputAreaAttachedFileItemView`.
  * The `sender` argument, which is of type `object`, but can be cast to the `RadChat` type.
  * * A `ChatRemoveAttachedFileEventArgs` object which provides the index (`Index` of type `int`) of the item that should be removed from the `Telerik.Maui.Controls.RadChat.AttachedFilesSource` and `Telerik.Maui.Controls.RadChat.AttachedFiles`.

## See Also

* [MVVM Support](https://www.telerik.com/maui-ui/documentation/controls/chat/mvvm-support)
* [Chat Items](https://www.telerik.com/maui-ui/documentation/controls/chat/items/overview)
