RadChat
RadChat is control that provides the look and feel of a chat application. It exposes API for managing and display of text and media messages.
Definition
Namespace:Telerik.Windows.Controls
Assembly:Telerik.Windows.Controls.ConversationalUI.dll
Syntax:
[TelerikToolboxCategory("ConversationalUI")]
public class RadChat : Control, IMessageReportSubscriber
Inheritance: objectRadChat
Derived Classes:
Implements:
Constructors
Fields
AcceptsReturnProperty
DependencyProperty
Identifies the AcceptsReturn dependency property.
public static readonly DependencyProperty AcceptsReturnProperty
AdditionalContentTemplateProperty
DependencyProperty
Identifies the AdditionalContentTemplateProperty dependency property.
public static readonly DependencyProperty AdditionalContentTemplateProperty
AttachmentActionRequestedEvent
RoutedEvent
Identifies the event.
public static readonly RoutedEvent AttachmentActionRequestedEvent
AttachmentTemplateProperty
DependencyProperty
Identifies the AttachmentTemplate dependency property.
public static readonly DependencyProperty AttachmentTemplateProperty
AttachmentTemplateSelectorProperty
DependencyProperty
Identifies the AttachmentTemplateSelector dependency property.
public static readonly DependencyProperty AttachmentTemplateSelectorProperty
AutoIncludeTimeBreaksProperty
DependencyProperty
Identifies the AutoIncludeTimeBreaks dependency property.
public static readonly DependencyProperty AutoIncludeTimeBreaksProperty
CancelProcessingCommandProperty
DependencyProperty
Identifies the CancelProcessingCommand dependency property.
public static readonly DependencyProperty CancelProcessingCommandProperty
CanUserSelectMessageProperty
DependencyProperty
Identifies the CanUserSelectMessage dependency property.
public static readonly DependencyProperty CanUserSelectMessageProperty
CurrentAuthorProperty
DependencyProperty
Identifies the CurrentAuthor dependency property.
public static readonly DependencyProperty CurrentAuthorProperty
DataSourceProperty
DependencyProperty
Identifies the DataSource dependency property.
public static readonly DependencyProperty DataSourceProperty
FileIconGlyphConverterProperty
DependencyProperty
Identifies the FileIconGlyphConverter dependency property.
public static readonly DependencyProperty FileIconGlyphConverterProperty
InputBoxTextProperty
DependencyProperty
Identifies the InputBoxText dependency property.
public static readonly DependencyProperty InputBoxTextProperty
InputBoxWatermarkContentProperty
DependencyProperty
Identifies the InputBoxWatermarkContent dependency property.
public static readonly DependencyProperty InputBoxWatermarkContentProperty
IsMoreButtonVisibleProperty
DependencyProperty
Identifies the IsMoreButtonVisible dependency property.
public static readonly DependencyProperty IsMoreButtonVisibleProperty
IsProcessingProperty
DependencyProperty
Identifies the IsProcessing dependency property.
public static readonly DependencyProperty IsProcessingProperty
IsPromptSuggestionsButtonVisibleProperty
DependencyProperty
Identifies the IsPromptSuggestionsButtonVisible dependency property.
public static readonly DependencyProperty IsPromptSuggestionsButtonVisibleProperty
IsRecentPromptsVisibleProperty
DependencyProperty
Identifies the IsRecentPromptsVisible dependency property.
public static readonly DependencyProperty IsRecentPromptsVisibleProperty
IsSpeechToTextButtonVisibleProperty
DependencyProperty
Identifies the IsSpeechToTextButtonVisible dependency property.
public static readonly DependencyProperty IsSpeechToTextButtonVisibleProperty
IsSuggestedPromptsVisibleProperty
DependencyProperty
Identifies the IsSuggestedPromptsVisible dependency property.
public static readonly DependencyProperty IsSuggestedPromptsVisibleProperty
MaxInputLinesProperty
DependencyProperty
Identifies the MaxInputLines dependency property.
public static readonly DependencyProperty MaxInputLinesProperty
MaxVisibleAttachmentsProperty
DependencyProperty
Identifies the MaxVisibleAttachments dependency property.
public static readonly DependencyProperty MaxVisibleAttachmentsProperty
MessageConverterProperty
DependencyProperty
Identifies the MessageConverter dependency property.
public static readonly DependencyProperty MessageConverterProperty
MessageListTemplateSelectorProperty
DependencyProperty
Identifies the MessageListTemplateSelector dependency property.
public static readonly DependencyProperty MessageListTemplateSelectorProperty
MessageOverlayTemplateSelectorProperty
DependencyProperty
Identifies the MessageOverlayTemplateSelector dependency property.
public static readonly DependencyProperty MessageOverlayTemplateSelectorProperty
MessagePopupTemplateSelectorProperty
DependencyProperty
Identifies the MessagePopupTemplateSelector dependency property.
public static readonly DependencyProperty MessagePopupTemplateSelectorProperty
MoreButtonActionsItemTemplateProperty
DependencyProperty
Identifies the MoreButtonActionsItemTemplate dependency property.
public static readonly DependencyProperty MoreButtonActionsItemTemplateProperty
MoreButtonActionsItemTemplateSelectorProperty
DependencyProperty
Identifies the MoreButtonActionsItemTemplateSelector dependency property.
public static readonly DependencyProperty MoreButtonActionsItemTemplateSelectorProperty
MoreButtonActionsProperty
DependencyProperty
Identifies the MoreButtonActions dependency property.
public static readonly DependencyProperty MoreButtonActionsProperty
OpenPromptSuggestionsOnFocusProperty
DependencyProperty
Identifies the OpenPromptSuggestionsOnFocus dependency property.
public static readonly DependencyProperty OpenPromptSuggestionsOnFocusProperty
PromptSuggestionsEmptyContentProperty
DependencyProperty
Identifies the PromptSuggestionsEmptyContent dependency property.
public static readonly DependencyProperty PromptSuggestionsEmptyContentProperty
PromptSuggestionsEmptyContentTemplateProperty
DependencyProperty
Identifies the PromptSuggestionsEmptyContentTemplate dependency property.
public static readonly DependencyProperty PromptSuggestionsEmptyContentTemplateProperty
RecentPromptsProperty
DependencyProperty
Identifies the RecentPrompts dependency property.
public static readonly DependencyProperty RecentPromptsProperty
RegenerateResponseEvent
RoutedEvent
Identifies the RegenerateResponse routed event.
public static readonly RoutedEvent RegenerateResponseEvent
This event uses the bubbling routing strategy, allowing it to propagate from child to parent elements in the visual tree. It is typically used to signal that a response regeneration action has been requested.
RemoveAttachedFileCommandProperty
DependencyProperty
Identifies the RemoveAttachedFileCommand dependency property.
public static readonly DependencyProperty RemoveAttachedFileCommandProperty
ReportMessageResultEvent
RoutedEvent
Identifies the Event.
public static readonly RoutedEvent ReportMessageResultEvent
SendButtonContentProperty
DependencyProperty
Identifies the SendButtonContent dependency property.
public static readonly DependencyProperty SendButtonContentProperty
SendButtonContentTemplateProperty
DependencyProperty
Identifies the SendButtonContentTemplate dependency property.
public static readonly DependencyProperty SendButtonContentTemplateProperty
SendCommandProperty
DependencyProperty
Identifies the SendCommand dependency property.
public static readonly DependencyProperty SendCommandProperty
SendMessageCommandProperty
DependencyProperty
Identifies the SendMessageCommand dependency property.
public static readonly DependencyProperty SendMessageCommandProperty
SendMessageEvent
RoutedEvent
Identifies the Event.
public static readonly RoutedEvent SendMessageEvent
ShowClearButtonProperty
DependencyProperty
Identifies the ShowClearButton dependency property.
public static readonly DependencyProperty ShowClearButtonProperty
ShowOtherAuthorMessageBackgroundProperty
DependencyProperty
Identifies the ShowOtherAuthorMessageBackground dependency property.
public static readonly DependencyProperty ShowOtherAuthorMessageBackgroundProperty
SuggestedActionReportedEvent
RoutedEvent
Identifies the Event.
public static readonly RoutedEvent SuggestedActionReportedEvent
SuggestedActionsOrientationProperty
DependencyProperty
Identifies the SuggestedActionsOrientation dependency property.
public static readonly DependencyProperty SuggestedActionsOrientationProperty
SuggestedActionsProperty
DependencyProperty
Identifies the SuggestedActions dependency property.
public static readonly DependencyProperty SuggestedActionsProperty
SuggestedActionsVisibilityProperty
DependencyProperty
Identifies the SuggestedActionsVisibility dependency property.
public static readonly DependencyProperty SuggestedActionsVisibilityProperty
SuggestedPromptsProperty
DependencyProperty
Identifies the SuggestedPrompts dependency property.
public static readonly DependencyProperty SuggestedPromptsProperty
TimeBreakFormatProperty
DependencyProperty
Identifies the TimeBreakFormat dependency property.
public static readonly DependencyProperty TimeBreakFormatProperty
TimeBreakIntervalProperty
DependencyProperty
Identifies the TimeBreakInterval dependency property.
public static readonly DependencyProperty TimeBreakIntervalProperty
TypingCommandProperty
DependencyProperty
Identifies the TypingCommand dependency property.
public static readonly DependencyProperty TypingCommandProperty
TypingIndicatorIconProperty
DependencyProperty
Identifies the TypingIndicatorIcon dependency property.
public static readonly DependencyProperty TypingIndicatorIconProperty
TypingIndicatorTextProperty
DependencyProperty
Identifies the TypingIndicatorText dependency property.
public static readonly DependencyProperty TypingIndicatorTextProperty
TypingIndicatorVisibilityProperty
DependencyProperty
Identifies the TypingIndicatorVisibility dependency property.
public static readonly DependencyProperty TypingIndicatorVisibilityProperty
UserVotedEvent
RoutedEvent
Identifies the event.
public static readonly RoutedEvent UserVotedEvent
VerticalAvatarAlignmentProperty
DependencyProperty
Identifies the VerticalAvatarAlignment dependency property.
public static readonly DependencyProperty VerticalAvatarAlignmentProperty
Properties
Gets or sets a value indicating whether the input box accepts the Return key to create new lines.
public bool AcceptsReturn { get; set; }
AdditionalContentTemplate
DataTemplate
Gets or sets the custom data template used to display suggestions in the suggestion list.
public DataTemplate AdditionalContentTemplate { get; set; }
Gets the collection of attached files from the prompt input.
public ObservableCollection<PromptInputAttachedFile> AttachedFiles { get; }
AttachmentTemplate
DataTemplate
Gets or sets the data template used to display each attachment item.
public DataTemplate AttachmentTemplate { get; set; }
AttachmentTemplateSelector
DataTemplateSelector
Gets or sets the data template selector used to choose the template for each attachment item.
public DataTemplateSelector AttachmentTemplateSelector { get; set; }
Gets or sets value indicating whether TimeBreaks are automatically included.
public bool AutoIncludeTimeBreaks { get; set; }
Gets or sets the command that is executed to cancel an ongoing operation.
public ICommand CancelProcessingCommand { get; set; }
Gets or sets value indicating whether users can select inline messages through the UI.
public bool CanUserSelectMessage { get; set; }
Gets or sets the current author.
public Author CurrentAuthor { get; set; }
Gets or sets a data source that will be used to generate messages in data-bound scenarios.
public IEnumerable DataSource { get; set; }
FileIconGlyphConverter
IValueConverter
Gets or sets the converter used to convert a file name to a glyph character for display in the attachment area.
public IValueConverter FileIconGlyphConverter { get; set; }
Gets a value indicating whether there are any suggested or recent prompts available.
public bool HasPromptSuggestions { get; }
Gets a value indicating whether the recent prompts collection contains any items.
public bool HasRecentPrompts { get; }
Gets a value indicating whether the suggested prompts collection contains any items.
public bool HasSuggestedPrompts { get; }
Gets the collection of inline messages.
protected virtual IEnumerable<MessageBase> InlineMessages { get; }
Gets or sets the input box text.
public string InputBoxText { get; set; }
Gets or sets the input box watermark content.
public object InputBoxWatermarkContent { get; set; }
Gets or sets a value indicating whether the more button is visible in the prompt input.
public bool IsMoreButtonVisible { get; set; }
Gets or sets a value indicating whether the control is in a processing state.
public bool IsProcessing { get; set; }
Gets or sets a value indicating whether the prompt suggestions button is visible.
public bool IsPromptSuggestionsButtonVisible { get; set; }
Gets or sets a value indicating whether the recent prompts section is visible in the suggestions popup.
public bool IsRecentPromptsVisible { get; set; }
Gets or sets a value indicating whether the speech-to-text button is visible in the prompt input.
public bool IsSpeechToTextButtonVisible { get; set; }
Gets or sets a value indicating whether the suggested prompts section is visible in the suggestions popup.
public bool IsSuggestedPromptsVisible { get; set; }
Gets the last message.
public virtual InlineViewModel LastMessage { get; }
Gets the last message group.
public virtual MessageGroupViewModel LastMessageGroup { get; }
Gets or sets the maximum number of visible lines in the input text box.
public int MaxInputLines { get; set; }
Gets or sets the maximum number of attachments visible before the rest are collapsed behind an expand button.
public int MaxVisibleAttachments { get; set; }
Gets or sets an IMessageConverter that will be used for converting messages to DataSource type vice versa.
public IMessageConverter MessageConverter { get; set; }
Gets the collection of MessageGroups.
public ObservableCollection<MessageGroupViewModel> MessageGroups { get; }
Gets the collection of MessageListItems (MessageGroups and TimeBreaks).
public ObservableCollection<MessageListItemViewModelBase> MessageListItems { get; }
Gets or sets the DataTemplate selector that is used for displaying messages in ChatMessageList.
public MessageTemplateSelector MessageListTemplateSelector { get; set; }
Gets or sets the DataTemplate selector that is used for displaying messages in ChatOverlay.
public MessageTemplateSelector MessageOverlayTemplateSelector { get; set; }
Gets or sets the DataTemplate selector that is used for displaying messages in ChatPopupPlaceholder.
public MessageTemplateSelector MessagePopupTemplateSelector { get; set; }
Gets the MessageReporter control that processes result actions.
public MessageReporter MessageReporter { get; }
Implements:
Gets or sets the collection of action items displayed in the more button popup.
public ObservableCollection<PromptInputButtonAction> MoreButtonActions { get; set; }
MoreButtonActionsItemTemplate
DataTemplate
Gets or sets the data template used to display each action item in the more button dropdown.
public DataTemplate MoreButtonActionsItemTemplate { get; set; }
MoreButtonActionsItemTemplateSelector
DataTemplateSelector
Gets or sets the data template selector used to choose a template for each action item in the more button dropdown.
public DataTemplateSelector MoreButtonActionsItemTemplateSelector { get; set; }
Gets or sets a value indicating whether the suggestions popup opens when the input receives focus.
public bool OpenPromptSuggestionsOnFocus { get; set; }
Gets or sets the content displayed in the prompt suggestions dropdown when there are no suggestions available.
public object PromptSuggestionsEmptyContent { get; set; }
PromptSuggestionsEmptyContentTemplate
DataTemplate
Gets or sets the data template used to display the empty state content in the prompt suggestions dropdown.
public DataTemplate PromptSuggestionsEmptyContentTemplate { get; set; }
Gets or sets the collection of recent prompts displayed in the suggestions popup.
public ObservableCollection<string> RecentPrompts { get; set; }
Gets or sets the command that is executed to remove an attached file.
public ICommand RemoveAttachedFileCommand { get; set; }
Gets or sets the content to display inside the send button of the prompt input. When set, this replaces the default send/stop glyph icons.
public object SendButtonContent { get; set; }
SendButtonContentTemplate
DataTemplate
Gets or sets the data template used to display the SendButtonContent.
public DataTemplate SendButtonContentTemplate { get; set; }
Gets or sets the command that is executed when a new message is typed in the UI and then sent.
public ICommand SendCommand { get; set; }
Gets or sets the command that is executed when the send button is clicked or Enter is pressed.
public ICommand SendMessageCommand { get; set; }
Gets or sets a value indicating whether the clear button is visible.
public bool ShowClearButton { get; set; }
Gets or sets a value indicating whether the background of messages from other authors is visible.
public bool ShowOtherAuthorMessageBackground { get; set; }
Gets or sets the list of suggested actions.
public ObservableCollection<SuggestedAction> SuggestedActions { get; set; }
SuggestedActionsOrientation
Orientation
Gets or sets the orientation of suggested action panel.
public Orientation SuggestedActionsOrientation { get; set; }
SuggestedActionsVisibility
Visibility
Gets or sets a value that indicates whether suggested action panel is visible or not.
public Visibility SuggestedActionsVisibility { get; set; }
Gets or sets the collection of suggested prompts displayed in the suggestions popup.
public ObservableCollection<string> SuggestedPrompts { get; set; }
Gets or sets the DateTime string format that is used to display time breaks.
public string TimeBreakFormat { get; set; }
Gets or sets the interval that should be use to automatically place time breaks.
public TimeSpan? TimeBreakInterval { get; set; }
Gets or sets the command that should be executed on typing.
public ICommand TypingCommand { get; set; }
TypingIndicatorIcon
ImageSource
Gets or sets the icon of the typing indicator.
public ImageSource TypingIndicatorIcon { get; set; }
Gets or sets the text of the typing indicator.
public string TypingIndicatorText { get; set; }
TypingIndicatorVisibility
Visibility
Gets or sets a value that indicates whether the typing indicator is visible or not.
public Visibility TypingIndicatorVisibility { get; set; }
VerticalAvatarAlignment
VerticalAlignment
Gets or sets the vertical alignment for Author's Avatar.
public VerticalAlignment VerticalAvatarAlignment { get; set; }
Methods
Adds a new Message to RadChat.
Adds a time break with the given header.
Closes the overlay view and its content.
public void CloseOverlay()
Closes the popup placeholder view and its content.
public void ClosePopup()
Uses the given MessageConverter to convert data item to message.
Uses the given MessageConverter to convert message to data object.
protected virtual object ConvertMessageToDataItem(MessageBase message)
Creates a new message group for the given author.
protected virtual MessageGroupViewModel CreateMessageGroup(Author author)
Returns the inline message by its index position.
Raises the AddingTimeBreak event.
protected virtual void OnAddingTimeBreak(TimeBreakEventArgs timeBreakArgs)
public override void OnApplyTemplate()
Raises the AttachmentActionRequested event.
protected virtual void OnAttachmentActionRequested(AttachmentActionEventArgs args)
The event arguments.
Returns an automation peer for this RadChat.
protected override AutomationPeer OnCreateAutomationPeer()
AutomationPeer
Raises the RegenerateResponse event.
protected virtual void OnRegenerateResponse(RegenerateResponseEventArgs args)
The event arguments.
Raises the ReportMessageResult event.
protected virtual void OnReportMessageResult(MessageResultEventArgs args)
Raises the SendMessage routed event.
protected virtual void OnSendMessage(SendMessageEventArgs args)
Raises the SuggestedActionReported event.
protected virtual void OnSuggestedActionReported(SuggestedActionsEventArgs suggestedActionsArgs)
Raises the UserVoted event.
protected virtual void OnUserVoted(UserVotedEventArgs args)
The event arguments.
Rebinds the RadChat, using the collection set as DataSource.
protected virtual void RebindDataSource()
Removes an existing inline message from RadChat.
Adds a message as overlay content.
Adds a message as popup content.
Events
Event is raised when time break is added.
public event EventHandler<TimeBreakEventArgs> AddingTimeBreak
Occurs when an attachment action (download, share) is requested.
public event EventHandler<AttachmentActionEventArgs> AttachmentActionRequested
Occurs when a response needs to be regenerated.
public event EventHandler<RegenerateResponseEventArgs> RegenerateResponse
This event is triggered to signal that a response should be regenerated. Subscribers can handle this event to perform custom logic when a regeneration is required.
Event is raised when response action reports result.
public event EventHandler<MessageResultEventArgs> ReportMessageResult
Event is raised when a new message is typed and sent by the current author.
public event EventHandler<SendMessageEventArgs> SendMessage
Event is raised when suggested action reports result.
public event EventHandler<SuggestedActionsEventArgs> SuggestedActionReported
Occurs when a user votes (e.g., upvote or downvote) on a message.
public event EventHandler<UserVotedEventArgs> UserVoted