Class 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.
Inheritance
Namespace: Telerik.Windows.Controls
Assembly: Telerik.Windows.Controls.ConversationalUI.dll
Syntax
[TelerikToolboxCategory("ConversationalUI")]
public class RadChat : Control, IMessageReportSubscriber
Constructors
RadChat()
Fields
AutoIncludeTimeBreaksProperty
Identifies the AutoIncludeTimeBreaks dependency property.
Declaration
public static readonly DependencyProperty AutoIncludeTimeBreaksProperty
Field Value
System.Windows.DependencyProperty
|
CanUserSelectMessageProperty
Identifies the CanUserSelectMessage dependency property.
Declaration
public static readonly DependencyProperty CanUserSelectMessageProperty
Field Value
System.Windows.DependencyProperty
|
CurrentAuthorProperty
Identifies the CurrentAuthor dependency property.
Declaration
public static readonly DependencyProperty CurrentAuthorProperty
Field Value
System.Windows.DependencyProperty
|
DataSourceProperty
Identifies the DataSource dependency property.
Declaration
public static readonly DependencyProperty DataSourceProperty
Field Value
System.Windows.DependencyProperty
|
InputBoxTextProperty
Identifies the InputBoxText dependency property.
Declaration
public static readonly DependencyProperty InputBoxTextProperty
Field Value
System.Windows.DependencyProperty
|
InputBoxWatermarkContentProperty
Identifies the InputBoxWatermarkContent dependency property.
Declaration
public static readonly DependencyProperty InputBoxWatermarkContentProperty
Field Value
System.Windows.DependencyProperty
|
IsToolBarOpenProperty
Identifies the IsToolBarOpen dependency property.
Declaration
public static readonly DependencyProperty IsToolBarOpenProperty
Field Value
System.Windows.DependencyProperty
|
MessageConverterProperty
Identifies the MessageConverter dependency property.
Declaration
public static readonly DependencyProperty MessageConverterProperty
Field Value
System.Windows.DependencyProperty
|
MessageListTemplateSelectorProperty
Identifies the MessageListTemplateSelector dependency property.
Declaration
public static readonly DependencyProperty MessageListTemplateSelectorProperty
Field Value
System.Windows.DependencyProperty
|
MessageOverlayTemplateSelectorProperty
Identifies the MessageOverlayTemplateSelector dependency property.
Declaration
public static readonly DependencyProperty MessageOverlayTemplateSelectorProperty
Field Value
System.Windows.DependencyProperty
|
MessagePopupTemplateSelectorProperty
Identifies the MessagePopupTemplateSelector dependency property.
Declaration
public static readonly DependencyProperty MessagePopupTemplateSelectorProperty
Field Value
System.Windows.DependencyProperty
|
ReportMessageResultEvent
Identifies the Event.
Declaration
public static readonly RoutedEvent ReportMessageResultEvent
Field Value
System.Windows.RoutedEvent
|
SendCommandProperty
Identifies the SendCommand dependency property.
Declaration
public static readonly DependencyProperty SendCommandProperty
Field Value
System.Windows.DependencyProperty
|
SendMessageEvent
Identifies the Event.
Declaration
public static readonly RoutedEvent SendMessageEvent
Field Value
System.Windows.RoutedEvent
|
SuggestedActionReportedEvent
Identifies the Event.
Declaration
public static readonly RoutedEvent SuggestedActionReportedEvent
Field Value
System.Windows.RoutedEvent
|
SuggestedActionsOrientationProperty
Identifies the SuggestedActionsOrientation dependency property.
Declaration
public static readonly DependencyProperty SuggestedActionsOrientationProperty
Field Value
System.Windows.DependencyProperty
|
SuggestedActionsProperty
Identifies the SuggestedActions dependency property.
Declaration
public static readonly DependencyProperty SuggestedActionsProperty
Field Value
System.Windows.DependencyProperty
|
SuggestedActionsVisibilityProperty
Identifies the SuggestedActionsVisibility dependency property.
Declaration
public static readonly DependencyProperty SuggestedActionsVisibilityProperty
Field Value
System.Windows.DependencyProperty
|
TimeBreakFormatProperty
Identifies the TimeBreakFormat dependency property.
Declaration
public static readonly DependencyProperty TimeBreakFormatProperty
Field Value
System.Windows.DependencyProperty
|
TimeBreakIntervalProperty
Identifies the TimeBreakInterval dependency property.
Declaration
public static readonly DependencyProperty TimeBreakIntervalProperty
Field Value
System.Windows.DependencyProperty
|
ToolBarCommandsProperty
Identifies the ToolBarCommands dependency property.
Declaration
public static readonly DependencyProperty ToolBarCommandsProperty
Field Value
System.Windows.DependencyProperty
|
ToolBarCommandTemplateProperty
Identifies the ToolBarCommandTemplate dependency property.
Declaration
public static readonly DependencyProperty ToolBarCommandTemplateProperty
Field Value
System.Windows.DependencyProperty
|
ToolBarCommandTemplateSelectorProperty
Identifies the ToolBarCommandTemplateSelector dependency property.
Declaration
public static readonly DependencyProperty ToolBarCommandTemplateSelectorProperty
Field Value
System.Windows.DependencyProperty
|
TypingCommandProperty
Identifies the TypingCommand dependency property.
Declaration
public static readonly DependencyProperty TypingCommandProperty
Field Value
System.Windows.DependencyProperty
|
TypingIndicatorIconProperty
Identifies the TypingIndicatorIcon dependency property.
Declaration
public static readonly DependencyProperty TypingIndicatorIconProperty
Field Value
System.Windows.DependencyProperty
|
TypingIndicatorTextProperty
Identifies the TypingIndicatorText dependency property.
Declaration
public static readonly DependencyProperty TypingIndicatorTextProperty
Field Value
System.Windows.DependencyProperty
|
TypingIndicatorVisibilityProperty
Identifies the TypingIndicatorVisibility dependency property.
Declaration
public static readonly DependencyProperty TypingIndicatorVisibilityProperty
Field Value
System.Windows.DependencyProperty
|
VerticalAvatarAlignmentProperty
Identifies the VerticalAvatarAlignment dependency property.
Declaration
public static readonly DependencyProperty VerticalAvatarAlignmentProperty
Field Value
System.Windows.DependencyProperty
|
Properties
AutoIncludeTimeBreaks
Gets or sets value indicating whether TimeBreaks are automatically included.
Declaration
public bool AutoIncludeTimeBreaks { get; set; }
Property Value
System.Boolean
|
CanUserSelectMessage
Gets or sets value indicating whether users can select inline messages through the UI.
Declaration
public bool CanUserSelectMessage { get; set; }
Property Value
System.Boolean
|
CurrentAuthor
Gets or sets the current author.
Declaration
public Author CurrentAuthor { get; set; }
Property Value
Author
|
DataSource
Gets or sets a data source that will be used to generate messages in data-bound scenarios.
Declaration
public IEnumerable DataSource { get; set; }
Property Value
System.Collections.IEnumerable
|
InlineMessages
Gets the collection of inline messages.
Declaration
protected virtual IEnumerable<MessageBase> InlineMessages { get; }
Property Value
System.Collections.Generic.IEnumerable<MessageBase>
|
InputBoxText
Gets or sets the input box text.
Declaration
public string InputBoxText { get; set; }
Property Value
System.String
|
InputBoxWatermarkContent
Gets or sets the input box watermark content.
Declaration
public object InputBoxWatermarkContent { get; set; }
Property Value
System.Object
|
IsToolBarOpen
Gets or sets a value indicating whether the tool bar is open or not.
Declaration
public bool IsToolBarOpen { get; set; }
Property Value
System.Boolean
|
LastMessage
Gets the last message.
Declaration
public virtual InlineViewModel LastMessage { get; }
Property Value
InlineViewModel
|
LastMessageGroup
Gets the last message group.
Declaration
public virtual MessageGroupViewModel LastMessageGroup { get; }
Property Value
MessageGroupViewModel
|
MessageConverter
Gets or sets an IMessageConverter that will be used for converting messages to DataSource type vice versa.
Declaration
public IMessageConverter MessageConverter { get; set; }
Property Value
IMessageConverter
|
MessageGroups
Gets the collection of MessageGroups.
Declaration
public ObservableCollection<MessageGroupViewModel> MessageGroups { get; }
Property Value
System.Collections.ObjectModel.ObservableCollection<MessageGroupViewModel>
|
MessageListItems
Gets the collection of MessageListItems (MessageGroups and TimeBreaks).
Declaration
public ObservableCollection<MessageListItemViewModelBase> MessageListItems { get; }
Property Value
System.Collections.ObjectModel.ObservableCollection<MessageListItemViewModelBase>
|
MessageListTemplateSelector
Gets or sets the DataTemplate selector that is used for displaying messages in ChatMessageList.
Declaration
public MessageTemplateSelector MessageListTemplateSelector { get; set; }
Property Value
MessageTemplateSelector
|
MessageOverlayTemplateSelector
Gets or sets the DataTemplate selector that is used for displaying messages in ChatOverlay.
Declaration
public MessageTemplateSelector MessageOverlayTemplateSelector { get; set; }
Property Value
MessageTemplateSelector
|
MessagePopupTemplateSelector
Gets or sets the DataTemplate selector that is used for displaying messages in ChatPopupPlaceholder.
Declaration
public MessageTemplateSelector MessagePopupTemplateSelector { get; set; }
Property Value
MessageTemplateSelector
|
MessageReporter
Gets the MessageReporter control that processes result actions.
Declaration
public MessageReporter MessageReporter { get; }
Property Value
MessageReporter
|
Implements
SendCommand
Gets or sets the command that is executed when a new message is typed in the UI and then sent.
Declaration
public ICommand SendCommand { get; set; }
Property Value
System.Windows.Input.ICommand
|
SuggestedActions
Gets or sets the list of suggested actions.
Declaration
public ObservableCollection<SuggestedAction> SuggestedActions { get; set; }
Property Value
System.Collections.ObjectModel.ObservableCollection<SuggestedAction>
|
SuggestedActionsOrientation
Gets or sets the orientation of suggested action panel.
Declaration
public Orientation SuggestedActionsOrientation { get; set; }
Property Value
System.Windows.Controls.Orientation
|
SuggestedActionsVisibility
Gets or sets a value that indicates whether suggested action panel is visible or not.
Declaration
public Visibility SuggestedActionsVisibility { get; set; }
Property Value
System.Windows.Visibility
|
TimeBreakFormat
Gets or sets the DateTime string format that is used to display time breaks.
Declaration
public string TimeBreakFormat { get; set; }
Property Value
System.String
|
TimeBreakInterval
Gets or sets the interval that should be use to automatically place time breaks.
Declaration
public TimeSpan? TimeBreakInterval { get; set; }
Property Value
System.Nullable<System.TimeSpan>
|
ToolBarCommands
Gets the list of ToolBar commands.
Declaration
public ObservableCollection<ToolBarCommand> ToolBarCommands { get; }
Property Value
System.Collections.ObjectModel.ObservableCollection<ToolBarCommand>
|
ToolBarCommandTemplate
Gets or sets a data template for the ToolBar command buttons' content.
Declaration
public DataTemplate ToolBarCommandTemplate { get; set; }
Property Value
System.Windows.DataTemplate
|
ToolBarCommandTemplateSelector
Gets or sets a template selector that is used for selecting ToolBar command buttons' content.
Declaration
public DataTemplateSelector ToolBarCommandTemplateSelector { get; set; }
Property Value
System.Windows.Controls.DataTemplateSelector
|
TypingCommand
Gets or sets the command that should be executed on typing.
Declaration
public ICommand TypingCommand { get; set; }
Property Value
System.Windows.Input.ICommand
|
TypingIndicatorIcon
Gets or sets the icon of the typing indicator.
Declaration
public ImageSource TypingIndicatorIcon { get; set; }
Property Value
System.Windows.Media.ImageSource
|
TypingIndicatorText
Gets or sets the text of the typing indicator.
Declaration
public string TypingIndicatorText { get; set; }
Property Value
System.String
|
TypingIndicatorVisibility
Gets or sets a value that indicates whether the typing indicator is visible or not.
Declaration
public Visibility TypingIndicatorVisibility { get; set; }
Property Value
System.Windows.Visibility
|
VerticalAvatarAlignment
Gets or sets the vertical alignment for Author's Avatar.
Declaration
public VerticalAlignment VerticalAvatarAlignment { get; set; }
Property Value
System.Windows.VerticalAlignment
|
Methods
AddMessage(Author, String)
Adds a new Message to RadChat.
Declaration
public virtual void AddMessage(Author author, string messageText)
Parameters
Author
author
|
System.String
messageText
|
AddMessage(MessageBase)
Adds a new Message to RadChat.
Declaration
public virtual void AddMessage(MessageBase message)
Parameters
MessageBase
message
|
AddTimeBreak(String)
Adds a time break with the given header.
Declaration
public virtual void AddTimeBreak(string header)
Parameters
System.String
header
|
CloseOverlay()
Closes the overlay view and its content.
Declaration
public void CloseOverlay()
ClosePopup()
Closes the popup placeholder view and its content.
Declaration
public void ClosePopup()
ConvertItemToMessage(Object)
Uses the given MessageConverter to convert data item to message.
Declaration
protected virtual MessageBase ConvertItemToMessage(object item)
Parameters
System.Object
item
|
Returns
MessageBase
|
ConvertMessageToDataItem(MessageBase)
Uses the given MessageConverter to convert message to data object.
Declaration
protected virtual object ConvertMessageToDataItem(MessageBase message)
Parameters
MessageBase
message
|
Returns
System.Object
|
CreateMessageGroup(Author)
Creates a new message group for the given author.
Declaration
protected virtual MessageGroupViewModel CreateMessageGroup(Author author)
Parameters
Author
author
|
Returns
MessageGroupViewModel
|
GetMessageByIndex(Int32)
Returns the inline message by its index position.
Declaration
public virtual MessageBase GetMessageByIndex(int index)
Parameters
System.Int32
index
|
Returns
MessageBase
|
OnAddingTimeBreak(TimeBreakEventArgs)
Raises the AddingTimeBreak event.
Declaration
protected virtual void OnAddingTimeBreak(TimeBreakEventArgs timeBreakArgs)
Parameters
TimeBreakEventArgs
timeBreakArgs
|
OnApplyTemplate()
Declaration
public override void OnApplyTemplate()
OnCreateAutomationPeer()
Returns an automation peer for this RadChat.
Declaration
protected override AutomationPeer OnCreateAutomationPeer()
Returns
System.Windows.Automation.Peers.AutomationPeer
|
OnInitialized(EventArgs)
Declaration
protected override void OnInitialized(EventArgs e)
Parameters
System.EventArgs
e
|
OnReportMessageResult(MessageResultEventArgs)
Raises the ReportMessageResult event.
Declaration
protected virtual void OnReportMessageResult(MessageResultEventArgs args)
Parameters
MessageResultEventArgs
args
|
OnSendMessage(SendMessageEventArgs)
Raises the SendMessage routed event.
Declaration
protected virtual void OnSendMessage(SendMessageEventArgs args)
Parameters
SendMessageEventArgs
args
|
OnSuggestedActionReported(SuggestedActionsEventArgs)
Raises the SuggestedActionReported event.
Declaration
protected virtual void OnSuggestedActionReported(SuggestedActionsEventArgs suggestedActionsArgs)
Parameters
SuggestedActionsEventArgs
suggestedActionsArgs
|
RebindDataSource()
Rebinds the RadChat, using the collection set as DataSource.
Declaration
protected virtual void RebindDataSource()
RemoveMessage(MessageBase)
Removes an existing inline message from RadChat.
Declaration
public virtual void RemoveMessage(MessageBase message)
Parameters
MessageBase
message
|
Implements
ShowMessageInOverlay(MessageBase)
Adds a message as overlay content.
Declaration
protected void ShowMessageInOverlay(MessageBase message)
Parameters
MessageBase
message
|
ShowMessageInPopup(MessageBase)
Adds a message as popup content.
Declaration
protected void ShowMessageInPopup(MessageBase message)
Parameters
MessageBase
message
|
Events
AddingTimeBreak
Event is raised when time break is added.
Declaration
public event EventHandler<TimeBreakEventArgs> AddingTimeBreak
Event Type
System.EventHandler<TimeBreakEventArgs>
|
ReportMessageResult
Event is raised when response action reports result.
Declaration
public event EventHandler<MessageResultEventArgs> ReportMessageResult
Event Type
System.EventHandler<MessageResultEventArgs>
|
SendMessage
Event is raised when a new message is typed and sent by the current author.
Declaration
public event EventHandler<SendMessageEventArgs> SendMessage
Event Type
System.EventHandler<SendMessageEventArgs>
|
SuggestedActionReported
Event is raised when suggested action reports result.
Declaration
public event EventHandler<SuggestedActionsEventArgs> SuggestedActionReported
Event Type
System.EventHandler<SuggestedActionsEventArgs>
|