menu

ASP.NET MVC - EJ2

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class ChatUIMessageBuilder - ASP.NETMVC-EJ2 API Reference | Syncfusion

    Show / Hide Table of Contents

    Class ChatUIMessageBuilder

    Inheritance
    System.Object
    Syncfusion.EJ2.ControlBuilder
    ChatUIMessageBuilder
    Namespace: Syncfusion.EJ2.InteractiveChat
    Assembly: Syncfusion.EJ2.dll
    Syntax
    public class ChatUIMessageBuilder : ControlBuilder

    Constructors

    ChatUIMessageBuilder()

    Declaration
    public ChatUIMessageBuilder()

    ChatUIMessageBuilder(List<ChatUIMessage>)

    Declaration
    public ChatUIMessageBuilder(List<ChatUIMessage> collection)
    Parameters
    Type Name Description
    System.Collections.Generic.List<ChatUIMessage> collection

    Methods

    Add()

    Declaration
    public void Add()

    Author(Object)

    Specifies the author of the message in the Chat UI component. This property references a UserModel object that contains details about the user who sent the message.

    Declaration
    public ChatUIMessageBuilder Author(object author)
    Parameters
    Type Name Description
    System.Object author
    Returns
    Type
    ChatUIMessageBuilder

    ContentTemplate(Action<Object>)

    Declaration
    public ChatUIMessageBuilder ContentTemplate(Action<object> template)
    Parameters
    Type Name Description
    System.Action<System.Object> template
    Returns
    Type
    ChatUIMessageBuilder

    ContentTemplate(Func<Object, Object>)

    Declaration
    public ChatUIMessageBuilder ContentTemplate(Func<object, object> template)
    Parameters
    Type Name Description
    System.Func<System.Object, System.Object> template
    Returns
    Type
    ChatUIMessageBuilder

    Id(String)

    Specifies the unique identifier for each message sent in the Chat UI component. Represents a string that uniquely identifies a message for tracking and managing individual messages within the chat.

    Declaration
    public ChatUIMessageBuilder Id(string id)
    Parameters
    Type Name Description
    System.String id
    Returns
    Type
    ChatUIMessageBuilder

    Status(Object)

    Specifies the status of the message in the Chat UI component. Represents the current status of the message, such as sent, received, or read. It helps in tracking the messages within the chat component.

    Declaration
    public ChatUIMessageBuilder Status(object status)
    Parameters
    Type Name Description
    System.Object status
    Returns
    Type
    ChatUIMessageBuilder

    Text(String)

    Represents the content of the message sent by a user in the Chat UI component.

    Declaration
    public ChatUIMessageBuilder Text(string text)
    Parameters
    Type Name Description
    System.String text
    Returns
    Type
    ChatUIMessageBuilder

    TimeStamp(Object)

    Specifies the timestamp of when the message was sent. This property holds a Date object that represents the exact time the message was created, providing context to the conversation flow.

    Declaration
    public ChatUIMessageBuilder TimeStamp(object timeStamp)
    Parameters
    Type Name Description
    System.Object timeStamp
    Returns
    Type
    ChatUIMessageBuilder

    TimeStampFormat(String)

    Specifies the format of the timestamp for displaying the message's sending time. By default, the format is set based on the culture of the application. You can customize the format using a specific pattern, such as "'dd/MM/yyyy hh:mm'" in string format.

    Declaration
    public ChatUIMessageBuilder TimeStampFormat(string timeStampFormat)
    Parameters
    Type Name Description
    System.String timeStampFormat
    Returns
    Type
    ChatUIMessageBuilder
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved