Class UserModel
Represents a user in the SfChatUI component.
Inheritance
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 |
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 |
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 |
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 |
Remarks
This property serves as the unique identifier for the user, essential for associating messages and interactions within the chat UI.
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 |
Remarks
This property specifies the name of the user as displayed in the SfChatUI component.