Interface IChatItemConverter
Interface that defines how chat items should be converted.
Namespace: Telerik.Maui.Controls.Chat
Assembly: Telerik.Maui.Controls.dll
Syntax
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
ChatItem ConvertToChatItem(object dataItem, ChatItemConverterContext context)
Parameters
System.Object
dataItem
The item to be converted. |
ChatItemConverterContext
context
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
object ConvertToDataItem(object message, ChatItemConverterContext context)
Parameters
System.Object
message
The message to be converted. |
ChatItemConverterContext
context
The respective ChatItemConverterContext. |
Returns
System.Object
The corresponding data item. |