Avatar
Kendo UI Avatar component
Definition
Namespace:Kendo.Mvc.UI
Assembly:Kendo.Mvc.dll
Syntax:
public class Avatar : WidgetBase, IHtmlAttributesContainer
Inheritance: objectWidgetBaseAvatar
Implements:
Inherited Members
Constructors
Initializes a new instance of the Avatar class.
Properties
A text description of the Avatar image. When type="image" is configured this value will be used to populate the alt attribute of the <img> element.
public string Alt { get; set; }
Specifies whether the avatar should render border around its container element. Default is false.
public bool? Border { get; set; }
Adds additional custom classes to the Avatar container element.
public string ClassName { get; set; }
Sets a value controlling how the color is applied.
public AvatarFillMode? FillMode { get; set; }
Specifies an icon name to be used if the avatar type is set to icon. For a list of available icon names, please refer to the Web Font Icons article.Set this option to an icon descriptor such as { name: "gear", variant: "outline" }. The variant can be outline, solid, or duotone; it applies to SVG rendering and is ignored for font icons.
public AvatarIconSettings IconSettings { get; }
Specifies an image URL or dataURL that would be used to populate the src attribute of the avatar <img> element.
public string Image { get; set; }
public ComponentSize? Size { get; set; }
Sets additional CSS styles to the Avatar container element.
public IDictionary<string, object> Style { get; set; }
Will be used to populated Avatar content when its type is set to text
public string Text { get; set; }
Sets the theme color
public AvatarThemeColor? ThemeColor { get; set; }
Sets the type of the avatar.
public AvatarType? Type { get; set; }
Methods
Serializes the component settings to a dictionary.
public override IDictionary<string, object> Serialize()
A dictionary of settings.
Overrides:
SerializeSettings method.
protected override Dictionary<string, object> SerializeSettings()
Overrides:
Writes the HTML.
Writes the initialization script.
public override void WriteInitializationScript(TextWriter writer)
The TextWriter.
Overrides: