New to Telerik UI for WinFormsStart a free 30-day trial

Getting Started with WinForms Chat

Updated over 6 months ago

This article will give you getting started experience with RadChat.

Adding Telerik Assemblies Using NuGet

To use RadChat when working with NuGet packages, install the Telerik.UI.for.WinForms.AllControls package. The package target framework version may vary.

Read more about NuGet installation in the Install using NuGet Packages article.

With the 2025 Q1 release, the Telerik UI for WinForms has a new licensing mechanism. You can learn more about it here.

Adding Assembly References Manually

When dragging and dropping a control from the Visual Studio (VS) Toolbox onto the Form Designer, VS automatically adds the necessary assemblies. However, if you're adding the control programmatically, you'll need to manually reference the following assemblies:

  • Telerik.Licensing.Runtime
  • Telerik.WinControls
  • Telerik.WinControls.UI
  • TelerikCommon

The Telerik UI for WinForms assemblies can be install by using one of the available installation approaches.

Defining the RadChat

1. To start using RadChat just drag it from the toolbox and drop it onto the form:

WinForms RadChat RadChat Getting Started

2. Set the RadChat.Author property:

Setting default author

C#
this.radChat1.Author = new Author(Properties.Resources.architect, "Ben");

Now, you are ready to start sending messages:

WinForms RadChat Setting default author

By default, when you enter some input in the text box and press the Enter key to confirm the message, it is automatically added to RadChat. This is controlled by the RadChat.AutoAddUserMessages property which default value is true. Once a message is confirmed either by pressing the Enter key or by clicking the arrow sign, the RadChat.SendMessage event is fired.

If the RadChat.AutoAddUserMessages property is set to false the message from the text box won't be automatically added to the messages' view. In the SendMessage event you can add the message programmatically.

Adding message programmatically

C#
        
private void AddMessageProgrammatically()
{
    this.radChat1.AutoAddUserMessages = false;
    this.radChat1.SendMessage += radChat1_SendMessage;
}
        
private void radChat1_SendMessage(object sender, SendMessageEventArgs e)
{
    ChatTextMessage textMessage = e.Message as ChatTextMessage;
    textMessage.Message = "[Slightly changed message] " + textMessage.Message;
    this.radChat1.AddMessage(textMessage);
}

WinForms RadChat Adding Message Programmatically

See Also

Telerik UI for WinForms Learning Resources