Class RadChatElement
Inheritance
Inherited Members
Namespace: Telerik.WinControls.UI
Assembly: Telerik.WinControls.UI.dll
Syntax
public class RadChatElement : LightVisualElement, INotifyPropertyChanged, ICustomTypeDescriptor, ISupportSystemSkin, IComponent, IDisposable, IBindableComponent, ISupportDrag, ISupportDrop, IShortcutProvider, IStylableElement, IStylableNode, IPrimitiveElement, IShapedElement, IFillElement, IBorderElement, IBoxStyle, IBoxElement, IImageElement, ITextPrimitive, ITextProvider
Constructors
RadChatElement()
Declaration
public RadChatElement()
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 virtual 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
|
ChatFactory
InputTextBox
IsOverlayShown
Declaration
public bool IsOverlayShown { get; protected set; }
Property Value
System.Boolean
|
IsPopupOverlayShown
Declaration
public bool IsPopupOverlayShown { get; protected set; }
Property Value
System.Boolean
|
MessagesViewElement
Declaration
public ChatMessagesViewElement MessagesViewElement { get; }
Property Value
ChatMessagesViewElement
|
OverlayElement
OverlayPopupElement
Declaration
public LightVisualElement OverlayPopupElement { get; }
Property Value
LightVisualElement
|
SendButtonElement
Declaration
public ChatSendButtonElement SendButtonElement { get; }
Property Value
ChatSendButtonElement
|
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
|
ShowToolbarButtonElement
Declaration
public ChatShowToolbarElement ShowToolbarButtonElement { get; }
Property Value
ChatShowToolbarElement
|
SuggestedActionsElement
Declaration
public ChatSuggestedActionsElement SuggestedActionsElement { get; }
Property Value
ChatSuggestedActionsElement
|
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
|
ToolbarElement
Methods
AddMessage(ChatMessage)
Adds a new message to the chat. Typical messages are ChatTextMessage, ChatSuggestedActionsMessage, ChatMediaMessage, ChatCardMessage and ChatOverlayMessage
Declaration
public virtual void AddMessage(ChatMessage message)
Parameters
ChatMessage
message
The message to be displayed in the chat. |
CreateChildElements()
Declaration
protected override void CreateChildElements()
Overrides
CreateInputTextBox()
CreateMessagesListView()
Declaration
protected virtual ChatMessagesViewElement CreateMessagesListView()
Returns
ChatMessagesViewElement
|
CreateOverlayPopupElement()
Declaration
protected virtual OverlayPopupElement CreateOverlayPopupElement()
Returns
OverlayPopupElement
|
CreateSendButton()
Declaration
protected virtual ChatSendButtonElement CreateSendButton()
Returns
ChatSendButtonElement
|
CreateShowToolbarButton()
Declaration
protected virtual ChatShowToolbarElement CreateShowToolbarButton()
Returns
ChatShowToolbarElement
|
CreateStackLayoutElement()
Declaration
protected virtual StackLayoutElement CreateStackLayoutElement()
Returns
StackLayoutElement
|
CreateSuggestedActionsElement()
Declaration
protected virtual ChatSuggestedActionsElement CreateSuggestedActionsElement()
Returns
ChatSuggestedActionsElement
|
CreateToolbarElement()
CreateTypingIndicatorElement()
Declaration
protected virtual LightVisualElement CreateTypingIndicatorElement()
Returns
LightVisualElement
|
DisposeManagedResources()
Declaration
protected override void DisposeManagedResources()
Overrides
HideOverlay()
Hides any overlays that are currently displayed by the control.
Declaration
public virtual void HideOverlay()
HideTypingIndicator()
Declaration
public virtual void HideTypingIndicator()
OnCardActionClicked(Object, CardActionEventArgs)
Fires the CardActionClicked event.
Declaration
protected virtual void OnCardActionClicked(object sender, CardActionEventArgs e)
Parameters
System.Object
sender
The card which triggered the event. |
CardActionEventArgs
e
The event arguments. |
OnInputTextBoxKeyDown(Object, KeyEventArgs)
Declaration
protected virtual void OnInputTextBoxKeyDown(object sender, KeyEventArgs e)
Parameters
System.Object
sender
|
System.Windows.Forms.KeyEventArgs
e
|
OnItemFormatting(ChatItemElementEventArgs)
Fires the ItemFormatting event.
Declaration
protected virtual void OnItemFormatting(ChatItemElementEventArgs e)
Parameters
ChatItemElementEventArgs
e
The event arguments. |
OnSendButtonElementClick(Object, EventArgs)
Declaration
protected virtual void OnSendButtonElementClick(object sender, EventArgs e)
Parameters
System.Object
sender
|
System.EventArgs
e
|
OnSendMessage(SendMessageEventArgs)
Fires the SendMessage event.
Declaration
protected virtual void OnSendMessage(SendMessageEventArgs e)
Parameters
SendMessageEventArgs
e
The event arguments. |
OnShowToolbarButtonElementClick(Object, EventArgs)
Declaration
protected virtual void OnShowToolbarButtonElementClick(object sender, EventArgs e)
Parameters
System.Object
sender
|
System.EventArgs
e
|
OnSuggestedActionClicked(SuggestedActionEventArgs)
Fires the SendMessage event.
Declaration
protected virtual void OnSuggestedActionClicked(SuggestedActionEventArgs e)
Parameters
SuggestedActionEventArgs
e
The event arguments. |
OnTimeSeparatorAdding(TimeSeparatorEventArgs)
Fires the AddTimeSeparator event.
Declaration
protected virtual void OnTimeSeparatorAdding(TimeSeparatorEventArgs e)
Parameters
TimeSeparatorEventArgs
e
The event arguments. |
OnToolbarActionClick(ToolbarActionEventArgs)
Fires the ToolbarActionClicked event.
Declaration
protected virtual void OnToolbarActionClick(ToolbarActionEventArgs e)
Parameters
ToolbarActionEventArgs
e
The event arguments. |
PostPaintChildren(IGraphics, Rectangle, Single, SizeF)
Declaration
protected override void PostPaintChildren(IGraphics graphics, Rectangle clipRectange, float angle, SizeF scale)
Parameters
IGraphics
graphics
|
System.Drawing.Rectangle
clipRectange
|
System.Single
angle
|
System.Drawing.SizeF
scale
|
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. |
ShowTypingIndicator(Author[])
Declaration
public virtual void ShowTypingIndicator(params Author[] authors)
Parameters
Author[]
authors
|
SubmitUserMessage()
Declaration
protected virtual void SubmitUserMessage()
UnwireEvents()
Declaration
protected virtual void UnwireEvents()
WireEvents()
Declaration
protected virtual void WireEvents()
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
|