menu

MAUI

  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class SfChat - MAUI API Reference | Syncfusion

    Show / Hide Table of Contents

    Class SfChat

    A user interface control that can create modern conversational chatbot experiences in mobile applications. It is a flexible control that shows a conversation between two or more users in a fully customizable layout.

    Inheritance
    System.Object
    SfView
    SfContentView
    SfChat
    AssistViewChat
    Implements
    IDrawableLayout
    Microsoft.Maui.Graphics.IDrawable
    Microsoft.Maui.IAbsoluteLayout
    Microsoft.Maui.ILayout
    Microsoft.Maui.IView
    Microsoft.Maui.IElement
    Microsoft.Maui.ITransform
    Microsoft.Maui.IContainer
    System.Collections.Generic.IList<Microsoft.Maui.IView>
    System.Collections.Generic.ICollection<Microsoft.Maui.IView>
    System.Collections.Generic.IEnumerable<Microsoft.Maui.IView>
    System.Collections.IEnumerable
    Microsoft.Maui.ISafeAreaView
    Microsoft.Maui.IPadding
    Microsoft.Maui.ICrossPlatformLayout
    Microsoft.Maui.IVisualTreeElement
    Inherited Members
    SfContentView.Content
    SfContentView.ContentProperty
    SfContentView.OnContentChanged(Object, Object)
    SfView.ArrangeContent(Rect)
    SfView.ArrangeOverride(Rect)
    SfView.Children
    SfView.ClipToBounds
    SfView.GetSemanticsNodesCore(Double, Double)
    SfView.IDrawableLayout.DrawingOrder
    SfView.IDrawableLayout.InvalidateDrawable()
    SfView.MeasureContent(Double, Double)
    SfView.MeasureOverride(Double, Double)
    SfView.OnBindingContextChanged()
    SfView.OnDraw(ICanvas, RectF)
    SfView.OnHandlerChanged()
    SfView.Padding
    Namespace: Syncfusion.Maui.Chat
    Assembly: Syncfusion.Maui.Chat.dll
    Syntax
    public class SfChat : SfContentView, IDrawableLayout, IDrawable, IAbsoluteLayout, ILayout, IView, IElement, ITransform, IContainer, IList<IView>, ICollection<IView>, IEnumerable<IView>, IEnumerable, ISafeAreaView, IPadding, ICrossPlatformLayout, IVisualTreeElement, ISemanticsProvider, IParentThemeElement, IThemeElement, ITouchListener

    Constructors

    SfChat()

    Initializes a new instance of the SfChat class.

    Declaration
    public SfChat()

    Fields

    AllowMultilineInputProperty

    Identifies the AllowMultilineInput Microsoft.Maui.Controls.BindableProperty.

    Declaration
    public static readonly BindableProperty AllowMultilineInputProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty

    AllowSwipingProperty

    Identifies the AllowSwiping bindable property.

    Declaration
    public static readonly BindableProperty AllowSwipingProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty

    AttachmentButtonCommandParameterProperty

    Identifies the AttachmentButtonCommandParameter Microsoft.Maui.Controls.BindableProperty.

    Declaration
    public static readonly BindableProperty AttachmentButtonCommandParameterProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty

    AttachmentButtonCommandProperty

    Identifies the AttachmentButtonCommand Microsoft.Maui.Controls.BindableProperty.

    Declaration
    public static readonly BindableProperty AttachmentButtonCommandProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty

    AttachmentButtonTemplateProperty

    Identifies the AttachmentButtonTemplate Microsoft.Maui.Controls.BindableProperty.

    Declaration
    public static readonly BindableProperty AttachmentButtonTemplateProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty

    CanAutoScrollToBottomProperty

    Identifies the CanAutoScrollToBottom Microsoft.Maui.Controls.BindableProperty.

    Declaration
    public static readonly BindableProperty CanAutoScrollToBottomProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty

    CardCommandProperty

    Identifies the CardCommand Microsoft.Maui.Controls.BindableProperty.

    Declaration
    public static readonly BindableProperty CardCommandProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty

    CurrentUserProperty

    Identifies the CurrentUser Microsoft.Maui.Controls.BindableProperty.

    Declaration
    public static readonly BindableProperty CurrentUserProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty

    EndSwipeTemplateProperty

    Identifies the EndSwipeTemplate bindable property.

    Declaration
    public static readonly BindableProperty EndSwipeTemplateProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty
    Remarks

    This bindable property is read-only.

    ImageTappedCommandProperty

    Identifies the ImageTappedCommand Microsoft.Maui.Controls.BindableProperty.

    Declaration
    public static readonly BindableProperty ImageTappedCommandProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty

    IncomingMessageTimestampFormatProperty

    Identifies the IncomingMessageTimestampFormat Microsoft.Maui.Controls.BindableProperty.

    Declaration
    public static readonly BindableProperty IncomingMessageTimestampFormatProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty

    IsLazyLoadingProperty

    Identifies the IsBusy Microsoft.Maui.Controls.BindableProperty.

    Declaration
    public static readonly BindableProperty IsLazyLoadingProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty
    Remarks

    This bindable property is read-only.

    ItemsSourceConverterProperty

    Identifies the ItemsSourceConverter Microsoft.Maui.Controls.BindableProperty.

    Declaration
    public static readonly BindableProperty ItemsSourceConverterProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty

    ItemsSourceProperty

    Identifies the ItemsSource Microsoft.Maui.Controls.BindableProperty.

    Declaration
    public static readonly BindableProperty ItemsSourceProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty

    LoadMoreBehaviorProperty

    Identifies the LoadMoreBehavior Microsoft.Maui.Controls.BindableProperty.

    Declaration
    public static readonly BindableProperty LoadMoreBehaviorProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty
    Remarks

    This bindable property is read-only.

    LoadMoreCommandParameterProperty

    Identifies the LoadMoreCommandParameter Microsoft.Maui.Controls.BindableProperty.

    Declaration
    public static readonly BindableProperty LoadMoreCommandParameterProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty
    Remarks

    This bindable property is read-only.

    LoadMoreCommandProperty

    Identifies the LoadMoreCommand Microsoft.Maui.Controls.BindableProperty.

    Declaration
    public static readonly BindableProperty LoadMoreCommandProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty
    Remarks

    This bindable property is read-only.

    LoadMoreTemplateProperty

    Identifies the LoadMoreTemplate Microsoft.Maui.Controls.BindableProperty.

    Declaration
    public static readonly BindableProperty LoadMoreTemplateProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty
    Remarks

    This bindable property is read-only.

    MaxSwipeOffsetProperty

    Identifies the MaxSwipeOffset bindable property.

    Declaration
    public static readonly BindableProperty MaxSwipeOffsetProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty
    Remarks

    This bindable property is read-only.

    MessageDoubleTappedCommandProperty

    Identifies the MessageDoubleTappedCommand bindable property.

    Declaration
    public static readonly BindableProperty MessageDoubleTappedCommandProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty
    Remarks

    This bindable property is read-only.

    MessageLongPressedCommandProperty

    Identifies the MessageLongPressedCommand bindable property.

    Declaration
    public static readonly BindableProperty MessageLongPressedCommandProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty
    Remarks

    This bindable property is read-only.

    MessageShapeProperty

    Identifies the MessageShape Microsoft.Maui.Controls.BindableProperty.

    Declaration
    public static readonly BindableProperty MessageShapeProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty

    MessageSpacingProperty

    Identifies the MessageSpacing Microsoft.Maui.Controls.BindableProperty.

    Declaration
    public static readonly BindableProperty MessageSpacingProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty

    MessagesProperty

    Identifies the Messages Microsoft.Maui.Controls.BindableProperty.

    Declaration
    public static readonly BindableProperty MessagesProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty

    MessageTappedCommandProperty

    Identifies the MessageTappedCommand bindable property.

    Declaration
    public static readonly BindableProperty MessageTappedCommandProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty
    Remarks

    This bindable property is read-only.

    MessageTemplateProperty

    Identifies the MessageTemplate Microsoft.Maui.Controls.BindableProperty.

    Declaration
    public static readonly BindableProperty MessageTemplateProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty

    OutgoingMessageTimestampFormatProperty

    Identifies the OutgoingMessageTimestampFormat Microsoft.Maui.Controls.BindableProperty.

    Declaration
    public static readonly BindableProperty OutgoingMessageTimestampFormatProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty

    SendMessageCommandProperty

    Identifies the SendMessageCommand Microsoft.Maui.Controls.BindableProperty.

    Declaration
    public static readonly BindableProperty SendMessageCommandProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty

    ShowAttachmentButtonProperty

    Identifies the ShowAttachmentButton Microsoft.Maui.Controls.BindableProperty.

    Declaration
    public static readonly BindableProperty ShowAttachmentButtonProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty

    ShowIncomingMessageAuthorNameProperty

    Identifies the ShowIncomingMessageAuthorName Microsoft.Maui.Controls.BindableProperty.

    Declaration
    public static readonly BindableProperty ShowIncomingMessageAuthorNameProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty

    ShowIncomingMessageAvatarProperty

    Identifies the ShowIncomingMessageAvatar Microsoft.Maui.Controls.BindableProperty.

    Declaration
    public static readonly BindableProperty ShowIncomingMessageAvatarProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty

    ShowIncomingMessageTimestampProperty

    Identifies the ShowIncomingMessageTimestamp Microsoft.Maui.Controls.BindableProperty.

    Declaration
    public static readonly BindableProperty ShowIncomingMessageTimestampProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty

    ShowKeyboardAlwaysProperty

    Identifies the ShowKeyboardAlways Microsoft.Maui.Controls.BindableProperty.

    Declaration
    public static readonly BindableProperty ShowKeyboardAlwaysProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty

    ShowMessageInputViewProperty

    Identifies the ShowMessageInputView Microsoft.Maui.Controls.BindableProperty.

    Declaration
    public static readonly BindableProperty ShowMessageInputViewProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty

    ShowOutgoingMessageAuthorNameProperty

    Identifies the ShowOutgoingMessageAuthorName Microsoft.Maui.Controls.BindableProperty.

    Declaration
    public static readonly BindableProperty ShowOutgoingMessageAuthorNameProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty

    ShowOutgoingMessageAvatarProperty

    Identifies the ShowOutgoingMessageAvatar Microsoft.Maui.Controls.BindableProperty.

    Declaration
    public static readonly BindableProperty ShowOutgoingMessageAvatarProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty

    ShowOutgoingMessageTimestampProperty

    Identifies the ShowOutgoingMessageTimestamp Microsoft.Maui.Controls.BindableProperty.

    Declaration
    public static readonly BindableProperty ShowOutgoingMessageTimestampProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty

    ShowTimeBreakProperty

    Identifies the ShowTimeBreak Microsoft.Maui.Controls.BindableProperty.

    Declaration
    public static readonly BindableProperty ShowTimeBreakProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty

    ShowTypingIndicatorProperty

    Identifies the ShowTypingIndicator Microsoft.Maui.Controls.BindableProperty.

    Declaration
    public static readonly BindableProperty ShowTypingIndicatorProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty

    StartSwipeTemplateProperty

    Identifies the StartSwipeTemplate bindable property.

    Declaration
    public static readonly BindableProperty StartSwipeTemplateProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty
    Remarks

    This bindable property is read-only.

    StickyTimeBreakProperty

    Identifies the StickyTimeBreak Microsoft.Maui.Controls.BindableProperty.

    Declaration
    public static readonly BindableProperty StickyTimeBreakProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty

    SuggestionItemSelectedCommandProperty

    Identifies the SuggestionItemSelectedCommand Microsoft.Maui.Controls.BindableProperty.

    Declaration
    public static readonly BindableProperty SuggestionItemSelectedCommandProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty

    SuggestionsProperty

    Identifies the Suggestions Microsoft.Maui.Controls.BindableProperty.

    Declaration
    public static readonly BindableProperty SuggestionsProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty

    TimeBreakTemplateProperty

    Identifies the TimeBreakTemplate Microsoft.Maui.Controls.BindableProperty.

    Declaration
    public static readonly BindableProperty TimeBreakTemplateProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty

    TypingIndicatorProperty

    Identifies the TypingIndicator Microsoft.Maui.Controls.BindableProperty.

    Declaration
    public static readonly BindableProperty TypingIndicatorProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty

    TypingIndicatorViewHeightProperty

    Identifies the TypingIndicatorViewHeight bindable property.

    Declaration
    public static readonly BindableProperty TypingIndicatorViewHeightProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty

    Properties

    AllowMultilineInput

    Gets or sets a value indicating whether the Editor should accept multiline text input or single line text input for outgoing messages. This is a bindable property.

    Declaration
    public bool AllowMultilineInput { get; set; }
    Property Value
    Type Description
    System.Boolean

    true If the editor control should be Multiple-line text input , otherwise false. The default value is true.

    AllowSwiping

    Gets or sets a value indicating whether to enable swiping of messages or not.

    Declaration
    public bool AllowSwiping { get; set; }
    Property Value
    Type
    System.Boolean

    AttachmentButtonCommand

    Gets or sets the command that will be executed when the attachment button is tapped.

    Declaration
    public ICommand AttachmentButtonCommand { get; set; }
    Property Value
    Type
    System.Windows.Input.ICommand

    AttachmentButtonCommandParameter

    Gets or sets the parameter for AttachmentButtonCommandParameter.

    Declaration
    public object AttachmentButtonCommandParameter { get; set; }
    Property Value
    Type
    System.Object

    AttachmentButtonTemplate

    Gets or sets the template to be loaded in the attachment button area of the message input view in SfChat.

    Declaration
    public DataTemplate AttachmentButtonTemplate { get; set; }
    Property Value
    Type
    Microsoft.Maui.Controls.DataTemplate

    CanAutoScrollToBottom

    Gets or sets a value indicating whether SfChat should be auto scrolled to the newly added message. This is applicable for both incoming and outgoing message. This is a bindable property.

    Declaration
    public bool CanAutoScrollToBottom { get; set; }
    Property Value
    Type Description
    System.Boolean

    true To auto scroll to the newly added message, otherwise false. The default value is true.

    CardCommand

    Gets or sets the command that will be executed when the user taps a card or clicks an action button in a card message.

    Declaration
    public ICommand CardCommand { get; set; }
    Property Value
    Type
    System.Windows.Input.ICommand

    CurrentUser

    Gets or sets the current author of a message.

    Declaration
    public Author CurrentUser { get; set; }
    Property Value
    Type
    Author

    Editor

    Gets the used in SfChat that allows users to type/input messages. You can use this to listen to focus change, text change events to find whether a user is typing or has finished typing.

    Declaration
    public Editor Editor { get; }
    Property Value
    Type
    Microsoft.Maui.Controls.Editor

    EndSwipeTemplate

    Gets or sets the template view to be displayed when swiping a message from 'right to left'. The SfChat enables you to load a desired Content to be displayed when swiping towards left using this property. The swipe views will be displayed only when AllowSwiping is set as true.

    Declaration
    public DataTemplate EndSwipeTemplate { get; set; }
    Property Value
    Type Description
    Microsoft.Maui.Controls.DataTemplate

    The template that is displayed when right to left swipe action is performed.

    ImageTappedCommand

    Gets or sets the command that will be executed when the user tapped an image in the image message.

    Declaration
    public ICommand ImageTappedCommand { get; set; }
    Property Value
    Type
    System.Windows.Input.ICommand
    Remarks

    The ImageTappedEventArgs is passed as a parameter.

    IncomingMessageTimestampFormat

    Gets or sets a value that indicates the format applied to time stamp for all the incoming messages.

    Declaration
    public string IncomingMessageTimestampFormat { get; set; }
    Property Value
    Type
    System.String

    IsLazyLoading

    Gets or sets a value indicating whether the busy state of the SfChat while executing the LoadMoreCommand.

    Declaration
    public bool IsLazyLoading { get; set; }
    Property Value
    Type
    System.Boolean

    ItemsSource

    Gets or sets the message collection for the chat. Each item in the collection will be converted to chat message and added to Messages.

    Declaration
    public IEnumerable ItemsSource { get; set; }
    Property Value
    Type
    System.Collections.IEnumerable

    ItemsSourceConverter

    Gets or sets the converter used to convert data objects to chat messages and vice versa.

    Declaration
    public IChatMessageConverter ItemsSourceConverter { get; set; }
    Property Value
    Type
    IChatMessageConverter

    LoadMoreBehavior

    Gets or sets the that determines the behavior of load more in SfChat.

    Declaration
    public LoadMoreOption LoadMoreBehavior { get; set; }
    Property Value
    Type
    LoadMoreOption

    LoadMoreCommand

    Gets or sets the command that will be executed when the load more view is tapped or when the load more operation is triggered.

    Declaration
    public ICommand LoadMoreCommand { get; set; }
    Property Value
    Type
    System.Windows.Input.ICommand

    LoadMoreCommandParameter

    Gets or sets the parameter for LoadMoreCommand.

    Declaration
    public object LoadMoreCommandParameter { get; set; }
    Property Value
    Type
    System.Object

    LoadMoreTemplate

    Gets or sets the template that will be loaded as load more view when SfChat is scrolled to the top of the message collection. If it is null, the default load more view will be loaded.

    Declaration
    public DataTemplate LoadMoreTemplate { get; set; }
    Property Value
    Type
    Microsoft.Maui.Controls.DataTemplate

    MaxSwipeOffset

    Gets or sets a value indicating the maximum offset/pixels a message will be moved upon swiping. The default value is 100.

    Declaration
    public double MaxSwipeOffset { get; set; }
    Property Value
    Type Description
    System.Double

    The swipe offset value.

    MessageDoubleTappedCommand

    Gets or sets System.Windows.Input.ICommand that will be executed when a message is double tapped in SfChat control.

    Declaration
    public ICommand MessageDoubleTappedCommand { get; set; }
    Property Value
    Type
    System.Windows.Input.ICommand

    MessageLongPressedCommand

    Gets or sets System.Windows.Input.ICommand that will be executed when a message is long pressed/held in SfChat control.

    Declaration
    public ICommand MessageLongPressedCommand { get; set; }
    Property Value
    Type
    System.Windows.Input.ICommand

    Messages

    Gets or sets the collection of System.Object of messages to be displayed in the chat.

    Declaration
    public IList<object> Messages { get; set; }
    Property Value
    Type Description
    System.Collections.Generic.IList<System.Object>

    A collection of System.Object. The default value is Empty.

    MessageShape

    Gets or sets the shape of the message view.

    Declaration
    public MessageShape MessageShape { get; set; }
    Property Value
    Type
    MessageShape

    MessageSpacing

    Gets or sets the spacing between the messages in SfChat.

    Declaration
    public double MessageSpacing { get; set; }
    Property Value
    Type Description
    System.Double

    The message spacing value.

    MessageTappedCommand

    Gets or sets System.Windows.Input.ICommand that will be executed when a message is tapped in SfChat control.

    Declaration
    public ICommand MessageTappedCommand { get; set; }
    Property Value
    Type
    System.Windows.Input.ICommand

    MessageTemplate

    Gets or sets the template used to display a message and its related information.

    Declaration
    public DataTemplate MessageTemplate { get; set; }
    Property Value
    Type
    Microsoft.Maui.Controls.DataTemplate

    OutgoingMessageTimestampFormat

    Gets or sets a value that indicates the format applied to time stamp for all the outgoing messages.

    Declaration
    public string OutgoingMessageTimestampFormat { get; set; }
    Property Value
    Type
    System.String

    SendMessageCommand

    Gets or sets the command that will be executed when the user sends a message.

    Declaration
    public ICommand SendMessageCommand { get; set; }
    Property Value
    Type
    System.Windows.Input.ICommand

    ShowAttachmentButton

    Gets or sets a value indicating whether the visibility of the attachment icon in SfChat.

    Declaration
    public bool ShowAttachmentButton { get; set; }
    Property Value
    Type Description
    System.Boolean

    True, if attachment icon is visible. Default value is false.

    ShowIncomingMessageAuthorName

    Gets or sets a value indicating whether the message’s author name should be shown for all the incoming messages. This is a bindable property.

    Declaration
    public bool ShowIncomingMessageAuthorName { get; set; }
    Property Value
    Type Description
    System.Boolean

    true If the author name is visible, otherwise false. The default value is true.

    ShowIncomingMessageAvatar

    Gets or sets a value indicating whether the avatar should be shown for all the incoming messages.

    Declaration
    public bool ShowIncomingMessageAvatar { get; set; }
    Property Value
    Type Description
    System.Boolean

    true If the avatar is visible, otherwise false. The default value is true.

    ShowIncomingMessageTimestamp

    Gets or sets a value indicating whether the time stamp details should be shown for all the incoming messages. This is a bindable property.

    Declaration
    public bool ShowIncomingMessageTimestamp { get; set; }
    Property Value
    Type Description
    System.Boolean

    true If the time stamp is visible, otherwise false. The default value is true.

    ShowKeyboardAlways

    Gets or sets a value indicating whether keyboard should remain open even after a message is sent in SfChat.

    Declaration
    public bool ShowKeyboardAlways { get; set; }
    Property Value
    Type Description
    System.Boolean

    The default value is true.

    Remarks

    By default Keyboard will remain open after a message is sent in SfChat.

    ShowMessageInputView

    Gets or sets a value indicating whether the visibility of the message input/typing area in SfChat.

    Declaration
    public bool ShowMessageInputView { get; set; }
    Property Value
    Type Description
    System.Boolean

    False, if message input area is not visible. Default value is true.

    ShowOutgoingMessageAuthorName

    Gets or sets a value indicating whether the message’s author name should be shown for all the outgoing messages. This is a bindable property.

    Declaration
    public bool ShowOutgoingMessageAuthorName { get; set; }
    Property Value
    Type Description
    System.Boolean

    true If the author name is visible, otherwise false. The default value is true.

    ShowOutgoingMessageAvatar

    Gets or sets a value indicating whether the avatar should be shown for all the outgoing messages.

    Declaration
    public bool ShowOutgoingMessageAvatar { get; set; }
    Property Value
    Type Description
    System.Boolean

    true If the avatar is visible, otherwise false. The default value is false.

    ShowOutgoingMessageTimestamp

    Gets or sets a value indicating whether the time stamp details should be shown for all the outgoing messages. This is a bindable property.

    Declaration
    public bool ShowOutgoingMessageTimestamp { get; set; }
    Property Value
    Type Description
    System.Boolean

    true If the time stamp is visible, otherwise false. The default value is true.

    ShowTimeBreak

    Gets or sets a value indicating whether a time break view can be shown in SfChat by grouping messages by date.

    Declaration
    public bool ShowTimeBreak { get; set; }
    Property Value
    Type
    System.Boolean

    ShowTypingIndicator

    Gets or sets a value indicating whether the typing indicator should be displayed at the bottom of chat control to notify when a user is typing.

    Declaration
    public bool ShowTypingIndicator { get; set; }
    Property Value
    Type Description
    System.Boolean

    true If typing indicator is visible, otherwise false. The default value is true.

    StartSwipeTemplate

    Gets or sets the template view to be displayed when swiping a message from 'left to right'. The SfChat enables you to load a desired Content to be displayed when swiping towards right using this property. The swipe views will be displayed only when AllowSwiping is set as true.

    Declaration
    public DataTemplate StartSwipeTemplate { get; set; }
    Property Value
    Type Description
    Microsoft.Maui.Controls.DataTemplate

    The template that is displayed when left to right swipe action is performed.

    StickyTimeBreak

    Gets or sets a value indicating whether the timer break should be sticky or non-sticky.

    Declaration
    public bool StickyTimeBreak { get; set; }
    Property Value
    Type
    System.Boolean

    SuggestionItemSelectedCommand

    Gets or sets the command that will be executed when an item is selected from the list of suggestions that is displayed as an response to a user message.

    Declaration
    public ICommand SuggestionItemSelectedCommand { get; set; }
    Property Value
    Type
    System.Windows.Input.ICommand

    Suggestions

    Gets or sets the list of items to be displayed as response to a user message. The suggestions will be displayed above the message typing/input area as part of the footer view.

    Declaration
    public ChatSuggestions Suggestions { get; set; }
    Property Value
    Type
    ChatSuggestions

    TimeBreakTemplate

    Gets or sets the template used to display custom view in the time break area.

    Declaration
    public DataTemplate TimeBreakTemplate { get; set; }
    Property Value
    Type
    Microsoft.Maui.Controls.DataTemplate

    TypingIndicator

    Gets or sets the helper to set the settings for typing indicator.

    Declaration
    public ChatTypingIndicator TypingIndicator { get; set; }
    Property Value
    Type
    ChatTypingIndicator

    TypingIndicatorViewHeight

    Gets or sets a value indicating the height of the typing indicator view in SfChat.The default value is 20. Set value as 0 to hide the typing indicator view area.

    Declaration
    public double TypingIndicatorViewHeight { get; set; }
    Property Value
    Type
    System.Double

    Methods

    OnPropertyChanged(String)

    Raised when SfChat control properties is changed.

    Declaration
    protected override void OnPropertyChanged(string propertyName = null)
    Parameters
    Type Name Description
    System.String propertyName

    changed property name.

    ResetSwipeOffset()

    Resets the swipe offset of the last swiped message and moves the swiped message to its default position.

    Declaration
    public void ResetSwipeOffset()

    ScrollToMessage(Object)

    Scrolls the SfChat to the given message.

    Declaration
    public void ScrollToMessage(object message)
    Parameters
    Type Name Description
    System.Object message

    The message to scroll to.

    Remarks

    By default, the message is scrolled at end of chat.

    Events

    AttachmentButtonClicked

    Occurs when the attachment button is tapped.

    Declaration
    public event EventHandler AttachmentButtonClicked
    Event Type
    Type
    System.EventHandler

    CardTapped

    Occurs when the user taps a card or clicks an action button in a card message.

    Declaration
    public event EventHandler<CardTappedEventArgs> CardTapped
    Event Type
    Type
    System.EventHandler<CardTappedEventArgs>

    ImageTapped

    Occurs when the user tapped an image in the ImageMessage.

    Declaration
    public event EventHandler<ImageTappedEventArgs> ImageTapped
    Event Type
    Type
    System.EventHandler<ImageTappedEventArgs>

    MessageDoubleTapped

    Occurs when a message is double tapped in SfChat control.

    Declaration
    public event EventHandler<MessageDoubleTappedEventArgs> MessageDoubleTapped
    Event Type
    Type
    System.EventHandler<MessageDoubleTappedEventArgs>

    MessageLongPressed

    Occurs when a message is long pressed/held in SfChat control.

    Declaration
    public event EventHandler<MessageLongPressedEventArgs> MessageLongPressed
    Event Type
    Type
    System.EventHandler<MessageLongPressedEventArgs>

    MessageTapped

    Occurs when a message is tapped in SfChat control.

    Declaration
    public event EventHandler<MessageTappedEventArgs> MessageTapped
    Event Type
    Type
    System.EventHandler<MessageTappedEventArgs>

    Scrolled

    Occurs when the SfChat control is scrolled.

    Declaration
    public event EventHandler<ChatScrolledEventArgs> Scrolled
    Event Type
    Type
    System.EventHandler<ChatScrolledEventArgs>

    SendMessage

    Occurs when the a message is being sent.

    Declaration
    public event EventHandler<SendMessageEventArgs> SendMessage
    Event Type
    Type
    System.EventHandler<SendMessageEventArgs>

    SuggestionItemSelected

    Occurs when the user selects an item in the suggestion list.

    Declaration
    public event EventHandler<SuggestionItemSelectedEventArgs> SuggestionItemSelected
    Event Type
    Type
    System.EventHandler<SuggestionItemSelectedEventArgs>

    SwipeEnded

    Occurs when the swipe action is completed for a message.

    Declaration
    public event EventHandler<MessageSwipeEndedEventArgs> SwipeEnded
    Event Type
    Type
    System.EventHandler<MessageSwipeEndedEventArgs>

    SwipeStarted

    Occurs when the user starts to swipe a message.

    Declaration
    public event EventHandler<MessageSwipeStartedEventArgs> SwipeStarted
    Event Type
    Type
    System.EventHandler<MessageSwipeStartedEventArgs>

    Swiping

    Occurs when a message is currently being swiped.

    Declaration
    public event EventHandler<MessageSwipingEventArgs> Swiping
    Event Type
    Type
    System.EventHandler<MessageSwipingEventArgs>

    Implements

    IDrawableLayout
    Microsoft.Maui.Graphics.IDrawable
    Microsoft.Maui.IAbsoluteLayout
    Microsoft.Maui.ILayout
    Microsoft.Maui.IView
    Microsoft.Maui.IElement
    Microsoft.Maui.ITransform
    Microsoft.Maui.IContainer
    System.Collections.Generic.IList<>
    System.Collections.Generic.ICollection<>
    System.Collections.Generic.IEnumerable<>
    System.Collections.IEnumerable
    Microsoft.Maui.ISafeAreaView
    Microsoft.Maui.IPadding
    Microsoft.Maui.ICrossPlatformLayout
    Microsoft.Maui.IVisualTreeElement
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved