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
AdditionalContentTemplateProperty
DependencyProperty
Identifies the AdditionalContentTemplateProperty dependency property.
public static readonly DependencyProperty AdditionalContentTemplateProperty
AttachmentActionRequestedEvent
RoutedEvent
Identifies the event.
public static readonly RoutedEvent AttachmentActionRequestedEvent
AutoIncludeTimeBreaksProperty
DependencyProperty
Identifies the AutoIncludeTimeBreaks dependency property.
public static readonly DependencyProperty AutoIncludeTimeBreaksProperty
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
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
IsSpeechToTextButtonVisibleProperty
DependencyProperty
Identifies the IsSpeechToTextButtonVisible dependency property.
public static readonly DependencyProperty IsSpeechToTextButtonVisibleProperty
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
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.
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
SendMessageEvent
RoutedEvent
Identifies the Event.
public static readonly RoutedEvent SendMessageEvent
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
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
AdditionalContentTemplate
DataTemplate
Gets or sets the custom data template used to display suggestions in the suggestion list.
public DataTemplate AdditionalContentTemplate { get; set; }
Gets or sets value indicating whether TimeBreaks are automatically included.
public bool AutoIncludeTimeBreaks { 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; }
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 speech-to-text button is visible in the prompt input.
public bool IsSpeechToTextButtonVisible { 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 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 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 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 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.
OnCreateAutomationPeer()
AutomationPeer
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