alexa
Syncfusion
menu Syncfusion

MAUI

  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Search Results for

    Show / Hide Table of Contents

    Class ChatMessageTemplateSelector

    Provides override methods to load a custom template for messages based on its type.

    Inheritance
    object
    ChatMessageTemplateSelector
    Namespace: Syncfusion.Maui.Chat
    Assembly: Syncfusion.Maui.Chat.dll
    Syntax
    public class ChatMessageTemplateSelector : DataTemplateSelector

    Constructors

    ChatMessageTemplateSelector(SfChat)

    Initializes a new instance of the ChatMessageTemplateSelector class.

    Declaration
    public ChatMessageTemplateSelector(SfChat chat)
    Parameters
    Type Name Description
    SfChat chat

    The instance of the SfChat control.

    Methods

    OnSelectTemplate(object, BindableObject)

    Returns the required template based on the message type.

    Declaration
    protected override DataTemplate? OnSelectTemplate(object item, BindableObject container)
    Parameters
    Type Name Description
    object item

    The actual message as object.

    BindableObject container

    The actual row data as Microsoft.Maui.Controls.BindableObject.

    Returns
    Type Description
    DataTemplate

    A developer-defined Microsoft.Maui.Controls.DataTemplate that can be used to display a message.

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