menu

Blazor

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class UserModel - Blazor API Reference | Syncfusion

    Show / Hide Table of Contents

    Class UserModel

    Represents a user in the SfChatUI component.

    Inheritance
    System.Object
    UserModel
    Namespace: Syncfusion.Blazor.InteractiveChat
    Assembly: Syncfusion.Blazor.dll
    Syntax
    public class UserModel : Object
    Remarks

    This class defines the attributes of a user displayed in the chat UI, such as the user's name, ID, avatar, and styling options.

    Constructors

    UserModel()

    Declaration
    public UserModel()

    Properties

    AvatarBgColor

    Gets or sets the background color for the user's avatar in the SfChatUI component.

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

    A System.String representing the background color of the user's avatar. The default value is string.Empty.

    Remarks

    This property defines the background color of the user's avatar, which may be useful for distinguishing between users in the chat UI.

    AvatarUrl

    Gets or sets the URL for the user's avatar in the SfChatUI component.

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

    A System.String representing the URL of the user's avatar. The default value is string.Empty.

    Remarks

    This property specifies the URL for the user's avatar image in the chat. If no URL is provided, an icon with the user's initials may be used as a fallback.

    CssClass

    Gets or sets the CSS class for styling the user’s messages in the SfChatUI component.

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

    A System.String representing the CSS class for the user. The default value is string.Empty.

    Remarks

    This property allows the customization of the user's message appearance by applying specified CSS styles in the chat UI.

    ID

    Gets or sets the unique identifier for the user in the SfChatUI component.

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

    A System.String representing the unique ID of the user. The default value is string.Empty.

    Remarks

    This property serves as the unique identifier for the user, essential for associating messages and interactions within the chat UI.

    StatusIconCss

    Gets or sets the CSS class of the status icon in the SfChatUI component.

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

    A System.String representing the CSS class for the status icon. The default value is string.Empty.

    Remarks

    This property allows customizing the appearance of the status icon shown in the chat header and chat messages. You can apply different styles to indicate statuses like online, offline, or busy.

    User

    Gets or sets the username associated with the chat message in the SfChatUI component.

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

    A System.String representing the username. The default value is string.Empty.

    Remarks

    This property specifies the name of the user as displayed in the SfChatUI component.

    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved