alexa
menu

Blazor

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Search Results for

    Show / Hide Table of Contents

    Class TimeBreakTemplateContext

    Provides the context for the TimeBreakTemplate tag in SfChatUI, supplying the date used to render a time break between grouped messages.

    Inheritance
    object
    TimeBreakTemplateContext
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    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.

    In this article
    Back to top Generated by DocFX
    Copyright © 2001 - 2026 Syncfusion Inc. All Rights Reserved