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 ChatMessage

Represents a base class for chat messages, providing common properties such as author, timestamp, and user-defined data, and supporting property change notification.

Inheritance
System.Object
ChatMessage
ChatCardMessage
ChatCarouselMessage
ChatMediaMessage
ChatOverlayMessage
ChatSuggestedActionsMessage
ChatTextMessage
ChatTimeSeparatorMessage
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Telerik.WinControls.UI
Assembly: Telerik.WinControls.UI.dll

Syntax

public abstract class ChatMessage : INotifyPropertyChanged
Remarks

This abstract class implements the INotifyPropertyChanged interface to support data binding scenarios. Derived classes should extend ChatMessage to represent specific types of chat messages. Property changes are notified through the PropertyChanged event, enabling UI frameworks and other listeners to react to updates. The UserData property allows attaching arbitrary custom data to each message instance.

Constructors

ChatMessage(Author, DateTime, Object)

Initializes a new instance of the ChatMessage class with the specified author, timestamp, and user data.

Declaration
public ChatMessage(Author author, DateTime timeStamp, object userData)
Parameters
Author author

The author of the chat message. Represents the user who created the message.

System.DateTime timeStamp

The date and time when the message was created.

System.Object userData

An object containing additional user-defined data associated with the message. Can be null if no extra data is needed.

Properties

Author

Gets or sets the author associated with this instance.

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

TimeStamp

Gets or sets the date and time associated with this instance.

Declaration
public DateTime TimeStamp { get; set; }
Property Value
System.DateTime

UserData

Gets or sets a user-defined object that contains custom data associated with this instance.

Declaration
public object UserData { get; set; }
Property Value
System.Object

Remarks

This property can be used to attach any additional information to the object at runtime. The value can be of any type, or null if no user data is associated.

Methods

OnPropertyChanged(String)

Raises the PropertyChanged event to notify listeners that a property value has changed.

Declaration
protected virtual void OnPropertyChanged(string propertyName)
Parameters
System.String propertyName

The name of the property that changed. This value is passed to event handlers to identify the property that was updated.

Remarks

Override this method in a derived class to provide custom logic when a property value changes. This method is typically called by property setters to implement the INotifyPropertyChanged pattern.

Events

PropertyChanged

Occurs when a property value changes.

Declaration
public event PropertyChangedEventHandler PropertyChanged
Event Type
System.ComponentModel.PropertyChangedEventHandler

Remarks

This event is typically raised by classes that implement the INotifyPropertyChanged interface to notify clients, such as data-binding frameworks, that a property value has changed. Handlers attached to this event receive the name of the property that changed in the PropertyChangedEventArgs parameter.

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.