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