skip navigation
  • Product Bundles

    DevCraft

    All Telerik .NET tools and Kendo UI JavaScript components in one package. Now enhanced with:

    • AI Coding Assistants
    • Embedded Reporting
    • Document Processing Libraries
    • SSO Account Sign-in

    Web

    Kendo UI UI for Angular UI for Vue UI for jQuery KendoReact UI for Blazor UI for ASP.NET Core UI for ASP.NET MVC UI for ASP.NET AJAX

    Mobile

    UI for .NET MAUI

    Document Management

    Telerik Document Processing

    Desktop

    UI for .NET MAUI UI for WinUI UI for WinForms UI for WPF

    Reporting

    Telerik Reporting Telerik Report Server

    Testing & Mocking

    Test Studio Telerik JustMock

    CMS

    Sitefinity

    AI Productivity Tools

    AI Coding Assistants

    UI/UX Tools

    ThemeBuilder Design System Kit Templates and Building Blocks

    Debugging

    Fiddler Fiddler Everywhere Fiddler Classic Fiddler Everywhere Reporter FiddlerCore

    Free Tools

    KendoReact Free VB.NET to C# Converter Testing Framework
    View all products
  • Overview
  • Demos
    • What's New
    • Roadmap
    • Release History
  • Support and Learning

    • Support and Learning Hub
    • First Steps
    • Docs
    • Demos
    • Virtual Classroom
    • Forums
    • Videos
    • Blogs
    • Accessibility
    • Submit a Ticket

    Productivity and Design Tools

    • Visual Studio Extensions
    • Visual Studio Templates
    • Embedded Reporting
  • Pricing
  • Shopping cart
    • Account Overview
    • Your Licenses
    • Downloads
    • Support Center
    • Forum Profile
    • Payment Methods
    • Edit Profile
    • Log out
  • Login
  • Contact Us
  • Try now

Class RadChat

Represents a chat control that provides a comprehensive messaging interface with support for various message types, user interactions, overlays, and customizable appearance settings.

Inheritance
System.Object
RadControl
RadChat
Inherited Members
RadControl.isResizing2
RadControl.isDisposing2
RadControl.invalidResizeRect
RadControl.isAccessibilityRequested
RadControl.Dispose(Boolean)
RadControl.Construct()
RadControl.CreateBehavior()
RadControl.CreateRootElement()
RadControl.InitializeRootElement(RootRadElement)
RadControl.LoadElementTree()
RadControl.LoadElementTree(Size)
RadControl.SetIsInitializing(Boolean)
RadControl.ShouldSerializeBackColor()
RadControl.SetBackColorThemeOverrides()
RadControl.ResetBackColorThemeOverrides()
RadControl.ShouldSerializeForeColor()
RadControl.SetForeColorThemeOverrides()
RadControl.ResetForeColorThemeOverrides()
RadControl.ShouldSerializeFont()
RadControl.OnKeyDown(KeyEventArgs)
RadControl.OnKeyUp(KeyEventArgs)
RadControl.OnPreviewKeyDown(PreviewKeyDownEventArgs)
RadControl.OnKeyPress(KeyPressEventArgs)
RadControl.OnClick(EventArgs)
RadControl.OnDoubleClick(EventArgs)
RadControl.OnMouseDown(MouseEventArgs)
RadControl.OnMouseUp(MouseEventArgs)
RadControl.OnMouseEnter(EventArgs)
RadControl.OnMouseLeave(EventArgs)
RadControl.OnMouseMove(MouseEventArgs)
RadControl.OnMouseHover(EventArgs)
RadControl.OnMouseCaptureChanged(EventArgs)
RadControl.OnLostFocus(EventArgs)
RadControl.OnCreateControl()
RadControl.OnHandleDestroyed(EventArgs)
RadControl.OnParentChanged(EventArgs)
RadControl.OnVisibleChanged(EventArgs)
RadControl.OnFontChanged(EventArgs)
RadControl.OnForeColorChanged(EventArgs)
RadControl.OnBackColorChanged(EventArgs)
RadControl.OnEnabledChanged(EventArgs)
RadControl.OnBindingContextChanged(EventArgs)
RadControl.OnLocationChanged(EventArgs)
RadControl.OnPaddingChanged(EventArgs)
RadControl.OnRightToLeftChanged(EventArgs)
RadControl.OnPaint(PaintEventArgs)
RadControl.OnLayout(LayoutEventArgs)
RadControl.OnAutoSizeChanged(EventArgs)
RadControl.WndProc(Message)
RadControl.OnInvalidated(RadElement)
RadControl.OnLoad(Size)
RadControl.OnCaptureLosing()
RadControl.OnThemeChanged()
RadControl.OnToolTipTextNeeded(Object, ToolTipTextNeededEventArgs)
RadControl.OnScreenTipNeeded(Object, ScreenTipNeededEventArgs)
RadControl.OnThemeNameChanged(ThemeNameChangedEventArgs)
RadControl.ProcessMnemonic(Char)
RadControl.ProcessFocusRequested(RadElement)
RadControl.ProcessCaptureChangeRequested(RadElement, Boolean)
RadControl.ProcessAutoSizeChanged(Boolean)
RadControl.CallOnMouseCaptureChanged(EventArgs)
RadControl.CallBaseOnGotFocus(EventArgs)
RadControl.CallBaseOnLostFocus(EventArgs)
RadControl.CallOnToolTipTextNeeded(Object, ToolTipTextNeededEventArgs)
RadControl.CallOnScreenTipNeeded(Object, ScreenTipNeededEventArgs)
RadControl.CallOnMouseUp(MouseEventArgs)
RadControl.CallOnMouseDown(MouseEventArgs)
RadControl.CallOnClick(EventArgs)
RadControl.CallOnDoubleClick(EventArgs)
RadControl.CallOnMouseEnter(EventArgs)
RadControl.CallOnMouseWheel(MouseEventArgs)
RadControl.CallOnMouseLeave(EventArgs)
RadControl.CallOnMouseMove(MouseEventArgs)
RadControl.CallOnMouseHover(EventArgs)
RadControl.CallOnPreviewKeyDown(PreviewKeyDownEventArgs)
RadControl.CallBaseOnKeyDown(KeyEventArgs)
RadControl.CallOnKeyDown(KeyEventArgs)
RadControl.CallBaseOnKeyPress(KeyPressEventArgs)
RadControl.CallOnKeyPress(KeyPressEventArgs)
RadControl.IsInputKey(Keys)
RadControl.GetInputElement()
RadControl.CallBaseOnKeyUp(KeyEventArgs)
RadControl.CallOnKeyUp(KeyEventArgs)
RadControl.CallOnThemeNameChanged(ThemeNameChangedEventArgs)
RadControl.CallOnVisibleChanged(EventArgs)
RadControl.BeginInit()
RadControl.EndInit()
RadControl.OnNotifyPropertyChanged(String)
RadControl.OnNotifyPropertyChanged(PropertyChangedEventArgs)
RadControl.IComponentTreeHandler.GetShowFocusCues()
RadControl.IComponentTreeHandler.CreateRootElement()
RadControl.IComponentTreeHandler.CreateChildItems(RadElement)
RadControl.IComponentTreeHandler.InitializeRootElement(RootRadElement)
RadControl.IComponentTreeHandler.InvalidateElement(RadElement)
RadControl.IComponentTreeHandler.InvalidateElement(RadElement, Rectangle)
RadControl.IComponentTreeHandler.InvalidateIfNotSuspended()
RadControl.IComponentTreeHandler.GetAmbientPropertyValue(RadProperty)
RadControl.IComponentTreeHandler.ControlThemeChangedCallback()
RadControl.IComponentTreeHandler.OnAmbientPropertyChanged(RadProperty)
RadControl.IComponentTreeHandler.OnFocusRequested(RadElement)
RadControl.IComponentTreeHandler.OnCaptureChangeRequested(RadElement, Boolean)
RadControl.IComponentTreeHandler.OnDisplayPropertyChanged(RadPropertyChangedEventArgs)
RadControl.IComponentTreeHandler.CallOnThemeNameChanged(ThemeNameChangedEventArgs)
RadControl.IComponentTreeHandler.CallOnMouseCaptureChanged(EventArgs)
RadControl.IComponentTreeHandler.CallOnToolTipTextNeeded(Object, ToolTipTextNeededEventArgs)
RadControl.IComponentTreeHandler.CallOnScreenTipNeeded(Object, ScreenTipNeededEventArgs)
RadControl.GetPreferredSize(Size)
RadControl.SetBoundsCore(Int32, Int32, Int32, Int32, BoundsSpecified)
RadControl.GetRootElementDesiredSize(Int32, Int32, Int32, Int32)
RadControl.OnZoomGesture(ZoomGestureEventArgs)
RadControl.OnRotateGesture(RotateGestureEventArgs)
RadControl.OnPanGesture(PanGestureEventArgs)
RadControl.OnTwoFingerTapGesture(GestureEventArgs)
RadControl.OnPressAndTapGesture(PressAndTapGestureEventArgs)
RadControl.OnGesture(GestureEventArgs)
RadControl.ProcessGesture(Message)
RadControl.EnableGesture(GestureType)
RadControl.DisableGesture(GestureType)
RadControl.Refresh()
RadControl.SuspendUpdate()
RadControl.ResumeUpdate()
RadControl.ResumeUpdate(Boolean)
RadControl.InvokeLayoutCallback(LayoutCallback)
RadControl.RegisterHostedControl(RadHostItem)
RadControl.UnregisterHostedControl(RadHostItem, Boolean)
RadControl.ControlDefinesThemeForElement(RadElement)
RadControl.ResolveStyleGroupForElement(StyleGroup, RadObject)
RadControl.GetPlainText()
RadControl.CanEditUIElement(RadElement)
RadControl.GetChildAt(Int32)
RadControl.ShouldSerializeProperty(RadProperty)
RadControl.ShouldSerializeProperty(RadProperty, RadObject)
RadControl.ResetProperty(RadProperty, RadObject)
RadControl.CanEditElementAtDesignTime(RadElement)
RadControl.GetControlDefaultSize()
RadControl.GetDpiScaledSize(Size)
RadControl.GetDpiScaledSize(SizeF)
RadControl.ProcessCodedUIMessage(IPCMessage)
RadControl.FindPropertyInChildren(RadControl, IPCMessage)
RadControl.CallAccessibilityNotifyClients(AccessibleEvents, Int32)
RadControl.IPCHost.ProcessMessage(IPCMessage)
RadControl.ScaleControl(SizeF, BoundsSpecified)
RadControl.PerformRadAutoScale(Nullable<BoundsSpecified>)
RadControl.SetRadAutoScale(Boolean)
RadControl.IComponentTreeHandler.get_Name()
RadControl.IComponentTreeHandler.set_Name(String)
RadControl.EnableDpiScaling
RadControl.EnableRadAutoScale
RadControl.EnableRadFormInitialDpiScaling
RadControl.EnableImageDpiScaling
RadControl.EnableSvgImages
RadControl.IsTrial
RadControl.IsLoaded
RadControl.LayoutManager
RadControl.ElementTree
RadControl.UseCompatibleTextRenderingDefaultValue
RadControl.Behavior
RadControl.RootElement
RadControl.Padding
RadControl.ThemeName
RadControl.Text
RadControl.EnableTheming
RadControl.ThemeClassName
RadControl.ImageList
RadControl.ImageScalingSize
RadControl.UseCompatibleTextRendering
RadControl.AutoSize
RadControl.MaximumSize
RadControl.MinimumSize
RadControl.Focusable
RadControl.Site
RadControl.CausesValidation
RadControl.IsInitializing
RadControl.SmallImageList
RadControl.SmallImageScalingSize
RadControl.IsDesignMode
RadControl.IsDisplayed
RadControl.FocusedElement
RadControl.AllowShowFocusCues
RadControl.ShowItemToolTips
RadControl.CommandBindings
RadControl.EnableKeyMap
RadControl.BackColor
RadControl.ForeColor
RadControl.Font
RadControl.ValidationCancel
RadControl.IComponentTreeHandler.IsDesignMode
RadControl.IComponentTreeHandler.ElementTree
RadControl.IComponentTreeHandler.Behavior
RadControl.IComponentTreeHandler.Initializing
RadControl.IComponentTreeHandler.ThemeClassName
RadControl.EnableGestures
RadControl.EnableAnalytics
RadControl.AnalyticsName
RadControl.EnableRadAccessibilityObjects
RadControl.AccessibilityRequested
RadControl.EnableCodedUITests
RadControl.EnableCodedUITestsDefaultValue
RadControl.EnableUIAutomation
RadControl.EnableUIAutomationDefaultValue
RadControl.IPCHost.Context
RadControl.ElementInvalidated
RadControl.ToolTipTextNeeded
RadControl.ScreenTipNeeded
RadControl.ThemeNameChanged
RadControl.Initialized
RadControl.PropertyChanged
RadControl.ZoomGesture
RadControl.RotateGesture
RadControl.PanGesture
RadControl.TwoFingerTapGesture
RadControl.PressAndTapGesture
Namespace: Telerik.WinControls.UI
Assembly: Telerik.WinControls.UI.dll

Syntax

[TelerikToolboxCategory("Data Controls")]
public class RadChat : RadControl, INotifyPropertyChanged, ISupportInitializeNotification, ISupportInitialize, IComponentTreeHandler, ILayoutHandler, IPCHost, IAnalyticsProvider

Constructors

RadChat()

Initializes a new instance of the RadChat class with default settings for messaging functionality.

Declaration
public RadChat()

Properties

Author

Gets or sets the current author that represents the primary user of the chat interface, used for message attribution, alignment, styling, and automatic message creation when AutoAddUserMessages is enabled.

Declaration
public Author Author { get; set; }
Property Value
Author

An Author instance representing the current user, or null if no author is set.

See Also
AutoAddUserMessages

AutoAddUserMessages

Gets or sets a value indicating whether messages typed by the user in the input text box will automatically be added as ChatTextMessage instances to the chat conversation.

Declaration
public bool AutoAddUserMessages { get; set; }
Property Value
System.Boolean

true if user messages are automatically added to the chat; otherwise, false. The default value is true.

See Also
ChatTextMessage
Author

AvatarSize

Gets or sets the size of the avatar images displayed next to messages in the chat interface, controlling the visual dimensions of user profile pictures.

Declaration
public SizeF AvatarSize { get; set; }
Property Value
System.Drawing.SizeF

A System.Drawing.SizeF structure representing the width and height of avatar images. The default value is 28x28 pixels.

See Also
ShowAvatars

ChatElement

Gets the main chat element that contains all messaging functionality, visual elements, and user interaction capabilities.

Declaration
public RadChatElement ChatElement { get; }
Property Value
RadChatElement

The RadChatElement instance that provides the core chat functionality.

DefaultSize

Gets the default size for the chat control, providing appropriate dimensions for typical chat interface layouts.

Declaration
protected override Size DefaultSize { get; }
Property Value
System.Drawing.Size

A System.Drawing.Size structure representing the default width and height of 360x500 pixels.

ShowAvatars

Gets or sets a value indicating whether avatar images will be displayed in the chat window next to messages, providing visual identification of message authors.

Declaration
public bool ShowAvatars { get; set; }
Property Value
System.Boolean

true if avatar images are displayed next to messages; otherwise, false. The default value is true.

See Also
AvatarSize

ShowMessagesOnOneSide

Gets or sets a value indicating whether messages will be displayed aligned to only one side of the chat window or distributed on both sides based on the message author, affecting the overall conversation layout and visual flow.

Declaration
public bool ShowMessagesOnOneSide { get; set; }
Property Value
System.Boolean

true if all messages are aligned to one side regardless of author; false if messages are aligned based on their authors. The default value is false.

TimeSeparatorInterval

Gets or sets the time interval between messages that will trigger the automatic addition of a time separator element to visually group messages by time periods in the conversation.

Declaration
public TimeSpan TimeSeparatorInterval { get; set; }
Property Value
System.TimeSpan

A System.TimeSpan representing the minimum time difference between messages required to insert a time separator. If set to System.TimeSpan.Zero, no time separators will be added automatically. The default value is 24 hours.

See Also
TimeSeparatorAdding

Methods

AddMessage(ChatMessage)

Adds a new message to the chat conversation, supporting various message types including text messages, suggested actions, media content, cards, and overlays.

Declaration
public void AddMessage(ChatMessage message)
Parameters
ChatMessage message

The ChatMessage to be displayed in the chat conversation. Typical message types include ChatTextMessage, ChatSuggestedActionsMessage, ChatMediaMessage, ChatCardMessage, and ChatOverlayMessage.

See Also
ChatMessage
ChatTextMessage
ChatSuggestedActionsMessage
ChatMediaMessage
ChatCardMessage
ChatOverlayMessage

CreateChatElement()

Creates and returns a new instance of the chat element that provides the core messaging functionality for the control.

Declaration
protected virtual RadChatElement CreateChatElement()
Returns
RadChatElement

A new RadChatElement instance configured for chat operations.

CreateChildItems(RadElement)

Creates child elements for the chat control, including the main chat element that handles messaging functionality.

Declaration
protected override void CreateChildItems(RadElement parent)
Parameters
RadElement parent

The parent RadElement that will contain the child elements.

Overrides
RadControl.CreateChildItems(RadElement)

HideOverlay()

Hides any overlays that are currently displayed by the chat control, returning the interface to its normal messaging state.

Declaration
public virtual void HideOverlay()
See Also
ShowOverlay(ChatOverlayMessage)
ChatOverlayMessage

OnGotFocus(EventArgs)

Handles the GotFocus event by automatically focusing the input text box, ensuring users can immediately start typing messages when the chat control receives focus.

Declaration
protected override void OnGotFocus(EventArgs e)
Parameters
System.EventArgs e

An System.EventArgs that contains the event data.

Overrides
RadControl.OnGotFocus(EventArgs)

OnMouseWheel(MouseEventArgs)

Handles mouse wheel events to provide smooth scrolling functionality within the chat messages area, automatically calculating and applying appropriate scroll values.

Declaration
protected override void OnMouseWheel(MouseEventArgs e)
Parameters
System.Windows.Forms.MouseEventArgs e

A System.Windows.Forms.MouseEventArgs that contains the mouse wheel event data including delta values for scroll calculations.

Overrides
RadControl.OnMouseWheel(MouseEventArgs)

ShowOverlay(ChatOverlayMessage)

Displays the specified overlay message in the chat control, providing a modal-like interface for user interactions such as confirmations, prompts, or custom input forms.

Declaration
public virtual void ShowOverlay(ChatOverlayMessage message)
Parameters
ChatOverlayMessage message

The ChatOverlayMessage that contains the overlay information and configuration to be displayed.

See Also
ChatOverlayMessage
HideOverlay()

Events

CardActionClicked

Occurs when the user clicks on a card action element within a ChatCardMessage, enabling interactive card-based interfaces and rich content interactions.

Declaration
public event CardActionEventHandler CardActionClicked
Event Type
CardActionEventHandler

See Also
CardActionEventHandler
ChatCardMessage
SendMessage

ItemFormatting

Occurs when the data item of a visual element is changed and the element is prepared for visualization, allowing customization of message appearance, styling, and layout properties.

Declaration
public event ChatItemElementEventHandler ItemFormatting
Event Type
ChatItemElementEventHandler

See Also
ChatItemElementEventHandler

SendMessage

Occurs when the user performs a message-sending action such as pressing the Enter key, clicking the Send message button, clicking on a suggested action, clicking on a card action, or confirming an overlay interaction.

Declaration
public event SendMessageEventHandler SendMessage
Event Type
SendMessageEventHandler

See Also
SendMessageEventHandler
SuggestedActionClicked
CardActionClicked

SuggestedActionClicked

Occurs when the user clicks on a suggested action element within a ChatSuggestedActionsMessage, providing quick response options and streamlined user interactions.

Declaration
public event SuggestedActionEventHandler SuggestedActionClicked
Event Type
SuggestedActionEventHandler

See Also
SuggestedActionEventHandler
ChatSuggestedActionsMessage
SendMessage

TimeSeparatorAdding

Occurs after a new message is added to the chat but before it is displayed, allowing customization of whether a time separator should be inserted before the currently added message based on timing and context.

Declaration
public event TimeSeparatorEventHandler TimeSeparatorAdding
Event Type
TimeSeparatorEventHandler

See Also
TimeSeparatorEventHandler
TimeSeparatorInterval

ToolbarActionClicked

Occurs when the user clicks on a toolbar action element, providing access to chat-level functionality and administrative operations.

Declaration
public event ToolbarActionEventHandler ToolbarActionClicked
Event Type
ToolbarActionEventHandler

See Also
ToolbarActionEventHandler
SendMessage

Extension Methods

SvgExtentions.Traverse<T>(T, Func<T, IEnumerable<T>>)
SvgExtentions.TraverseDepthFirst<T>(T, Func<T, IEnumerable<T>>)
Getting Started
  • Install Now
  • Demos
  • Step-by-Step Tutorial
  • Sample Applications
  • SDK Samples
  • Visual Studio Extensions
Support Resources
  • Code Library
  • Knowledge Base
  • Videos
Community
  • Forums
  • Blogs
  • Feedback Portal
  • Document Processing Feedback Portal

Copyright © 2018 Progress Software Corporation and/or its subsidiaries or affiliates.
All Rights Reserved.

Progress, Telerik, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries. See Trademarks for appropriate markings.