ClassChatMessagesViewElement
Definition
Namespace:Telerik.WinControls.UI
Assembly:Telerik.WinControls.UI.dll
Syntax:
public class ChatMessagesViewElement : VirtualizedScrollPanel<BaseChatDataItem, BaseChatItemElement>, INotifyPropertyChanged, ICustomTypeDescriptor, ISupportSystemSkin, IBindableComponent, IComponent, IDisposable, ISupportDrag, ISupportDrop, IShortcutProvider, IStylableElement, IStylableNode, IPrimitiveElement, IShapedElement, IFillElement, IBorderElement, IBoxStyle, IBoxElement, IDrawFillElement, IImageElement, ITextPrimitive, ITextProvider
Inheritance: objectDisposableObjectRadObjectRadElementVisualElementRadComponentElementRadItemUIItemBaseLightVisualElementScrollViewElement<VirtualizedStackContainer<BaseChatDataItem>>VirtualizedScrollPanel<BaseChatDataItem, BaseChatItemElement>ChatMessagesViewElement
Implements:
Inherited Members
Constructors
ChatMessagesViewElement(RadChatElement)
Declaration
public ChatMessagesViewElement(RadChatElement chatElement)
Parameters
chatElement
Fields
ShowMessagesOnOneSideProperty
Declaration
public static RadProperty ShowMessagesOnOneSideProperty
Field Value
Properties
AvatarSize
Gets or sets the size of the avatar images.
ChatElement
Declaration
public RadChatElement ChatElement { get; }
Property Value
ShowAvatars
Gets or sets whether avatar images will be displayed in the chat window next to messages.
ShowMessagesOnOneSide
Gets or sets whether messages will be displayed aligned to only one side of the chat window or on both.
TimeSeparatorInterval
Gets or sets the time interval between messages that will trigger the automatic addition of a Time separator. If set to Zero no Time separators will be added.
Declaration
public TimeSpan TimeSeparatorInterval { get; set; }
Property Value
Methods
BeginUpdate()
Declaration
public virtual void BeginUpdate()
CreateElementProvider()
This method creates an object that implements IVirtualizedElementProvider. Child elements are not yet created in this method.
Declaration
protected override IVirtualizedElementProvider<BaseChatDataItem> CreateElementProvider()
Returns
IVirtualizedElementProvider<BaseChatDataItem>
A new instance of an implementation of IVirtualizedElementProvider.
Overrides
CreateItemScroller()
Creates an instance of ItemScroller. Child elements are not yet created in this method.
Declaration
protected override ItemScroller<BaseChatDataItem> CreateItemScroller()
Returns
Overrides
CreateViewElement()
Creates the view element.
Declaration
protected override VirtualizedStackContainer<BaseChatDataItem> CreateViewElement()
Returns
Overrides
EndUpdate()
Declaration
public void EndUpdate()
IsScrolledToBottom()
Determines whether the chat view is currently scrolled to the bottom.
Declaration
public virtual bool IsScrolledToBottom()
Returns
true if scrolled to bottom or no scrollbar is needed; otherwise, false.
MeasureOverride(SizeF)
Measures the desired size of the element by calculating the space needed for content, padding, and borders.
OnCardActionClicked(object, CardActionEventArgs)
Declaration
protected virtual void OnCardActionClicked(object sender, CardActionEventArgs e)
Parameters
sender
e
OnPropertyChanged(RadPropertyChangedEventArgs)
Handles property change events by invalidating the fill cache and invoking the base class property change handler.
Declaration
protected override void OnPropertyChanged(RadPropertyChangedEventArgs e)
Parameters
e
Event arguments containing information about the property that changed.
Overrides
ScrollToBottom()
Scrolls the chat view to display the most recent messages at the bottom.
Declaration
public virtual void ScrollToBottom()
ScrollToDataItem(BaseChatDataItem)
Scrolls to the specified data item in the chat view.
Declaration
public virtual void ScrollToDataItem(BaseChatDataItem item)
Parameters
item
The data item to scroll to.
ScrollToMessage(ChatMessage)
Scrolls to the specified message in the chat view.
Declaration
public virtual void ScrollToMessage(ChatMessage message)
Parameters
message
The message to scroll to.
ShouldAddTimeSeparator(BaseChatDataItem, BaseChatDataItem)
Declaration
public virtual bool ShouldAddTimeSeparator(BaseChatDataItem item, BaseChatDataItem previousItem)
Parameters
item
previousItem
Returns
Update(UpdateModes)
Declaration
public virtual void Update(ChatMessagesViewElement.UpdateModes updateMode)
Parameters
updateMode