ChatBuilder
Properties
WriteAction - Func
Methods
BindTo(System.Collections.Generic.IEnumerable)
Binds the component to an IEnumerable collection.
Parameters
data - System.Collections.Generic.IEnumerable<ChatMessage>
The IEnumerable collection.
RETURNS
Returns the current ChatBuilder instance.
Example
@(Html.Kendo().Chat()
.Name("chat")
.BindTo(new List<ChatMessage>
{
new ChatMessage { Text = "Text1" },
new ChatMessage { Text = "Text2" }
}))
DataSource(System.Action)
Sets the DataSource configuration of the Chat for remote data binding.
Parameters
configurator - System.Action<DataSourceBuilder>
The action that configures the DataSource.
RETURNS
Returns the current ChatBuilder instance.
Example
@(Html.Kendo().Chat()
.Name("chat")
.DataSource(source =>
{
source.Read(read =>
{
read.Action("GetChatMessages", "Home");
})
})
)
DataSource(System.String)
Sets the DataSource configuration of the Chat for remote data binding.
Parameters
dataSourceId - System.String
The dataSource id that configures the DataSource.
RETURNS
Returns the current ChatBuilder instance.
Example
@(Html.Kendo().Chat()
.Name("chat")
.DataSource("myDataSource")
)
MessageWidthMode(Kendo.Mvc.UI.ChatMessageWidth)
Sets the messages width mode.
Parameters
mode - ChatMessageWidth
RETURNS
Returns the current ChatBuilder instance.
User(System.Action)
Configures the user information of the Chat.
Parameters
configurator - System.Action<ChatUserSettingsBuilder>
The configurator for the user setting.
RETURNS
Returns the current instance of ChatBuilder .
Toolbar(System.Action)
Configures the toolbar of the Chat.
Parameters
configurator - System.Action<ChatToolbarSettingsBuilder>
The configurator for the toolbar setting.
RETURNS
Returns the current instance of ChatBuilder .
FilesTemplateId(System.String)
The template used to render file attachments in messages.
Parameters
templateId - System.String
The ID of the template element for FilesTemplate
RETURNS
Returns the current ChatBuilder instance.
FilesTemplateHandler(System.String)
The template used to render file attachments in messages.
Parameters
templateHandler - System.String
The handler that returs the template for FilesTemplate
RETURNS
Returns the current ChatBuilder instance.
FilesTemplate(Kendo.Mvc.UI.Fluent.TemplateBuilder)
The template used to render file attachments in messages.
Parameters
template - TemplateBuilder<TModel>
A Template component that configures the filestemplate.
RETURNS
Returns the current ChatBuilder instance.
MessageGroupTemplateId(System.String)
The template used to render message groups.
Parameters
templateId - System.String
The ID of the template element for MessageGroupTemplate
RETURNS
Returns the current ChatBuilder instance.
MessageGroupTemplateHandler(System.String)
The template used to render message groups.
Parameters
templateHandler - System.String
The handler that returs the template for MessageGroupTemplate
RETURNS
Returns the current ChatBuilder instance.
MessageGroupTemplate(Kendo.Mvc.UI.Fluent.TemplateBuilder)
The template used to render message groups.
Parameters
template - TemplateBuilder<TModel>
A Template component that configures the messagegrouptemplate.
RETURNS
Returns the current ChatBuilder instance.
MessageReferenceTemplateId(System.String)
The template used to render message references (replies and pinned messages).
Parameters
templateId - System.String
The ID of the template element for MessageReferenceTemplate
RETURNS
Returns the current ChatBuilder instance.
MessageReferenceTemplateHandler(System.String)
The template used to render message references (replies and pinned messages).
Parameters
templateHandler - System.String
The handler that returs the template for MessageReferenceTemplate
RETURNS
Returns the current ChatBuilder instance.
MessageReferenceTemplate(Kendo.Mvc.UI.Fluent.TemplateBuilder)
The template used to render message references (replies and pinned messages).
Parameters
template - TemplateBuilder<TModel>
A Template component that configures the messagereferencetemplate.
RETURNS
Returns the current ChatBuilder instance.
MessageTemplateId(System.String)
The template used to render individual messages.
Parameters
templateId - System.String
The ID of the template element for MessageTemplate
RETURNS
Returns the current ChatBuilder instance.
MessageTemplateHandler(System.String)
The template used to render individual messages.
Parameters
templateHandler - System.String
The handler that returs the template for MessageTemplate
RETURNS
Returns the current ChatBuilder instance.
MessageTemplate(Kendo.Mvc.UI.Fluent.TemplateBuilder)
The template used to render individual messages.
Parameters
template - TemplateBuilder<TModel>
A Template component that configures the messagetemplate.
RETURNS
Returns the current ChatBuilder instance.
SuggestedActionsTemplateId(System.String)
The template used to render suggested actions.
Parameters
templateId - System.String
The ID of the template element for SuggestedActionsTemplate
RETURNS
Returns the current ChatBuilder instance.
SuggestedActionsTemplateHandler(System.String)
The template used to render suggested actions.
Parameters
templateHandler - System.String
The handler that returs the template for SuggestedActionsTemplate
RETURNS
Returns the current ChatBuilder instance.
SuggestedActionsTemplate(Kendo.Mvc.UI.Fluent.TemplateBuilder)
The template used to render suggested actions.
Parameters
template - TemplateBuilder<TModel>
A Template component that configures the suggestedactionstemplate.
RETURNS
Returns the current ChatBuilder instance.
SuggestionsTemplateId(System.String)
The template used to render message suggestions.
Parameters
templateId - System.String
The ID of the template element for SuggestionsTemplate
RETURNS
Returns the current ChatBuilder instance.
SuggestionsTemplateHandler(System.String)
The template used to render message suggestions.
Parameters
templateHandler - System.String
The handler that returs the template for SuggestionsTemplate
RETURNS
Returns the current ChatBuilder instance.
SuggestionsTemplate(Kendo.Mvc.UI.Fluent.TemplateBuilder)
The template used to render message suggestions.
Parameters
template - TemplateBuilder<TModel>
A Template component that configures the suggestionstemplate.
RETURNS
Returns the current ChatBuilder instance.
TimestampTemplateId(System.String)
The template used to render timestamp elements that separate message groups by date. When set to null, the default timestamp logic is used which displays relative dates like "Today", "Yesterday", "Last Wednesday", or absolute dates for older messages.The template function receives an object with date (parsed Date object) and message (current message object) properties and should return the complete HTML structure for the timestamp element.Returning null or an empty string will hide the time breaks from the chat.
Parameters
templateId - System.String
The ID of the template element for TimestampTemplate
RETURNS
Returns the current ChatBuilder instance.
TimestampTemplateHandler(System.String)
The template used to render timestamp elements that separate message groups by date. When set to null, the default timestamp logic is used which displays relative dates like "Today", "Yesterday", "Last Wednesday", or absolute dates for older messages.The template function receives an object with date (parsed Date object) and message (current message object) properties and should return the complete HTML structure for the timestamp element.Returning null or an empty string will hide the time breaks from the chat.
Parameters
templateHandler - System.String
The handler that returs the template for TimestampTemplate
RETURNS
Returns the current ChatBuilder instance.
TimestampTemplate(Kendo.Mvc.UI.Fluent.TemplateBuilder)
The template used to render timestamp elements that separate message groups by date. When set to null, the default timestamp logic is used which displays relative dates like "Today", "Yesterday", "Last Wednesday", or absolute dates for older messages.The template function receives an object with date (parsed Date object) and message (current message object) properties and should return the complete HTML structure for the timestamp element.Returning null or an empty string will hide the time breaks from the chat.
Parameters
template - TemplateBuilder<TModel>
A Template component that configures the timestamptemplate.
RETURNS
Returns the current ChatBuilder instance.
HeaderItems(System.Action)
Defines the collection of items that will be rendered in the Chat header. Each item represents a component or content that appears in the header area above the message list. The items follow the same structure as AppBar items.
Parameters
configurator - System.Action<AppBarItemFactory>
The configurator for the header items setting.
RETURNS
Returns the current instance of ChatBuilder .
ActionButton(System.Action)
Configures the action button (send/stop button) in the message input area. Allows customization of icons, text labels, and loading state appearance.
Parameters
configurator - System.Action<ChatActionButtonSettingsBuilder>
The configurator for the actionbutton setting.
RETURNS
Returns the current instance of ChatBuilder .
AllowMessageCollapse(System.Boolean)
Enables or disables message collapsing functionality for expandable messages. When enabled, long messages can be collapsed to save screen space.
Parameters
value - System.Boolean
The value for AllowMessageCollapse
RETURNS
Returns the current ChatBuilder instance.
AllowMessageCollapse()
Enables or disables message collapsing functionality for expandable messages. When enabled, long messages can be collapsed to save screen space.
RETURNS
Returns the current ChatBuilder instance.
AttachmentLayout(Kendo.Mvc.UI.ChatAttachmentLayout)
Sets the default layout mode for rich attachments.
Parameters
value - ChatAttachmentLayout
The value for AttachmentLayout
RETURNS
Returns the current ChatBuilder instance.
AttachmentLayoutField(System.String)
The field of the message data item that provides the attachment layout mode for that specific message. Allows per-message override of the global attachmentLayout setting.
Parameters
value - System.String
The value for AttachmentLayoutField
RETURNS
Returns the current ChatBuilder instance.
AttachmentsField(System.String)
The field of the message data item that provides the rich attachments array. Each attachment object can contain contentType, title, subtitle, thumbnailUrl, and actions properties.
Parameters
value - System.String
The value for AttachmentsField
RETURNS
Returns the current ChatBuilder instance.
AttachmentTemplateHandler(System.String)
The template used to render individual attachments within messages. Receives the attachment data object and should return an HTML string. When not set, the default attachment rendering is used.The function receives the attachment object with properties such as title, subtitle, image, contentType, and content.
Parameters
templateHandler - System.String
The handler that returs the template for AttachmentTemplate
RETURNS
Returns the current ChatBuilder instance.
AttachmentTemplate(Kendo.Mvc.UI.Fluent.TemplateBuilder)
The template used to render individual attachments within messages. Receives the attachment data object and should return an HTML string. When not set, the default attachment rendering is used.The function receives the attachment object with properties such as title, subtitle, image, contentType, and content.
Parameters
template - TemplateBuilder<TModel>
A Template component that configures the attachmenttemplate.
RETURNS
Returns the current ChatBuilder instance.
AutoBind(System.Boolean)
Controls whether the Chat will automatically fetch data from the data source when initialized. When set to false, you must manually call the data source's fetch() method.
Parameters
value - System.Boolean
The value for AutoBind
RETURNS
Returns the current ChatBuilder instance.
AutoAssignId(System.Boolean)
Enables or disables automatic assignment of a unique ID to each message posted in the chat. When enabled, messages without an explicit ID will be assigned a generated unique identifier.This option should be set to false if the chat is configured to work with a remote data source and the messages are created on the server. In that case, the id should be assigned on the server itself.
Parameters
value - System.Boolean
The value for AutoAssignId
RETURNS
Returns the current ChatBuilder instance.
AuthorId(System.String)
Specifies the unique identifier of the current user. If not set, a GUID will be generated automatically. This determines which messages are displayed as "own messages" (right-aligned) versus "other messages" (left-aligned).
Parameters
value - System.String
The value for AuthorId
RETURNS
Returns the current ChatBuilder instance.
AuthorIdField(System.String)
Specifies the field name in the data source from which the message author's unique identifier will be read.
Parameters
value - System.String
The value for AuthorIdField
RETURNS
Returns the current ChatBuilder instance.
AuthorImageAltTextField(System.String)
Specifies the field name in the data source from which the alt text for the author's avatar image will be read.
Parameters
value - System.String
The value for AuthorImageAltTextField
RETURNS
Returns the current ChatBuilder instance.
AuthorImageUrlField(System.String)
Specifies the field name in the data source from which the URL for the author's avatar image will be read.
Parameters
value - System.String
The value for AuthorImageUrlField
RETURNS
Returns the current ChatBuilder instance.
AuthorNameField(System.String)
Specifies the field name in the data source from which the author's display name will be read.
Parameters
value - System.String
The value for AuthorNameField
RETURNS
Returns the current ChatBuilder instance.
AuthorMessageSettings(System.Action)
User-specific message settings applied to messages sent by the current user (author). These settings override the global display options like showAvatar, showUsername, and messageWidthMode for author messages only. See also receiverMessageSettings.The object accepts the following properties: showAvatar - Boolean - Whether to show the avatar for author messages.; showUsername - Boolean - Whether to show the username for author messages.; messageWidthMode - String - Message width mode: "standard" or "full".; allowMessageCollapse - Boolean - Whether author messages can be collapsed.; messageTemplate - Function - Template override for author messages. Receives the same arguments as messageTemplate.; messageContentTemplate - Function - Content template override for author messages. Receives the current message object.; enableFileActions - Boolean - Whether file actions are enabled for author messages.; enableContextMenuActions - Boolean - Whether context menu actions are enabled for author messages.; messageToolbarActions - Array - Toolbar actions specific to author messages. or messageActions - Array - Context menu actions specific to author messages..
Parameters
configurator - System.Action<ChatMessageSettingsBuilder>
The configurator for the authormessagesettings setting.
RETURNS
Returns the current instance of ChatBuilder .
FailedField(System.String)
The field of the message data item that provides the failed flag. When true, the message is rendered with a failed state indicator and a retry button.
Parameters
value - System.String
The value for FailedField
RETURNS
Returns the current ChatBuilder instance.
FileActions(System.Action)
Defines the collection of actions that will be rendered in the context menu for file attachments. Each action represents an operation that users can perform on files (download, delete, preview, etc.).
Parameters
configurator - System.Action<ChatFileActionFactory>
The configurator for the fileactions setting.
RETURNS
Returns the current instance of ChatBuilder .
FileAttachment(System.Action)
Configures the file select button (attachment button) in the message input area. Can be set to: true: Shows the button with default settings; false: Hides the button completely (does not render) or Object: Shows the button with custom configuration.
Parameters
configurator - System.Action<ChatFileAttachmentSettingsBuilder>
The configurator for the fileattachment setting.
RETURNS
Returns the current instance of ChatBuilder .
FileAttachment(System.Boolean)
Configures the file select button (attachment button) in the message input area. Can be set to: true: Shows the button with default settings; false: Hides the button completely (does not render) or Object: Shows the button with custom configuration.
Parameters
enabled - System.Boolean
Enables or disables the fileattachment option.
RETURNS
Returns the current instance of ChatFileAttachmentSettingsBuilder .
FilesField(System.String)
Specifies the field name in the data source from which the array of files attached to a message will be read.
Parameters
value - System.String
The value for FilesField
RETURNS
Returns the current ChatBuilder instance.
FilesLayoutMode(Kendo.Mvc.UI.ChatFilesLayout)
Controls the layout mode for file attachments within messages.
Parameters
value - ChatFilesLayout
The value for FilesLayoutMode
RETURNS
Returns the current ChatBuilder instance.
HeaderTemplateHandler(System.String)
A custom template function for rendering the chat header. When set, this overrides the headerItems configuration and provides full control over the header content. The function should return an HTML string.
Parameters
templateHandler - System.String
The handler that returs the template for HeaderTemplate
RETURNS
Returns the current ChatBuilder instance.
HeaderTemplate(Kendo.Mvc.UI.Fluent.TemplateBuilder)
A custom template function for rendering the chat header. When set, this overrides the headerItems configuration and provides full control over the header content. The function should return an HTML string.
Parameters
template - TemplateBuilder<TModel>
A Template component that configures the headertemplate.
RETURNS
Returns the current ChatBuilder instance.
Height(System.String)
Sets the height of the Chat component.
Parameters
value - System.String
The value for Height
RETURNS
Returns the current ChatBuilder instance.
IdField(System.String)
Specifies the field name in the data source from which the unique identifier for each message will be read.
Parameters
value - System.String
The value for IdField
RETURNS
Returns the current ChatBuilder instance.
IsDeletedField(System.String)
Specifies the field name in the data source that indicates whether a message has been deleted.
Parameters
value - System.String
The value for IsDeletedField
RETURNS
Returns the current ChatBuilder instance.
IsPinnedField(System.String)
Specifies the field name in the data source that indicates whether a message is pinned.
Parameters
value - System.String
The value for IsPinnedField
RETURNS
Returns the current ChatBuilder instance.
IsTypingField(System.String)
Specifies the field name in the data source that indicates whether a message is currently being typed.
Parameters
value - System.String
The value for IsTypingField
RETURNS
Returns the current ChatBuilder instance.
Loading(System.Boolean)
Sets the initial loading state of the Chat component. When true, the send button displays a loading/stop indicator instead of the send icon. This is useful for AI chat applications where generating responses takes time. See also the loading method for toggling this state at runtime.
Parameters
value - System.Boolean
The value for Loading
RETURNS
Returns the current ChatBuilder instance.
Loading()
Sets the initial loading state of the Chat component. When true, the send button displays a loading/stop indicator instead of the send icon. This is useful for AI chat applications where generating responses takes time. See also the loading method for toggling this state at runtime.
RETURNS
Returns the current ChatBuilder instance.
MessageActions(System.Action)
Defines the collection of actions that will be rendered in the context menu for messages. By default, the Chat includes four actions: Reply, Copy, and Pin. You can customize this list by providing your own actions or combining default actions with custom ones.Default actions: { name: "reply", text: "Reply", icon: "undo" }; { name: "copy", text: "Copy", icon: "copy" }; { name: "pin", text: "Pin", icon: "pin" } or { name: "delete", text: "Delete", icon: "trash" }.
Parameters
configurator - System.Action<ChatMessageActionFactory>
The configurator for the messageactions setting.
RETURNS
Returns the current instance of ChatBuilder .
Messages(System.Action)
Allows localization of the strings that are used in the component.
Parameters
configurator - System.Action<ChatMessagesSettingsBuilder>
The configurator for the messages setting.
RETURNS
Returns the current instance of ChatBuilder .
MessageBox(System.Action)
Configures the built-in message input box (PromptBox). Use this option to customize the default input mode, row count, and auto-grow height when messageBoxTemplate is not set.
Parameters
configurator - System.Action<ChatMessageBoxSettingsBuilder>
The configurator for the messagebox setting.
RETURNS
Returns the current instance of ChatBuilder .
MessageContentTemplateHandler(System.String)
A custom template function for rendering the content area inside message bubbles. This template controls only the text/content portion of messages, not the entire message group structure. When set, it is used for both author and receiver messages unless overridden by authorMessageSettings.messageContentTemplate or receiverMessageSettings.messageContentTemplate.
Parameters
templateHandler - System.String
The handler that returs the template for MessageContentTemplate
RETURNS
Returns the current ChatBuilder instance.
MessageContentTemplate(Kendo.Mvc.UI.Fluent.TemplateBuilder)
A custom template function for rendering the content area inside message bubbles. This template controls only the text/content portion of messages, not the entire message group structure. When set, it is used for both author and receiver messages unless overridden by authorMessageSettings.messageContentTemplate or receiverMessageSettings.messageContentTemplate.
Parameters
template - TemplateBuilder<TModel>
A Template component that configures the messagecontenttemplate.
RETURNS
Returns the current ChatBuilder instance.
MessageStatusSettings(System.Action)
Custom settings for message status display, allowing you to configure icons, text, and CSS classes for each message delivery status. The object should be a mapping from status values ("sent", "delivered", "seen", "failed") to settings objects.Each status settings object accepts: icon - String - Font icon name to display.; text - String - Text label for the status. or cssClass - String - Additional CSS class to apply to the status element..
Parameters
configurator - System.Action<ChatMessageStatusSettingsSettingsBuilder>
The configurator for the messagestatussettings setting.
RETURNS
Returns the current instance of ChatBuilder .
MessageStatusTemplateHandler(System.String)
A custom template function for rendering message status indicators. Receives a context object with status (the status string) and message (the message object). When set, this overrides the default status rendering and messageStatusSettings.
Parameters
templateHandler - System.String
The handler that returs the template for MessageStatusTemplate
RETURNS
Returns the current ChatBuilder instance.
MessageStatusTemplate(Kendo.Mvc.UI.Fluent.TemplateBuilder)
A custom template function for rendering message status indicators. Receives a context object with status (the status string) and message (the message object). When set, this overrides the default status rendering and messageStatusSettings.
Parameters
template - TemplateBuilder<TModel>
A Template component that configures the messagestatustemplate.
RETURNS
Returns the current ChatBuilder instance.
MessageBoxTemplateHandler(System.String)
The template used to render the message input area at the bottom of the Chat. The function receives no arguments and should return an HTML string for the custom message box markup.When using a custom template, the first textarea or supported text input inside the template is used as the message input. To enable send button behavior, add an element with the ref-chat-message-box-send-button attribute. If the template contains input[type='file'] elements, they participate in the file selection flow.
Parameters
templateHandler - System.String
The handler that returs the template for MessageBoxTemplate
RETURNS
Returns the current ChatBuilder instance.
MessageBoxTemplate(Kendo.Mvc.UI.Fluent.TemplateBuilder)
The template used to render the message input area at the bottom of the Chat. The function receives no arguments and should return an HTML string for the custom message box markup.When using a custom template, the first textarea or supported text input inside the template is used as the message input. To enable send button behavior, add an element with the ref-chat-message-box-send-button attribute. If the template contains input[type='file'] elements, they participate in the file selection flow.
Parameters
template - TemplateBuilder<TModel>
A Template component that configures the messageboxtemplate.
RETURNS
Returns the current ChatBuilder instance.
MessageTimeFormat(System.String)
The format string used to display message timestamps.
Parameters
value - System.String
The value for MessageTimeFormat
RETURNS
Returns the current ChatBuilder instance.
MessageToolbarActions(System.Action)
Defines the collection of actions that will be rendered in the message toolbar.
Parameters
configurator - System.Action<ChatMessageToolbarActionFactory>
The configurator for the messagetoolbaractions setting.
RETURNS
Returns the current instance of ChatBuilder .
NoDataTemplateHandler(System.String)
A custom template function for rendering an empty state when the chat has no messages. When set, the template output is displayed in place of the empty message list area, providing a visual cue that the conversation has not started yet.
Parameters
templateHandler - System.String
The handler that returs the template for NoDataTemplate
RETURNS
Returns the current ChatBuilder instance.
NoDataTemplate(Kendo.Mvc.UI.Fluent.TemplateBuilder)
A custom template function for rendering an empty state when the chat has no messages. When set, the template output is displayed in place of the empty message list area, providing a visual cue that the conversation has not started yet.
Parameters
template - TemplateBuilder<TModel>
A Template component that configures the nodatatemplate.
RETURNS
Returns the current ChatBuilder instance.
ScrollToBottomButton(System.Boolean)
Shows or hides the scroll-to-bottom button that appears when the user scrolls up in the message list.
Parameters
value - System.Boolean
The value for ScrollToBottomButton
RETURNS
Returns the current ChatBuilder instance.
AutoScrollThreshold(System.Double)
Defines the amount of space that is preserved above a newly auto-scrolled incoming message when the user is already near the bottom of the message list. Accepts either a pixel value or a percentage of the visible message list area.
Parameters
value - System.Double
The value for AutoScrollThreshold
RETURNS
Returns the current ChatBuilder instance.
ShowAvatar(System.Boolean)
Controls whether avatars are displayed next to messages. This is a global setting that can be overridden per-user via authorMessageSettings and receiverMessageSettings.
Parameters
value - System.Boolean
The value for ShowAvatar
RETURNS
Returns the current ChatBuilder instance.
ShowUsername(System.Boolean)
Controls whether usernames are displayed above messages. This is a global setting that can be overridden per-user via authorMessageSettings and receiverMessageSettings.
Parameters
value - System.Boolean
The value for ShowUsername
RETURNS
Returns the current ChatBuilder instance.
SkipSanitization(System.Boolean)
Controls whether HTML sanitization is skipped when rendering message content. When set to true, the Chat component will not automatically encode HTML entities in message text, allowing for rich HTML content to be displayed. This is useful when integrating with markdown parsers or when you need to display pre-formatted HTML content.Warning: Setting this to true can introduce security vulnerabilities if user input is not properly sanitized elsewhere in your application. Only use this option when you trust the content source or have implemented your own sanitization logic.
Parameters
value - System.Boolean
The value for SkipSanitization
RETURNS
Returns the current ChatBuilder instance.
SkipSanitization()
Controls whether HTML sanitization is skipped when rendering message content. When set to true, the Chat component will not automatically encode HTML entities in message text, allowing for rich HTML content to be displayed. This is useful when integrating with markdown parsers or when you need to display pre-formatted HTML content.Warning: Setting this to true can introduce security vulnerabilities if user input is not properly sanitized elsewhere in your application. Only use this option when you trust the content source or have implemented your own sanitization logic.
RETURNS
Returns the current ChatBuilder instance.
ReplyToIdField(System.String)
Specifies the field name in the data source that contains the ID of the message being replied to.
Parameters
value - System.String
The value for ReplyToIdField
RETURNS
Returns the current ChatBuilder instance.
ReceiverMessageSettings(System.Action)
User-specific message settings applied to messages received from other users. These settings override the global display options like showAvatar, showUsername, and messageWidthMode for receiver messages only. See also authorMessageSettings.The object accepts the following properties: showAvatar - Boolean - Whether to show the avatar for receiver messages.; showUsername - Boolean - Whether to show the username for receiver messages.; messageWidthMode - String - Message width mode: "standard" or "full".; allowMessageCollapse - Boolean - Whether receiver messages can be collapsed.; messageTemplate - Function - Template override for receiver messages. Receives the same arguments as messageTemplate.; messageContentTemplate - Function - Content template override for receiver messages. Receives the current message object.; enableFileActions - Boolean - Whether file actions are enabled for receiver messages.; enableContextMenuActions - Boolean - Whether context menu actions are enabled for receiver messages.; messageToolbarActions - Array - Toolbar actions specific to receiver messages. or messageActions - Array - Context menu actions specific to receiver messages..
Parameters
configurator - System.Action<ChatMessageSettingsBuilder>
The configurator for the receivermessagesettings setting.
RETURNS
Returns the current instance of ChatBuilder .
SpeechToText(System.Action)
Configures speech-to-text functionality in the message input. The button is always visible. When null or not configured, the button is enabled by default. Use { enable: false } to disable it.
Parameters
configurator - System.Action<ChatSpeechToTextSettingsBuilder>
The configurator for the speechtotext setting.
RETURNS
Returns the current instance of ChatBuilder .
SpeechToText(System.Boolean)
Configures speech-to-text functionality in the message input. The button is always visible. When null or not configured, the button is enabled by default. Use { enable: false } to disable it.
Parameters
enabled - System.Boolean
Enables or disables the speechtotext option.
RETURNS
Returns the current instance of ChatSpeechToTextSettingsBuilder .
SuggestedActionsScrollable(System.Boolean)
Deprecated: Use suggestedActionsLayoutMode instead.Enables or disables scrollable behavior for suggested actions.
Parameters
value - System.Boolean
The value for SuggestedActionsScrollable
RETURNS
Returns the current ChatBuilder instance.
SuggestedActionsScrollable()
Deprecated: Use suggestedActionsLayoutMode instead.Enables or disables scrollable behavior for suggested actions.
RETURNS
Returns the current ChatBuilder instance.
Suggestions(System.Action)
Defines the collection of suggested messages that users can quickly select. These appear as clickable buttons below the message input area, allowing users to send common responses quickly.
Parameters
configurator - System.Action<ChatSuggestionFactory>
The configurator for the suggestions setting.
RETURNS
Returns the current instance of ChatBuilder .
SuggestionsBehavior(Kendo.Mvc.UI.ChatSuggestionsBehavior)
Controls what happens when a user selects a suggestion.
Parameters
value - ChatSuggestionsBehavior
The value for SuggestionsBehavior
RETURNS
Returns the current ChatBuilder instance.
SuggestionsScrollable(System.Boolean)
Deprecated: Use suggestionsLayoutMode instead.Enables or disables scrollable behavior for message suggestions.
Parameters
value - System.Boolean
The value for SuggestionsScrollable
RETURNS
Returns the current ChatBuilder instance.
SuggestionsScrollable()
Deprecated: Use suggestionsLayoutMode instead.Enables or disables scrollable behavior for message suggestions.
RETURNS
Returns the current ChatBuilder instance.
TextField(System.String)
Specifies the field name in the data source from which the message text content will be read.
Parameters
value - System.String
The value for TextField
RETURNS
Returns the current ChatBuilder instance.
StatusField(System.String)
Specifies the field name in the data source from which the message status will be read. The status describes the delivery state of the message (e.g. "Sending", "Sent", "Delivered", "Seen", "Failed"). See also messageStatusSettings.
Parameters
value - System.String
The value for StatusField
RETURNS
Returns the current ChatBuilder instance.
TimestampField(System.String)
Specifies the field name in the data source from which the message timestamp will be read.
Parameters
value - System.String
The value for TimestampField
RETURNS
Returns the current ChatBuilder instance.
TimestampVisibility(Kendo.Mvc.UI.ChatTimestampVisibility)
Controls the visibility of message timestamps.
Parameters
value - ChatTimestampVisibility
The value for TimestampVisibility
RETURNS
Returns the current ChatBuilder instance.
UserStatusTemplateHandler(System.String)
The template used to render the user status content shown next to the latest message in a receiver group. The function receives a context object with a message field, where message.author contains the normalized author data, and should return an HTML string.
Parameters
templateHandler - System.String
The handler that returs the template for UserStatusTemplate
RETURNS
Returns the current ChatBuilder instance.
UserStatusTemplate(Kendo.Mvc.UI.Fluent.TemplateBuilder)
The template used to render the user status content shown next to the latest message in a receiver group. The function receives a context object with a message field, where message.author contains the normalized author data, and should return an HTML string.
Parameters
template - TemplateBuilder<TModel>
A Template component that configures the userstatustemplate.
RETURNS
Returns the current ChatBuilder instance.
Width(System.String)
Sets the width of the Chat component.
Parameters
value - System.String
The value for Width
RETURNS
Returns the current ChatBuilder instance.
Dir(Kendo.Mvc.UI.TextDirection)
Specifies the text direction of the Chat.
Parameters
value - TextDirection
The value for Dir
RETURNS
Returns the current ChatBuilder instance.
SuggestedActionsLayoutMode(Kendo.Mvc.UI.SuggestionsLayoutMode)
Layout mode for suggested actions.
Parameters
value - SuggestionsLayoutMode
The value for SuggestedActionsLayoutMode
RETURNS
Returns the current ChatBuilder instance.
SuggestionsLayoutMode(Kendo.Mvc.UI.SuggestionsLayoutMode)
The layout mode for the message box suggestions.
Parameters
value - SuggestionsLayoutMode
The value for SuggestionsLayoutMode
RETURNS
Returns the current ChatBuilder instance.
Events(System.Action)
Configures the client-side events.
Parameters
configurator - System.Action<ChatEventBuilder>
The client events action.
RETURNS
Returns the current ChatBuilder instance.
Example
@(Html.Kendo().Chat()
.Name("Chat")
.Events(events => events
.ExecuteAction("onExecuteAction")
)
)
ToComponent()
Returns the internal view component.
RETURNS
The instance that represents the component.
Expression(System.String)
Sets the name of the component.
Parameters
modelExpression - System.String
The name.
RETURNS
Returns the current instance.
Explorer(Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExplorer)
Sets the name of the component.
Parameters
modelExplorer - Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExplorer
The name.
RETURNS
Returns the current instance.
Name(System.String)
Sets the name of the component.
Parameters
componentName - System.String
The name.
RETURNS
Returns the current instance.
Deferred(System.Boolean)
Suppress initialization script rendering. Note that this options should be used in conjunction with Kendo.Mvc.UI.Fluent.WidgetFactory.DeferredScripts(System.Boolean,System.Boolean)
Parameters
deferred - System.Boolean
RETURNS
Returns a DeferredWidgetBuilder instance.
HtmlAttributes(System.Object)
Sets the HTML attributes.
Parameters
attributes - System.Object
The HTML attributes.
RETURNS
Returns the current instance.
HtmlAttributes(System.Collections.Generic.IDictionary)
Sets the HTML attributes.
Parameters
attributes - System.Collections.Generic.IDictionary<String,Object>
The HTML attributes.
RETURNS
Returns the current instance.
ScriptAttributes(System.Object,System.Boolean)
Sets the JavaScript attributes to the initialization script.
Parameters
attributes - System.Object
The JavaScript attributes.
overrideAttributes - System.Boolean
Argument which determines whether attributes should be overriden.
RETURNS
Returns the current instance.
ScriptAttributes(System.Collections.Generic.IDictionary,System.Boolean)
Sets the JavaScript attributes to the initialization script.
Parameters
attributes - System.Collections.Generic.IDictionary<String,Object>
The JavaScript attributes.
overrideAttributes - System.Boolean
Argument which determines whether attributes should be overriden.
RETURNS
Returns the current instance.
Render()
Renders the component in place.
ToHtmlString()
Returns the HTML representation of the component.
WriteTo(System.IO.TextWriter,System.Text.Encodings.Web.HtmlEncoder)
Parameters
writer - System.IO.TextWriter
encoder - System.Text.Encodings.Web.HtmlEncoder
ToClientTemplate()
Returns the client template for the component.
AsModule(System.Boolean)
Specifies whether the initialization script of the component will be rendered as a JavaScript module.
Parameters
value - System.Boolean
RETURNS
Returns the current instance.