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:
public class RadChat : RadContentView, IRadContentView, IContentView, IView, IElement, ITransform, IPadding, ICrossPlatformLayout
Inheritance: objectRadContentViewRadChat
Implements:
Inherited Members
Constructors
Fields
ActualRemoveAttachedFileCommandProperty
BindableProperty
Identifies the ActualRemoveAttachedFileCommand property.
public static readonly BindableProperty ActualRemoveAttachedFileCommandProperty
ActualScrollMediatorModeProperty
BindableProperty
Identifies the ActualScrollMediator property.
public static readonly BindableProperty ActualScrollMediatorModeProperty
ActualSendMessageCommandProperty
BindableProperty
Identifies the ActualSendMessageCommand property.
public static readonly BindableProperty ActualSendMessageCommandProperty
AttachedFileConverterProperty
BindableProperty
Identifies the AttachedFileConverter property.
public static readonly BindableProperty AttachedFileConverterProperty
AttachedFilesProperty
BindableProperty
Identifies the AttachedFiles property.
public static readonly BindableProperty AttachedFilesProperty
AttachedFilesSourceProperty
BindableProperty
Identifies the AttachedFilesSource property.
public static readonly BindableProperty AttachedFilesSourceProperty
AttachFilesCommandProperty
BindableProperty
Identifies the AttachFilesCommand property.
public static readonly BindableProperty AttachFilesCommandProperty
AuthorProperty
BindableProperty
Identifies the Author property.
public static readonly BindableProperty AuthorProperty
AutoGenerateMoreButtonActionsProperty
BindableProperty
Identifies the AutoGenerateMoreButtonActions property.
public static readonly BindableProperty AutoGenerateMoreButtonActionsProperty
AutoScrollModeProperty
BindableProperty
Identifies the AutoScrollMode property.
public static readonly BindableProperty AutoScrollModeProperty
BackgroundColorProperty
BindableProperty
Identifies the BackgroundColor property.
public static readonly BindableProperty BackgroundColorProperty
ChatListViewItemStyleProperty
BindableProperty
Identifies the ChatListViewItemStyle property.
public static readonly BindableProperty ChatListViewItemStyleProperty
ControlTemplateProperty
BindableProperty
Identifies the ControlTemplate property.
public static readonly BindableProperty ControlTemplateProperty
DownloadAttachmentsCommandProperty
BindableProperty
Identifies the DownloadAttachmentsCommand property.
public static readonly BindableProperty DownloadAttachmentsCommandProperty
InputAreaStyleProperty
BindableProperty
Identifies the InputAreaStyle property.
public static readonly BindableProperty InputAreaStyleProperty
IsMoreButtonVisibleProperty
BindableProperty
Identifies the IsMoreButtonVisible property.
public static readonly BindableProperty IsMoreButtonVisibleProperty
IsSpeechToTextButtonVisibleProperty
BindableProperty
Identifies the IsSpeechToTextButtonVisible property.
public static readonly BindableProperty IsSpeechToTextButtonVisibleProperty
ItemConverterProperty
BindableProperty
Identifies the ItemConverter property.
public static readonly BindableProperty ItemConverterProperty
ItemsSourceProperty
BindableProperty
Identifies the ItemsSource property.
public static readonly BindableProperty ItemsSourceProperty
ItemTemplateSelectorProperty
BindableProperty
Identifies the ItemTemplateSelector property.
public static readonly BindableProperty ItemTemplateSelectorProperty
MessageProperty
BindableProperty
Identifies the Message property.
public static readonly BindableProperty MessageProperty
MoreButtonActionItemViewStyleProperty
BindableProperty
Identifies the MoreButtonActionItemViewStyle property.
public static readonly BindableProperty MoreButtonActionItemViewStyleProperty
MoreButtonActionsProperty
BindableProperty
Identifies the MoreButtonActions property.
public static readonly BindableProperty MoreButtonActionsProperty
MoreButtonStyleProperty
BindableProperty
Identifies the MoreButtonStyle property.
public static readonly BindableProperty MoreButtonStyleProperty
PickerProperty
BindableProperty
Identifies the Picker property.
public static readonly BindableProperty PickerProperty
PickFileCommandProperty
BindableProperty
Identifies the PickFileCommand property.
public static readonly BindableProperty PickFileCommandProperty
PickFileTypesProperty
BindableProperty
Identifies the PickFileTypes property.
public static readonly BindableProperty PickFileTypesProperty
PickPhotoCommandProperty
BindableProperty
Identifies the PickPhotoCommand property.
public static readonly BindableProperty PickPhotoCommandProperty
RemoveAttachedFileCommandProperty
BindableProperty
Identifies the RemoveAttachedFileCommand property.
public static readonly BindableProperty RemoveAttachedFileCommandProperty
SendButtonStyleProperty
BindableProperty
Identifies the SendButtonStyle property.
public static readonly BindableProperty SendButtonStyleProperty
SendMessageButtonImageProperty
BindableProperty
Identifies the SendMessageButtonImage property.
public static readonly BindableProperty SendMessageButtonImageProperty
SendMessageCommandProperty
BindableProperty
Identifies the SendMessageCommand property.
public static readonly BindableProperty SendMessageCommandProperty
ShareAttachmentsCommandProperty
BindableProperty
Identifies the ShareAttachmentsCommand property.
public static readonly BindableProperty ShareAttachmentsCommandProperty
SpeechToTextButtonStyleProperty
BindableProperty
Identifies the SpeechToTextButtonStyle property.
public static readonly BindableProperty SpeechToTextButtonStyleProperty
TakePhotoCommandProperty
BindableProperty
Identifies the TakePhotoCommand property.
public static readonly BindableProperty TakePhotoCommandProperty
TypingIndicatorProperty
BindableProperty
Identifies the TypingIndicator property.
public static readonly BindableProperty TypingIndicatorProperty
Properties
Gets the actual command that is executed when removing an attached file. This command will execute the custom RemoveAttachedFileCommand.
public ICommand ActualRemoveAttachedFileCommand { get; }
Gets or sets the actual ScrollMediator used by the chat to mediate the scrolling functionality.
public ScrollMediator ActualScrollMediator { get; }
Gets the actual send command that is executed when sending a message. This command will execute the custom SendMessageCommand.
public ICommand ActualSendMessageCommand { get; }
Gets or sets the converter that performs the conversion between a data item representing an attached file and a ChatAttachedFile.
public IChatAttachedFileConverter AttachedFileConverter { get; set; }
Gets or sets a collection that contains the currently attached files that have not yet been sent.
public ICollection<PromptInputAttachedFile> AttachedFiles { get; }
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.
public IEnumerable AttachedFilesSource { get; set; }
Gets or sets the command that is executed when the files the end-user picked need to be attached/uploaded.
public ICommand AttachFilesCommand { get; set; }
Gets or sets the current author of outgoing messages in the chat.
public Author Author { get; set; }
Gets or sets a value indicating whether to automatically generate default actions for the 'More' button.
public bool AutoGenerateMoreButtonActions { get; set; }
Gets or sets the mode which defines the automatic scrolling behavior of the RadChatListView when a message is sent or received.
public AutoScrollMode AutoScrollMode { get; set; }
BackgroundColor
Color
public Color BackgroundColor { get; set; }
Gets or sets the Item Style of the RadChatListView in the RadChat control. The target type of this style is RadCollectionViewItemView.
public Style ChatListViewItemStyle { get; set; }
ControlTemplate
ControlTemplate
Gets or sets the control template that defines the visual structure of RadChat.
public ControlTemplate ControlTemplate { get; set; }
A ControlTemplate that defines the visual tree for the chat.
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.
public ICommand DownloadAttachmentsCommand { get; set; }
InputAreaStyle
Style
Gets or sets the style of the .
public Style InputAreaStyle { get; set; }
Gets or sets a value indicating whether the 'More' button is visible in the chat input area. When set to true, the 'More' button is displayed, allowing users to access additional actions such as attaching files or images. When set to false, the 'More' button is hidden and these actions are not accessible from the input area. The default value is false.
public bool IsMoreButtonVisible { get; set; }
Gets or sets a value indicating whether the Speech-To-Text button is visible in the chat input area. When set to true, the Speech-To-Text button is displayed, allowing users to dictate messages using speech recognition. When set to false, the button is hidden and speech-to-text functionality is not accessible from the input area. The default value is platform-dependent: false on Windows, true on other platforms.
public bool IsSpeechToTextButtonVisible { get; set; }
Gets or sets the converter that performs the conversion between data and chat items.
public IChatItemConverter ItemConverter { get; set; }
Gets or sets the items source from which chat items are generated.
public IEnumerable ItemsSource { get; set; }
ItemTemplateSelector
DataTemplateSelector
Gets or sets the template selector for visualizing chat items.
public DataTemplateSelector ItemTemplateSelector { get; set; }
Gets or sets the message that is typed in the chat entry.
public object Message { get; set; }
Gets or sets a custom style for the action item views in the 'More' button dropdown. The actual style that is applied is a merger between this style and the default style for RadTemplatedButton. The target type of this style is RadTemplatedButton.
public Style MoreButtonActionItemViewStyle { get; set; }
Gets or sets the collection of toolbar actions displayed in the input area more button.
public IList<PromptInputButtonAction> MoreButtonActions { get; set; }
MoreButtonStyle
Style
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 RadDropDownButton. The target type of this style is RadDropDownButton .
public Style MoreButtonStyle { get; set; }
Picker
View
Gets or sets the inline picker of the chat.
public View Picker { get; set; }
Gets or sets the command that opens the for attaching files for upload.
public ICommand PickFileCommand { get; set; }
PickFileTypes
FilePickerFileType
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).
public FilePickerFileType PickFileTypes { get; set; }
Gets or sets the command that opens the for attaching photos for upload.
public ICommand PickPhotoCommand { get; set; }
Gets or sets the command that should remove an attached file from the AttachedFilesSource collection in the view model.
public ICommand RemoveAttachedFileCommand { get; set; }
SendButtonStyle
Style
Gets or sets the style of the send button in the RadChat control. The actual style that is applied is a merger between this style and the default style for the send button. The target type of this style is RadTemplatedButton.
public Style SendButtonStyle { get; set; }
SendMessageButtonImage
ImageSource
Gets or sets the image for the send message button.
public ImageSource SendMessageButtonImage { get; set; }
Gets or sets the command that triggers the share attachments operation.
public ICommand ShareAttachmentsCommand { get; set; }
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.
public Style SpeechToTextButtonStyle { get; set; }
Gets or sets the command that opens the camera for attaching a photo.
public ICommand TakePhotoCommand { get; set; }
TypingIndicator
View
Gets or sets the typing indicator displayed when another author is typing.
public View TypingIndicator { get; set; }
Methods
Attempts to set focus to the entry element.
public bool FocusEntry()
true if the keyboard focus was set to the entry element; false if the call to this method did not force a focus change.
protected override void OnApplyTemplate()
Called when the binding context changes.
protected override void OnBindingContextChanged()
Overrides:
protected override void OnPropertyChanged(string propertyName = null)
Scrolls to the item at the provided index.
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.
Events
Raised when the end user picks files to attach.
public event EventHandler<ChatAttachFilesEventArgs> AttachFiles
Raised when the end user removes an attached file, via the X button of the PromptInputAttachedFilesView.
public event EventHandler<ChatRemoveAttachedFileEventArgs> RemoveAttachedFile
Raised when a message is sent from the chat by the current author (by clicking the send messsage button or pressing Enter).
public event EventHandler SendMessage