BaseChatDataItem
Associates a ChatMessage with the layout and grouping state used by the chat view.
Definition
Namespace:Telerik.WinControls.UI
Assembly:Telerik.WinControls.UI.dll
Syntax:
public abstract class BaseChatDataItem : IDataItem, INotifyPropertyChanged
Inheritance: objectBaseChatDataItem
Derived Classes:
Implements:
Constructors
Initializes a data item for a message and subscribes to that message's property changes.
public BaseChatDataItem(ChatMessage message)
The message represented by this item; it must not be null.
Exceptions: NullReferenceExceptionmessage is null.
Properties
Gets or sets the measured size cached for this item by the virtualized chat view.
[Browsable(false)]
public virtual SizeF ActualSize { get; set; }
Changing the size adjusts the owning view's cached scroll height by the size delta and raises PropertyChanged.
Gets the chat view that currently owns this item, or null before the item is added to a view.
public ChatMessagesViewElement ChatMessagesViewElement { get; }
Gets whether the message author equals the chat's configured author.
public bool IsOwnMessage { get; }
Returns false when the item is not attached to a chat view or either author is missing.
Gets or sets the message represented by this item.
public ChatMessage Message { get; set; }
Replacing the message transfers the property-change subscription, raises PropertyChanged for this property, and invalidates the item's measured size. Changes raised by the message are forwarded with a
Messageprefix on their property name.
Gets or sets the item's position within a consecutive run of messages from one author.
public ChatMessageType MessageType { get; set; }
The chat item element uses this value to determine whether to show the author avatar and status.
Gets or sets the status text shown for a single or final item in an author run.
public string Status { get; set; }
Methods
Raises PropertyChanged for an item property.
protected virtual void OnPropertyChanged(string propertyName)
The name of the property that changed.
Events
Occurs when an item property changes or when a change from its Message is forwarded.
public event PropertyChangedEventHandler PropertyChanged
Implements: