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.

Definition

Namespace:Telerik.UI.Xaml.Controls

Assembly:Telerik.WinUI.Controls.dll

Syntax:

cs-api-definition
public class RadChat : RadControl, IMessageReportSubscriber

Inheritance: objectRadControlRadChat

Implements: IMessageReportSubscriber

Inherited Members RadControl.EndVisualStateUpdate(bool, bool)RadControl.UpdateVisualState(bool)RadControl.BeginVisualStateUpdate()RadControl.SetVisualState(string, bool)RadControl.CanUpdateVisualState()RadControl.ComposeVisualStateName()RadControl.MeasureOverride(Size)RadControl.ArrangeOverride(Size)RadControl.UnapplyTemplateCore()RadControl.OnIsEnabledChanged(bool, bool)RadControl.OnTemplateApplied()RadControl.ApplyTemplateCore()RadControl.LoadCore()RadControl.OnLoaded()RadControl.UnloadCore()RadControl.CurrentVisualStateRadControl.IsLoadedRadControl.IsLoadingRadControl.IsUnloadedRadControl.WasUnloadedRadControl.IsTemplateApplied

Constructors

RadChat()

Initializes a new instance of the RadChat class.

Declaration

cs-api-definition
public RadChat()

Fields

AutoIncludeTimeBreaksProperty

Identifies the AutoIncludeTimeBreaks dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty AutoIncludeTimeBreaksProperty

Field Value

DependencyProperty

CanUserSelectMessageProperty

Identifies the CanUserSelectMessage dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty CanUserSelectMessageProperty

Field Value

DependencyProperty

CurrentAuthorProperty

Identifies the CurrentAuthor dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty CurrentAuthorProperty

Field Value

DependencyProperty

DataSourceProperty

Identifies the DataSource dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty DataSourceProperty

Field Value

DependencyProperty

InputBoxTextProperty

Identifies the InputBoxText dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty InputBoxTextProperty

Field Value

DependencyProperty

InputBoxWatermarkContentProperty

Identifies the InputBoxWatermarkContent dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty InputBoxWatermarkContentProperty

Field Value

DependencyProperty

IsToolBarOpenProperty

Identifies the IsToolBarOpen dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty IsToolBarOpenProperty

Field Value

DependencyProperty

MessageConverterProperty

Identifies the MessageConverter dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty MessageConverterProperty

Field Value

DependencyProperty

MessageListTemplateSelectorProperty

Identifies the MessageListTemplateSelector dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty MessageListTemplateSelectorProperty

Field Value

DependencyProperty

MessageOverlayTemplateSelectorProperty

Identifies the MessageOverlayTemplateSelector dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty MessageOverlayTemplateSelectorProperty

Field Value

DependencyProperty

MessagePopupTemplateSelectorProperty

Identifies the MessagePopupTemplateSelector dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty MessagePopupTemplateSelectorProperty

Field Value

DependencyProperty

ReportMessageResultEvent

Identifies the Event.

Declaration

cs-api-definition
public static readonly RoutedEvent ReportMessageResultEvent

Field Value

RoutedEvent

SendCommandProperty

Identifies the SendCommand dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty SendCommandProperty

Field Value

DependencyProperty

SendMessageEvent

Identifies the Event.

Declaration

cs-api-definition
public static readonly RoutedEvent SendMessageEvent

Field Value

RoutedEvent

SuggestedActionReportedEvent

Identifies the Event.

Declaration

cs-api-definition
public static readonly RoutedEvent SuggestedActionReportedEvent

Field Value

RoutedEvent

SuggestedActionsOrientationProperty

Identifies the SuggestedActionsOrientation dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty SuggestedActionsOrientationProperty

Field Value

DependencyProperty

SuggestedActionsProperty

Identifies the SuggestedActions dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty SuggestedActionsProperty

Field Value

DependencyProperty

SuggestedActionsVisibilityProperty

Identifies the SuggestedActionsVisibility dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty SuggestedActionsVisibilityProperty

Field Value

DependencyProperty

TimeBreakFormatProperty

Identifies the TimeBreakFormat dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty TimeBreakFormatProperty

Field Value

DependencyProperty

TimeBreakIntervalProperty

Identifies the TimeBreakInterval dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty TimeBreakIntervalProperty

Field Value

DependencyProperty

ToolBarCommandTemplateProperty

Identifies the ToolBarCommandTemplate dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty ToolBarCommandTemplateProperty

Field Value

DependencyProperty

ToolBarCommandTemplateSelectorProperty

Identifies the ToolBarCommandTemplateSelector dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty ToolBarCommandTemplateSelectorProperty

Field Value

DependencyProperty

ToolBarCommandsProperty

Identifies the ToolBarCommands dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty ToolBarCommandsProperty

Field Value

DependencyProperty

TypingCommandProperty

Identifies the TypingCommand dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty TypingCommandProperty

Field Value

DependencyProperty

TypingIndicatorIconProperty

Identifies the TypingIndicatorIcon dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty TypingIndicatorIconProperty

Field Value

DependencyProperty

TypingIndicatorTextProperty

Identifies the TypingIndicatorText dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty TypingIndicatorTextProperty

Field Value

DependencyProperty

TypingIndicatorVisibilityProperty

Identifies the TypingIndicatorVisibility dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty TypingIndicatorVisibilityProperty

Field Value

DependencyProperty

VerticalAvatarAlignmentProperty

Identifies the VerticalAvatarAlignment dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty VerticalAvatarAlignmentProperty

Field Value

DependencyProperty

Properties

AutoIncludeTimeBreaks

Gets or sets value indicating whether TimeBreaks are automatically included.

Declaration

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

Property Value

bool

CanUserSelectMessage

Gets or sets value indicating whether users can select inline messages through the UI.

Declaration

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

Property Value

bool

CurrentAuthor

Gets or sets the current author.

Declaration

cs-api-definition
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

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

Property Value

IEnumerable

InlineMessages

Gets the collection of inline messages.

Declaration

cs-api-definition
protected virtual IEnumerable<MessageBase> InlineMessages { get; }

Property Value

IEnumerable<MessageBase>

InputBoxText

Gets or sets the input box text.

Declaration

cs-api-definition
public string InputBoxText { get; set; }

Property Value

string

InputBoxWatermarkContent

Gets or sets the input box watermark content.

Declaration

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

Property Value

object

IsToolBarOpen

Gets or sets a value indicating whether the tool bar is open or not.

Declaration

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

Property Value

bool

LastMessage

Gets the last message.

Declaration

cs-api-definition
public virtual InlineViewModel LastMessage { get; }

Property Value

InlineViewModel

LastMessageGroup

Gets the last message group.

Declaration

cs-api-definition
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

cs-api-definition
public IMessageConverter MessageConverter { get; set; }

Property Value

IMessageConverter

MessageGroups

Gets the collection of MessageGroups.

Declaration

cs-api-definition
public ObservableCollection<MessageGroupViewModel> MessageGroups { get; }

Property Value

ObservableCollection<MessageGroupViewModel>

MessageListItems

Gets the collection of MessageListItems (MessageGroups and TimeBreaks).

Declaration

cs-api-definition
public ObservableCollection<MessageListItemViewModelBase> MessageListItems { get; }

Property Value

ObservableCollection<MessageListItemViewModelBase>

MessageListTemplateSelector

Gets or sets the DataTemplate selector that is used for displaying messages in ChatMessageList.

Declaration

cs-api-definition
public MessageTemplateSelector MessageListTemplateSelector { get; set; }

Property Value

MessageTemplateSelector

MessageOverlayTemplateSelector

Gets or sets the DataTemplate selector that is used for displaying messages in ChatOverlay.

Declaration

cs-api-definition
public MessageTemplateSelector MessageOverlayTemplateSelector { get; set; }

Property Value

MessageTemplateSelector

MessagePopupTemplateSelector

Gets or sets the DataTemplate selector that is used for displaying messages in ChatPopupPlaceholder.

Declaration

cs-api-definition
public MessageTemplateSelector MessagePopupTemplateSelector { get; set; }

Property Value

MessageTemplateSelector

MessageReporter

Gets the MessageReporter control that processes result actions.

Declaration

cs-api-definition
public MessageReporter MessageReporter { get; }

Property Value

MessageReporter

Implements IMessageReportSubscriber.MessageReporter

SendCommand

Gets or sets the command that is executed when a new message is typed in the UI and then sent.

Declaration

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

Property Value

ICommand

SuggestedActions

Gets or sets the list of suggested actions.

Declaration

cs-api-definition
public ObservableCollection<SuggestedAction> SuggestedActions { get; set; }

Property Value

ObservableCollection<SuggestedAction>

SuggestedActionsOrientation

Gets or sets the orientation of suggested action panel.

Declaration

cs-api-definition
public Orientation SuggestedActionsOrientation { get; set; }

Property Value

Orientation

SuggestedActionsVisibility

Gets or sets a value that indicates whether suggested action panel is visible or not.

Declaration

cs-api-definition
public Visibility SuggestedActionsVisibility { get; set; }

Property Value

Visibility

TimeBreakFormat

Gets or sets the DateTime string format that is used to display time breaks.

Declaration

cs-api-definition
public string TimeBreakFormat { get; set; }

Property Value

string

TimeBreakInterval

Gets or sets the interval that should be use to automatically place time breaks.

Declaration

cs-api-definition
public TimeSpan? TimeBreakInterval { get; set; }

Property Value

TimeSpan?

ToolBarCommandTemplate

Gets or sets a data template for the ToolBar command buttons' content.

Declaration

cs-api-definition
public DataTemplate ToolBarCommandTemplate { get; set; }

Property Value

DataTemplate

ToolBarCommandTemplateSelector

Gets or sets a template selector that is used for selecting ToolBar command buttons' content.

Declaration

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

Property Value

DataTemplateSelector

ToolBarCommands

Gets the list of ToolBar commands.

Declaration

cs-api-definition
public ObservableCollection<ToolBarCommand> ToolBarCommands { get; }

Property Value

ObservableCollection<ToolBarCommand>

TypingCommand

Gets or sets the command that should be executed on typing.

Declaration

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

Property Value

ICommand

TypingIndicatorIcon

Gets or sets the icon of the typing indicator.

Declaration

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

Property Value

ImageSource

TypingIndicatorText

Gets or sets the text of the typing indicator.

Declaration

cs-api-definition
public string TypingIndicatorText { get; set; }

Property Value

string

TypingIndicatorVisibility

Gets or sets a value that indicates whether the typing indicator is visible or not.

Declaration

cs-api-definition
public Visibility TypingIndicatorVisibility { get; set; }

Property Value

Visibility

VerticalAvatarAlignment

Gets or sets the vertical alignment for Author's Avatar.

Declaration

cs-api-definition
public VerticalAlignment VerticalAvatarAlignment { get; set; }

Property Value

VerticalAlignment

Methods

AddMessage(Author, string)

Adds a new Message to RadChat.

Declaration

cs-api-definition
public virtual void AddMessage(Author author, string messageText)

Parameters

author

Author

messageText

string

AddMessage(MessageBase)

Adds a new Message to RadChat.

Declaration

cs-api-definition
public virtual void AddMessage(MessageBase message)

Parameters

message

MessageBase

AddTimeBreak(string)

Adds a time break with the given header.

Declaration

cs-api-definition
public virtual void AddTimeBreak(string header)

Parameters

header

string

CloseOverlay()

Closes the overlay view and its content.

Declaration

cs-api-definition
public void CloseOverlay()

ClosePopup()

Closes the popup placeholder view and its content.

Declaration

cs-api-definition
public void ClosePopup()

ConvertItemToMessage(object)

Uses the given MessageConverter to convert data item to message.

Declaration

cs-api-definition
protected virtual MessageBase ConvertItemToMessage(object item)

Parameters

item

object

Returns

MessageBase

ConvertMessageToDataItem(MessageBase)

Uses the given MessageConverter to convert message to data object.

Declaration

cs-api-definition
protected virtual object ConvertMessageToDataItem(MessageBase message)

Parameters

message

MessageBase

Returns

object

CreateMessageGroup(Author)

Creates a new message group for the given author.

Declaration

cs-api-definition
protected virtual MessageGroupViewModel CreateMessageGroup(Author author)

Parameters

author

Author

Returns

MessageGroupViewModel

GetMessageByIndex(int)

Returns the inline message by its index position.

Declaration

cs-api-definition
public virtual MessageBase GetMessageByIndex(int index)

Parameters

index

int

Returns

MessageBase

OnAddingTimeBreak(TimeBreakEventArgs)

Raises the AddingTimeBreak event.

Declaration

cs-api-definition
protected virtual void OnAddingTimeBreak(TimeBreakEventArgs timeBreakArgs)

Parameters

timeBreakArgs

TimeBreakEventArgs

OnApplyTemplate()

Invoked whenever application code or internal processes (such as a rebuilding layout pass) call ApplyTemplate.

Declaration

cs-api-definition
protected override void OnApplyTemplate()

Overrides RadControl.OnApplyTemplate()

OnCreateAutomationPeer()

Returns an automation peer for this RadChat.

Declaration

cs-api-definition
protected override AutomationPeer OnCreateAutomationPeer()

Returns

AutomationPeer

Overrides RadControl.OnCreateAutomationPeer()

OnPointerWheelChanged(PointerRoutedEventArgs)

Declaration

cs-api-definition
protected override void OnPointerWheelChanged(PointerRoutedEventArgs e)

Parameters

e

PointerRoutedEventArgs

OnReportMessageResult(MessageResultEventArgs)

Raises the ReportMessageResult event.

Declaration

cs-api-definition
protected virtual void OnReportMessageResult(MessageResultEventArgs args)

Parameters

args

MessageResultEventArgs

OnSendMessage(SendMessageEventArgs)

Raises the SendMessage routed event.

Declaration

cs-api-definition
protected virtual void OnSendMessage(SendMessageEventArgs args)

Parameters

args

SendMessageEventArgs

OnSuggestedActionReported(SuggestedActionsEventArgs)

Raises the SuggestedActionReported event.

Declaration

cs-api-definition
protected virtual void OnSuggestedActionReported(SuggestedActionsEventArgs suggestedActionsArgs)

Parameters

suggestedActionsArgs

SuggestedActionsEventArgs

RebindDataSource()

Rebinds the RadChat, using the collection set as DataSource.

Declaration

cs-api-definition
protected virtual void RebindDataSource()

RemoveMessage(MessageBase)

Removes an existing inline message from RadChat.

Declaration

cs-api-definition
public virtual void RemoveMessage(MessageBase message)

Parameters

message

MessageBase

Implements IMessageReportSubscriber.RemoveMessage(MessageBase)

ShowMessageInOverlay(MessageBase)

Adds a message as overlay content.

Declaration

cs-api-definition
protected void ShowMessageInOverlay(MessageBase message)

Parameters

message

MessageBase

ShowMessageInPopup(MessageBase)

Adds a message as popup content.

Declaration

cs-api-definition
protected void ShowMessageInPopup(MessageBase message)

Parameters

message

MessageBase

UpdateVisualStates(bool)

Updates the visual states.

Declaration

cs-api-definition
protected void UpdateVisualStates(bool useTransitions)

Parameters

useTransitions

bool

If set to true use transitions.

Events

AddingTimeBreak

Event is raised when time break is added.

Declaration

cs-api-definition
public event EventHandler<TimeBreakEventArgs> AddingTimeBreak

Event Value

EventHandler<TimeBreakEventArgs>

ReportMessageResult

Event is raised when response action reports result.

Declaration

cs-api-definition
public event EventHandler<MessageResultEventArgs> ReportMessageResult

Event Value

EventHandler<MessageResultEventArgs>

SendMessage

Event is raised when a new message is typed and sent by the current author.

Declaration

cs-api-definition
public event EventHandler<SendMessageEventArgs> SendMessage

Event Value

EventHandler<SendMessageEventArgs>

SuggestedActionReported

Event is raised when suggested action reports result.

Declaration

cs-api-definition
public event EventHandler<SuggestedActionsEventArgs> SuggestedActionReported

Event Value

EventHandler<SuggestedActionsEventArgs>

In this article
DefinitionConstructorsRadChat()FieldsAutoIncludeTimeBreaksPropertyCanUserSelectMessagePropertyCurrentAuthorPropertyDataSourcePropertyInputBoxTextPropertyInputBoxWatermarkContentPropertyIsToolBarOpenPropertyMessageConverterPropertyMessageListTemplateSelectorPropertyMessageOverlayTemplateSelectorPropertyMessagePopupTemplateSelectorPropertyReportMessageResultEventSendCommandPropertySendMessageEventSuggestedActionReportedEventSuggestedActionsOrientationPropertySuggestedActionsPropertySuggestedActionsVisibilityPropertyTimeBreakFormatPropertyTimeBreakIntervalPropertyToolBarCommandTemplatePropertyToolBarCommandTemplateSelectorPropertyToolBarCommandsPropertyTypingCommandPropertyTypingIndicatorIconPropertyTypingIndicatorTextPropertyTypingIndicatorVisibilityPropertyVerticalAvatarAlignmentPropertyPropertiesAutoIncludeTimeBreaksCanUserSelectMessageCurrentAuthorDataSourceInlineMessagesInputBoxTextInputBoxWatermarkContentIsToolBarOpenLastMessageLastMessageGroupMessageConverterMessageGroupsMessageListItemsMessageListTemplateSelectorMessageOverlayTemplateSelectorMessagePopupTemplateSelectorMessageReporterSendCommandSuggestedActionsSuggestedActionsOrientationSuggestedActionsVisibilityTimeBreakFormatTimeBreakIntervalToolBarCommandTemplateToolBarCommandTemplateSelectorToolBarCommandsTypingCommandTypingIndicatorIconTypingIndicatorTextTypingIndicatorVisibilityVerticalAvatarAlignmentMethodsAddMessage(Author, string)AddMessage(MessageBase)AddTimeBreak(string)CloseOverlay()ClosePopup()ConvertItemToMessage(object)ConvertMessageToDataItem(MessageBase)CreateMessageGroup(Author)GetMessageByIndex(int)OnAddingTimeBreak(TimeBreakEventArgs)OnApplyTemplate()OnCreateAutomationPeer()OnPointerWheelChanged(PointerRoutedEventArgs)OnReportMessageResult(MessageResultEventArgs)OnSendMessage(SendMessageEventArgs)OnSuggestedActionReported(SuggestedActionsEventArgs)RebindDataSource()RemoveMessage(MessageBase)ShowMessageInOverlay(MessageBase)ShowMessageInPopup(MessageBase)UpdateVisualStates(bool)EventsAddingTimeBreakReportMessageResultSendMessageSuggestedActionReported
Not finding the help you need?
Contact Support