Class
RadChat

A component that visualizes chat conversation between two or more participants. Has a built-in mechanism for displaying time-pickers, action-cards, and other things that bot services commonly use. Has a built-in TypingIndicator to let the user know if othe participants in the chat are currently writing.

Definition

Namespace:Telerik.Maui.Controls

Assembly:Telerik.Maui.Controls.dll

Syntax:

cs-api-definition
public class RadChat : RadContentView, IRadContentView, IContentView, IView, IElement, ITransform, IPadding, ICrossPlatformLayout

Inheritance: objectRadContentViewRadChat

Implements: IContentViewICrossPlatformLayoutIElementIPaddingIRadContentViewITransformIView

Inherited Members RadContentView.ActualStyleClassPropertyRadContentView.OnChildAdded(Element)RadContentView.OnChildRemoved(Element, int)RadContentView.OnHandlerChanged()

Constructors

RadChat()

Initializes a new instance of the RadChat class.

Declaration

cs-api-definition
public RadChat()

Fields

ActualRemoveAttachedFileCommandProperty

Identifies the ActualRemoveAttachedFileCommand property.

Declaration

cs-api-definition
public static readonly BindableProperty ActualRemoveAttachedFileCommandProperty

Field Value

BindableProperty

ActualScrollMediatorModeProperty

Identifies the ActualScrollMediator property.

Declaration

cs-api-definition
public static readonly BindableProperty ActualScrollMediatorModeProperty

Field Value

BindableProperty

ActualSendMessageCommandProperty

Identifies the ActualSendMessageCommand property.

Declaration

cs-api-definition
public static readonly BindableProperty ActualSendMessageCommandProperty

Field Value

BindableProperty

AttachFilesCommandProperty

Identifies the AttachFilesCommand property.

Declaration

cs-api-definition
public static readonly BindableProperty AttachFilesCommandProperty

Field Value

BindableProperty

AttachedFileConverterProperty

Identifies the AttachedFileConverter property.

Declaration

cs-api-definition
public static readonly BindableProperty AttachedFileConverterProperty

Field Value

BindableProperty

AttachedFilesProperty

Identifies the AttachedFiles property.

Declaration

cs-api-definition
public static readonly BindableProperty AttachedFilesProperty

Field Value

BindableProperty

AttachedFilesSourceProperty

Identifies the AttachedFilesSource property.

Declaration

cs-api-definition
public static readonly BindableProperty AttachedFilesSourceProperty

Field Value

BindableProperty

AuthorProperty

Identifies the Author property.

Declaration

cs-api-definition
public static readonly BindableProperty AuthorProperty

Field Value

BindableProperty

AutoGenerateMoreButtonActionsProperty

Identifies the AutoGenerateMoreButtonActions property.

Declaration

cs-api-definition
public static readonly BindableProperty AutoGenerateMoreButtonActionsProperty

Field Value

BindableProperty

AutoScrollModeProperty

Identifies the AutoScrollMode property.

Declaration

cs-api-definition
public static readonly BindableProperty AutoScrollModeProperty

Field Value

BindableProperty

BackgroundColorProperty

Identifies the BackgroundColor property.

Declaration

cs-api-definition
public static readonly BindableProperty BackgroundColorProperty

Field Value

BindableProperty

DownloadAttachmentsCommandProperty

Identifies the DownloadAttachmentsCommand property.

Declaration

cs-api-definition
public static readonly BindableProperty DownloadAttachmentsCommandProperty

Field Value

BindableProperty

InputAreaStyleProperty

Identifies the InputAreaStyle property.

Declaration

cs-api-definition
public static readonly BindableProperty InputAreaStyleProperty

Field Value

BindableProperty

ItemConverterProperty

Identifies the ItemConverter property.

Declaration

cs-api-definition
public static readonly BindableProperty ItemConverterProperty

Field Value

BindableProperty

ItemTemplateSelectorProperty

Identifies the ItemTemplateSelector property.

Declaration

cs-api-definition
public static readonly BindableProperty ItemTemplateSelectorProperty

Field Value

BindableProperty

ItemsSourceProperty

Identifies the ItemsSource property.

Declaration

cs-api-definition
public static readonly BindableProperty ItemsSourceProperty

Field Value

BindableProperty

MessageProperty

Identifies the Message property.

Declaration

cs-api-definition
public static readonly BindableProperty MessageProperty

Field Value

BindableProperty

MoreButtonActionsProperty

Identifies the MoreButtonActions property.

Declaration

cs-api-definition
public static readonly BindableProperty MoreButtonActionsProperty

Field Value

BindableProperty

MoreButtonStyleProperty

Identifies the MoreButtonStyle property.

Declaration

cs-api-definition
public static readonly BindableProperty MoreButtonStyleProperty

Field Value

BindableProperty

PickFileCommandProperty

Identifies the PickFileCommand property.

Declaration

cs-api-definition
public static readonly BindableProperty PickFileCommandProperty

Field Value

BindableProperty

PickFileTypesProperty

Identifies the PickFileTypes property.

Declaration

cs-api-definition
public static readonly BindableProperty PickFileTypesProperty

Field Value

BindableProperty

PickPhotoCommandProperty

Identifies the PickPhotoCommand property.

Declaration

cs-api-definition
public static readonly BindableProperty PickPhotoCommandProperty

Field Value

BindableProperty

PickerProperty

Identifies the Picker property.

Declaration

cs-api-definition
public static readonly BindableProperty PickerProperty

Field Value

BindableProperty

RemoveAttachedFileCommandProperty

Identifies the RemoveAttachedFileCommand property.

Declaration

cs-api-definition
public static readonly BindableProperty RemoveAttachedFileCommandProperty

Field Value

BindableProperty

SendMessageButtonImageProperty

Identifies the SendMessageButtonImage property.

Declaration

cs-api-definition
public static readonly BindableProperty SendMessageButtonImageProperty

Field Value

BindableProperty

SendMessageCommandProperty

Identifies the SendMessageCommand property.

Declaration

cs-api-definition
public static readonly BindableProperty SendMessageCommandProperty

Field Value

BindableProperty

ShareAttachmentsCommandProperty

Identifies the ShareAttachmentsCommand property.

Declaration

cs-api-definition
public static readonly BindableProperty ShareAttachmentsCommandProperty

Field Value

BindableProperty

SpeechToTextButtonStyleProperty

Identifies the SpeechToTextButtonStyle property.

Declaration

cs-api-definition
public static readonly BindableProperty SpeechToTextButtonStyleProperty

Field Value

BindableProperty

TakePhotoCommandProperty

Identifies the TakePhotoCommand property.

Declaration

cs-api-definition
public static readonly BindableProperty TakePhotoCommandProperty

Field Value

BindableProperty

TypingIndicatorProperty

Identifies the TypingIndicator property.

Declaration

cs-api-definition
public static readonly BindableProperty TypingIndicatorProperty

Field Value

BindableProperty

Properties

ActualRemoveAttachedFileCommand

Gets the actual command that is executed when removing an attached file. This command will execute the custom RemoveAttachedFileCommand.

Declaration

cs-api-definition
public ICommand ActualRemoveAttachedFileCommand { get; }

Property Value

ICommand

ActualScrollMediator

Gets or sets the actual ScrollMediator used by the chat to mediate the scrolling functionality.

Declaration

cs-api-definition
public ScrollMediator ActualScrollMediator { get; }

Property Value

ScrollMediator

ActualSendMessageCommand

Gets the actual send command that is executed when sending a message. This command will execute the custom SendMessageCommand.

Declaration

cs-api-definition
public ICommand ActualSendMessageCommand { get; }

Property Value

ICommand

AttachFilesCommand

Gets or sets the command that is executed when the files the end-user picked need to be attached/uploaded.

Declaration

cs-api-definition
public ICommand AttachFilesCommand { get; set; }

Property Value

ICommand

AttachedFileConverter

Gets or sets the converter that performs the conversion between a data item representing an attached file and a ChatAttachedFile.

Declaration

cs-api-definition
public IChatAttachedFileConverter AttachedFileConverter { get; set; }

Property Value

IChatAttachedFileConverter

AttachedFiles

Gets or sets a collection that contains the currently attached files that have not yet been sent.

Declaration

cs-api-definition
public ICollection<ChatAttachedFile> AttachedFiles { get; }

Property Value

ICollection<ChatAttachedFile>

AttachedFilesSource

Gets or sets the items source from which the chat populates the AttachedFiles collection, i.e. the files that are to be uploaded and have not yet been sent.

Declaration

cs-api-definition
public IEnumerable AttachedFilesSource { get; set; }

Property Value

IEnumerable

Author

Gets or sets the current author of outgoing messages in the chat.

Declaration

cs-api-definition
public Author Author { get; set; }

Property Value

Author

AutoGenerateMoreButtonActions

Gets or sets a value indicating whether to automatically generate default actions for the 'More' button.

Declaration

cs-api-definition
public bool AutoGenerateMoreButtonActions { get; set; }

Property Value

bool

AutoScrollMode

Gets or sets the mode which defines the automatic scrolling behavior of the RadChatListView when a message is sent or received.

Declaration

cs-api-definition
public AutoScrollMode AutoScrollMode { get; set; }

Property Value

AutoScrollMode

BackgroundColor

Declaration

cs-api-definition
public Color BackgroundColor { get; set; }

Property Value

Color

DownloadAttachmentsCommand

Gets or sets the command that is executed when the end user initiates download of attachments for a ChatAttachmentsMessage. The command parameter of this command is of type ChatDownloadAttachmentsCommandContext.

Declaration

cs-api-definition
public ICommand DownloadAttachmentsCommand { get; set; }

Property Value

ICommand

InputAreaStyle

Gets or sets the style of the .

Declaration

cs-api-definition
public Style InputAreaStyle { get; set; }

Property Value

Style

ItemConverter

Gets or sets the converter that performs the conversion between data and chat items.

Declaration

cs-api-definition
public IChatItemConverter ItemConverter { get; set; }

Property Value

IChatItemConverter

ItemTemplateSelector

Gets or sets the template selector for visualizing chat items.

Declaration

cs-api-definition
public DataTemplateSelector ItemTemplateSelector { get; set; }

Property Value

DataTemplateSelector

Items

Gets the collection of chat items.

Declaration

cs-api-definition
public IList<ChatItem> Items { get; }

Property Value

IList<ChatItem>

ItemsSource

Gets or sets the items source from which chat items are generated.

Declaration

cs-api-definition
public IEnumerable ItemsSource { get; set; }

Property Value

IEnumerable

Message

Gets or sets the message that is typed in the chat entry.

Declaration

cs-api-definition
public object Message { get; set; }

Property Value

object

MoreButtonActions

Gets or sets the collection of toolbar actions displayed in the input area more button.

Declaration

cs-api-definition
public IList<ChatButtonAction> MoreButtonActions { get; set; }

Property Value

IList<ChatButtonAction>

MoreButtonStyle

Gets or sets a custom style that is to be applied to the 'More' button. The actual style that is applied is a merger between this style and the default style for the ChatMoreButtonToolbarItemView. The target type of this style is ChatMoreButtonToolbarItemView .

Declaration

cs-api-definition
public Style MoreButtonStyle { get; set; }

Property Value

Style

PickFileCommand

Gets or sets the command that opens the for attaching files for upload.

Declaration

cs-api-definition
public ICommand PickFileCommand { get; set; }

Property Value

ICommand

PickFileTypes

Gets or sets the type of files that can be attached in the UI that is shown when the end-user clicks the pick-file button (attach-files button).

Declaration

cs-api-definition
public FilePickerFileType PickFileTypes { get; set; }

Property Value

FilePickerFileType

PickPhotoCommand

Gets or sets the command that opens the for attaching photos for upload.

Declaration

cs-api-definition
public ICommand PickPhotoCommand { get; set; }

Property Value

ICommand

Picker

Gets or sets the inline picker of the chat.

Declaration

cs-api-definition
public View Picker { get; set; }

Property Value

View

RemoveAttachedFileCommand

Gets or sets the command that should remove an attached file from the AttachedFilesSource collection in the view model.

Declaration

cs-api-definition
public ICommand RemoveAttachedFileCommand { get; set; }

Property Value

ICommand

SendMessageButtonImage

Gets or sets the image for the send message button.

Declaration

cs-api-definition
public ImageSource SendMessageButtonImage { get; set; }

Property Value

ImageSource

SendMessageCommand

Gets or sets the custom command that will be executed when sending a message (when the Send message button is pressed or Enter is pressed). The parameter of this command is of type object and the value is the same as the Message property.

Declaration

cs-api-definition
public ICommand SendMessageCommand { get; set; }

Property Value

ICommand

ShareAttachmentsCommand

Gets or sets the command that triggers the share attachments operation.

Declaration

cs-api-definition
public ICommand ShareAttachmentsCommand { get; set; }

Property Value

ICommand

SpeechToTextButtonStyle

Gets or sets the style of the RadSpeechToTextButton in the RadChat control. The actual style that is applied is a merger between this style and the default style for the RadSpeechToTextButton The target type of this style is RadSpeechToTextButton.

Declaration

cs-api-definition
public Style SpeechToTextButtonStyle { get; set; }

Property Value

Style

TakePhotoCommand

Gets or sets the command that opens the camera for attaching a photo.

Declaration

cs-api-definition
public ICommand TakePhotoCommand { get; set; }

Property Value

ICommand

TypingIndicator

Gets or sets the typing indicator displayed when another author is typing.

Declaration

cs-api-definition
public View TypingIndicator { get; set; }

Property Value

View

Methods

FocusEntry()

Attempts to set focus to the entry element.

Declaration

cs-api-definition
public bool FocusEntry()

Returns

bool

true if the keyboard focus was set to the entry element; false if the call to this method did not force a focus change.

OnApplyTemplate()

Declaration

cs-api-definition
protected override void OnApplyTemplate()

OnBindingContextChanged()

Called when the binding context changes.

Declaration

cs-api-definition
protected override void OnBindingContextChanged()

Overrides RadContentView.OnBindingContextChanged()

OnPropertyChanged(string)

Declaration

cs-api-definition
protected override void OnPropertyChanged(string propertyName = null)

Parameters

propertyName

string

ScrollTo(int)

Scrolls to the item at the provided index.

Declaration

cs-api-definition
public void ScrollTo(int index)

Parameters

index

int

The index of the item to scroll to.

StopSpeechToTextRecognition()

Stops the speech to text recognition.

If the speech recognizer is currently in the StartingListening or Listening state, this method will stop the recognition process. If the recognizer is not listening, this method has no effect.

Declaration

cs-api-definition
public Task StopSpeechToTextRecognition()

Returns

Task

Events

AttachFiles

Raised when the end user picks files to attach.

Declaration

cs-api-definition
public event EventHandler<ChatAttachFilesEventArgs> AttachFiles

Event Value

EventHandler<ChatAttachFilesEventArgs>

RemoveAttachedFile

Raised when the end user removes an attached file, via the X button of the ChatInputAreaAttachedFileItemView.

Declaration

cs-api-definition
public event EventHandler<ChatRemoveAttachedFileEventArgs> RemoveAttachedFile

Event Value

EventHandler<ChatRemoveAttachedFileEventArgs>

SendMessage

Raised when a message is sent from the chat by the current author (by clicking the send messsage button or pressing Enter).

Declaration

cs-api-definition
public event EventHandler SendMessage

Event Value

EventHandler

In this article
DefinitionConstructorsRadChat()FieldsActualRemoveAttachedFileCommandPropertyActualScrollMediatorModePropertyActualSendMessageCommandPropertyAttachFilesCommandPropertyAttachedFileConverterPropertyAttachedFilesPropertyAttachedFilesSourcePropertyAuthorPropertyAutoGenerateMoreButtonActionsPropertyAutoScrollModePropertyBackgroundColorPropertyDownloadAttachmentsCommandPropertyInputAreaStylePropertyItemConverterPropertyItemTemplateSelectorPropertyItemsSourcePropertyMessagePropertyMoreButtonActionsPropertyMoreButtonStylePropertyPickFileCommandPropertyPickFileTypesPropertyPickPhotoCommandPropertyPickerPropertyRemoveAttachedFileCommandPropertySendMessageButtonImagePropertySendMessageCommandPropertyShareAttachmentsCommandPropertySpeechToTextButtonStylePropertyTakePhotoCommandPropertyTypingIndicatorPropertyPropertiesActualRemoveAttachedFileCommandActualScrollMediatorActualSendMessageCommandAttachFilesCommandAttachedFileConverterAttachedFilesAttachedFilesSourceAuthorAutoGenerateMoreButtonActionsAutoScrollModeBackgroundColorDownloadAttachmentsCommandInputAreaStyleItemConverterItemTemplateSelectorItemsItemsSourceMessageMoreButtonActionsMoreButtonStylePickFileCommandPickFileTypesPickPhotoCommandPickerRemoveAttachedFileCommandSendMessageButtonImageSendMessageCommandShareAttachmentsCommandSpeechToTextButtonStyleTakePhotoCommandTypingIndicatorMethodsFocusEntry()OnApplyTemplate()OnBindingContextChanged()OnPropertyChanged(string)ScrollTo(int)StopSpeechToTextRecognition()EventsAttachFilesRemoveAttachedFileSendMessage
Not finding the help you need?
Contact Support