Class TimeBreakTemplateContext
Provides the context for the TimeBreakTemplate tag in SfChatUI,
supplying the date used to render a time break between grouped messages.
Inherited Members
Namespace: Syncfusion.Blazor.InteractiveChat
Assembly: Syncfusion.Blazor.dll
Syntax
public class TimeBreakTemplateContext
Remarks
This context object is passed to the TimeBreakTemplate parameter of SfChatUI.
- MessageDate – The nullable DateTime representing the date at which the break is displayed.
Examples
<SfChatUI>
<TimeBreakTemplate>
@if (context.MessageDate.HasValue)
{
<div class="time-break">
@context.MessageDate.Value.ToString("MMMM d, yyyy")
</div>
}
</TimeBreakTemplate>
</SfChatUI>
Constructors
TimeBreakTemplateContext()
Declaration
public TimeBreakTemplateContext()
Properties
MessageDate
Gets or sets the date for a time breaks in the SfChatUI component. It represents the time breaks between messages being grouped based on the date.
Declaration
public DateTime? MessageDate { get; set; }
Property Value
| Type | Description |
|---|---|
| DateTime? | A DateTime object representing the message date. |
Remarks
This property holds the date information for the message being displayed in the SfChatUI component.