ClassTextMessageItemElement
Represents a visual element for displaying text-based chat messages. Supports optional file attachments and reply bubbles rendered inside the same message bubble.
Definition
Namespace:Telerik.WinControls.UI
Assembly:Telerik.WinControls.UI.dll
Syntax:
public class TextMessageItemElement : BaseChatItemElement, INotifyPropertyChanged, ICustomTypeDescriptor, ISupportSystemSkin, IBindableComponent, IComponent, IDisposable, ISupportDrag, ISupportDrop, IShortcutProvider, IStylableElement, IStylableNode, IPrimitiveElement, IShapedElement, IFillElement, IBorderElement, IBoxStyle, IBoxElement, IDrawFillElement, IImageElement, ITextPrimitive, ITextProvider, IVirtualizedElement<BaseChatDataItem>
Inheritance: objectDisposableObjectRadObjectRadElementVisualElementRadComponentElementRadItemUIItemBaseLightVisualElementBaseChatItemElementTextMessageItemElement
Implements:
Inherited Members
Constructors
TextMessageItemElement()
Declaration
public TextMessageItemElement()
Properties
AttachmentsElement
Gets the attachments bubble element.
Declaration
public LightVisualElement AttachmentsElement { get; }
Property Value
AttachmentsStack
Gets the attachments stack element.
Declaration
public StackLayoutElement AttachmentsStack { get; }
Property Value
DownloadAllElement
Gets the Download All element.
Declaration
public LightVisualButtonElement DownloadAllElement { get; }
Property Value
ReplyBubblesStack
Gets the stack hosting the reply bubbles.
Declaration
public StackLayoutElement ReplyBubblesStack { get; }
Property Value
TextElement
Gets the message text element.
Declaration
public LightVisualElement TextElement { get; }
Property Value
Methods
CreateAttachmentRowElement(PromptInputAttachedFile)
Creates an attachment row element for displaying a single attachment. The created row's
Download and Share events are wired so they bubble up to the owning RadChatElement
as a unified AttachmentActionRequested event.
Declaration
protected virtual ChatAttachmentRowElement CreateAttachmentRowElement(PromptInputAttachedFile file)
Parameters
file
The attached file to display.
Returns
CreateAttachmentsBubbleElement()
Creates the attachments bubble element. Override to customize.
Declaration
protected virtual ChatMessageBubbleElement CreateAttachmentsBubbleElement()
Returns
CreateAttachmentsStack()
Creates the attachments stack element. Override to customize.
Declaration
protected virtual StackLayoutElement CreateAttachmentsStack()
Returns
CreateChildElements()
Creates the child elements.
Declaration
protected override void CreateChildElements()
Overrides
CreateDownloadAllElement()
Creates the Download All element. Override to customize.
Declaration
protected virtual LightVisualSvgButtonElement CreateDownloadAllElement()
Returns
CreateMainMessageElement()
Creates the main message element that contains the reply bubbles stack, text and attachments.
Declaration
protected override LightVisualElement CreateMainMessageElement()
Returns
Overrides
CreateTextElement()
Creates the message text element. Override to customize.
Declaration
protected virtual LightVisualElement CreateTextElement()
Returns
IsCompatible(BaseChatDataItem, object)
Determines whether this element is compatible with the specified data item.
Declaration
public override bool IsCompatible(BaseChatDataItem data, object context)
Parameters
data
context
Returns
Overrides
MeasureMainMessageElement(SizeF)
Measures the main message element.
MeasureOverride(SizeF)
Measures the element.
OnAttachmentDownloadAllRequested(AttachmentActionEventArgs)
Raises the AttachmentDownloadAllRequested event.
Declaration
protected virtual void OnAttachmentDownloadAllRequested(AttachmentActionEventArgs e)
Parameters
e
OnDownloadAllClick(object, EventArgs)
Handles the Download All button click.
Synchronize()
Synchronizes the element with its data.
Declaration
public override void Synchronize()
Overrides
Events
AttachmentDownloadAllRequested
Occurs when Download All is clicked.
Declaration
public event EventHandler<AttachmentActionEventArgs> AttachmentDownloadAllRequested
Event Value