New to Telerik UI for ASP.NET Core? Start a free 30-day trial

Kendo UI Avatar TagHelper AvatarTagHelper class.

Definition

Child Tagsicon-settings

Constructors

Initializes a new instance of the AvatarTagHelper class.

C#
public AvatarTagHelper(IKendoHtmlGenerator generator)
Parameters:generatorIKendoHtmlGenerator

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.

C#
public string Alt { get; set; }

Specifies whether the avatar should render border around its container element. Default is false.

C#
public bool? Border { get; set; }

Adds additional custom classes to the Avatar container element.

C#
public string ClassName { get; set; }

Sets a value controlling how the color is applied.

C#
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.

C#
[HtmlAttributeName("icon")]
public string Icon { get; set; }

Specifies an image URL or dataURL that would be used to populate the src attribute of the avatar <img> element.

C#
public string Image { get; set; }

Sets a value controlling the border radius.

C#
public Rounded? Rounded { get; set; }

The Avatar allows you to set predefined sizes. When undefined (the default), the theme controls the default size. The available size values are "small", "medium", "large".The "none" value is deprecated. Use custom CSS instead.

C#
public ComponentSize? Size { get; set; }

Sets additional CSS styles to the Avatar container element.

C#
public IDictionary<string, object> Style { get; set; }

Will be used to populated Avatar content when its type is set to text

C#
public string Text { get; set; }

Sets the theme color

C#
public AvatarThemeColor? ThemeColor { get; set; }

Sets the type of the avatar.

C#
public AvatarType? Type { get; set; }

Methods

Gets the initialization script.

C#
protected override string GetInitializationScript()
Returns:

string

The initialization script.

Overrides: TagHelperBase.GetInitializationScript()

C#
public override Task ProcessAsync(TagHelperContext context, TagHelperOutput output)
Parameters:contextTagHelperContextoutputTagHelperOutputReturns:

Task

Overrides: TagHelper.ProcessAsync(TagHelperContext, TagHelperOutput)

Serializes the defined settings.

C#
public override IDictionary<string, object> Serialize()
Returns:

IDictionary<string, object>

Overrides: TagHelperBase.Serialize()

SerializeEvents method.

C#
protected override Dictionary<string, object> SerializeEvents()
Returns:

Dictionary<string, object>

Overrides: TagHelperBase.SerializeEvents()

SerializeSettings method.

C#
protected override Dictionary<string, object> SerializeSettings()
Returns:

Dictionary<string, object>

Overrides: TagHelperBase.SerializeSettings()

Writes the HTML output.

C#
protected override void WriteHtml(TagHelperOutput output)
Parameters:outputTagHelperOutput

The TagHelper output.

Overrides: TagHelperBase.WriteHtml(TagHelperOutput)