New to Telerik UI for .NET MAUIStart a free 30-day trial

Interface that defines how chat attachments should be converted.

Definition

Namespace:Telerik.Maui.Controls.Chat

Assembly:Telerik.Maui.Controls.dll

Syntax:

C#
public interface IChatAttachedFileConverter

Methods

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

C#
ChatAttachedFile ConvertToChatAttachedFile(object dataItem, ChatAttachedFileConverterContext context)
Parameters:dataItemobject

The item to be converted.

contextChatAttachedFileConverterContext

The respective ChatAttachedFileConverterContext.

Returns:

ChatAttachedFile

An ChatAttachedFile instance.

Converts a file pick result to a data item attachment. In general here you need to create an instance of your business object that the RadChat will try to add automatically to the AttachedFilesSource collection.

C#
object ConvertToDataItem(IFileInfo fileToAttach, ChatAttachedFileConverterContext context)
Parameters:fileToAttachIFileInfo

The file to be converted and attached.

contextChatAttachedFileConverterContext

The respective ChatAttachedFileConverterContext.

Returns:

object

The corresponding data item.