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
public TextMessageItemElement()
Properties
Gets the attachments bubble element.
public LightVisualElement AttachmentsElement { get; }
Gets the attachments stack element.
public StackLayoutElement AttachmentsStack { get; }
Gets the Download All element.
public LightVisualButtonElement DownloadAllElement { get; }
Gets the stack hosting the reply bubbles.
public StackLayoutElement ReplyBubblesStack { get; }
Gets the message text element.
public LightVisualElement TextElement { get; }
Methods
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.
protected virtual ChatAttachmentRowElement CreateAttachmentRowElement(PromptInputAttachedFile file)
The attached file to display.
Returns:Creates the attachments bubble element. Override to customize.
protected virtual ChatMessageBubbleElement CreateAttachmentsBubbleElement()
Creates the attachments stack element. Override to customize.
Creates the child elements.
protected override void CreateChildElements()
Overrides:
Creates the Download All element. Override to customize.
protected virtual LightVisualSvgButtonElement CreateDownloadAllElement()
Creates the main message element that contains the reply bubbles stack, text and attachments.
protected override LightVisualElement CreateMainMessageElement()
Overrides:
Creates the message text element. Override to customize.
Determines whether this element is compatible with the specified data item.
public override bool IsCompatible(BaseChatDataItem data, object context)
Overrides:
Raises the AttachmentDownloadAllRequested event.
protected virtual void OnAttachmentDownloadAllRequested(AttachmentActionEventArgs e)
Synchronizes the element with its data.
public override void Synchronize()
Overrides:
Events
Occurs when Download All is clicked.
public event EventHandler<AttachmentActionEventArgs> AttachmentDownloadAllRequested