Interface
IChatItemConverter

Interface that defines how chat items should be converted.

Definition

Namespace:Telerik.Maui.Controls.Chat

Assembly:Telerik.Maui.Controls.dll

Syntax:

cs-api-definition
public interface IChatItemConverter

Methods

ConvertToChatItem(object, ChatItemConverterContext)

Converts a data item to a chat item. In general here you need to create and set up the corresponding ChatItem for the given business object.

Declaration

cs-api-definition
ChatItem ConvertToChatItem(object dataItem, ChatItemConverterContext context)

Parameters

dataItem

object

The item to be converted.

context

ChatItemConverterContext

The respective ChatItemConverterContext.

Returns

ChatItem

An ChatItem instance.

ConvertToDataItem(object, ChatItemConverterContext)

Converts a message to a data item. In general here you need to create an instance of your business object that the RadChat will try to add automatically to the ItemsSource collection. Usually the message is the string from the entry in the chat, and this method is invoked when the Send button is pressed.

Declaration

cs-api-definition
object ConvertToDataItem(object message, ChatItemConverterContext context)

Parameters

message

object

The message to be converted.

context

ChatItemConverterContext

The respective ChatItemConverterContext.

Returns

object

The corresponding data item.