Class RadChat
Inherited Members
Namespace: Telerik.WinControls.UI
Assembly: Telerik.WinControls.UI.dll
Syntax
[TelerikToolboxCategory("Data Controls")]
public class RadChat : RadControl, INotifyPropertyChanged, ISupportInitializeNotification, ISupportInitialize, IComponentTreeHandler, ILayoutHandler, IPCHost, IAnalyticsProvider
Constructors
RadChat()
Declaration
public RadChat()
Properties
Author
Gets or sets the current author. This instance is used when AutoAddUserMessages is set to true as well as to determine the messages alignment and styling.
Declaration
public Author Author { get; set; }
Property Value
Author
|
AutoAddUserMessages
Gets or sets a value indicating whether messages typed by the user will automatically be added as ChatTextMessage to the chat.
Declaration
public bool AutoAddUserMessages { get; set; }
Property Value
System.Boolean
|
AvatarSize
Gets or sets the size of the avatar images.
Declaration
public SizeF AvatarSize { get; set; }
Property Value
System.Drawing.SizeF
|
ChatElement
Gets the main chat element.
Declaration
public RadChatElement ChatElement { get; }
Property Value
RadChatElement
|
DefaultSize
Declaration
protected override Size DefaultSize { get; }
Property Value
System.Drawing.Size
|
ShowAvatars
Gets or sets whether avatar images will be displayed in the chat window next to messages.
Declaration
public bool ShowAvatars { get; set; }
Property Value
System.Boolean
|
ShowMessagesOnOneSide
Gets or sets whether messages will be displayed aligned to only one side of the chat window or on both.
Declaration
public bool ShowMessagesOnOneSide { get; set; }
Property Value
System.Boolean
|
TimeSeparatorInterval
Gets or sets the time interval between messages that will trigger the automatic addition of a Time separator. If set to System.TimeSpan.Zero no Time separators will be added.
Declaration
public TimeSpan TimeSeparatorInterval { get; set; }
Property Value
System.TimeSpan
|
Methods
AddMessage(ChatMessage)
Adds a new message to the chat. Typical messages are ChatTextMessage, ChatSuggestedActionsMessage, ChatMediaMessage, ChatCardMessage and ChatOverlayMessage
Declaration
public void AddMessage(ChatMessage message)
Parameters
ChatMessage
message
The message to be displayed in the chat. |
CreateChatElement()
CreateChildItems(RadElement)
Declaration
protected override void CreateChildItems(RadElement parent)
Parameters
RadElement
parent
|
Overrides
HideOverlay()
Hides any overlays that are currently displayed by the control.
Declaration
public virtual void HideOverlay()
OnGotFocus(EventArgs)
Declaration
protected override void OnGotFocus(EventArgs e)
Parameters
System.EventArgs
e
|
Overrides
OnMouseWheel(MouseEventArgs)
Declaration
protected override void OnMouseWheel(MouseEventArgs e)
Parameters
System.Windows.Forms.MouseEventArgs
e
|
Overrides
ShowOverlay(ChatOverlayMessage)
Shows the provided overlay in the control.
Declaration
public virtual void ShowOverlay(ChatOverlayMessage message)
Parameters
ChatOverlayMessage
message
The message that contains the overlay info. |
Events
CardActionClicked
Occurs when the user clicks on a Card Action
Declaration
public event CardActionEventHandler CardActionClicked
Event Type
CardActionEventHandler
|
ItemFormatting
Occurs when the data item of a visual element is changed and the element is prepared for visualization.
Declaration
public event ChatItemElementEventHandler ItemFormatting
Event Type
ChatItemElementEventHandler
|
SendMessage
Occurs when the user performs an action e.g hits the Enter key, clicks the Send message button, clicks on a Suggested Action or a Card Action, clicks OK on an overlay.
Declaration
public event SendMessageEventHandler SendMessage
Event Type
SendMessageEventHandler
|
SuggestedActionClicked
Occurs when the user clicks on a Suggested Action
Declaration
public event SuggestedActionEventHandler SuggestedActionClicked
Event Type
SuggestedActionEventHandler
|
TimeSeparatorAdding
Occurs after a new message is added. Allows you to decide whether a time separator should be inserted before the currently added message.
Declaration
public event TimeSeparatorEventHandler TimeSeparatorAdding
Event Type
TimeSeparatorEventHandler
|
ToolbarActionClicked
Occurs when the user clicks on a Toolbar Action
Declaration
public event ToolbarActionEventHandler ToolbarActionClicked
Event Type
ToolbarActionEventHandler
|