AvatarBuilder
Defines the fluent API for configuring the Kendo UI Avatar
Definition
Namespace:Kendo.Mvc.UI.Fluent
Assembly:Kendo.Mvc.dll
Syntax:
public class AvatarBuilder : WidgetBuilderBase<Avatar, AvatarBuilder>, IHtmlContent
Inheritance: objectHelperResultWidgetBuilderBase<Avatar, AvatarBuilder>AvatarBuilder
Implements:
Inherited Members
Constructors
Initializes a new instance of the AvatarBuilder class.
Methods
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 AvatarBuilder Alt(string value)
The value for Alt
Returns:Returns the current AvatarBuilder instance.
Specifies whether the avatar should render border around its container element. Default is false.
Specifies whether the avatar should render border around its container element. Default is false.
public AvatarBuilder Border(bool value)
The value for Border
Returns:Returns the current AvatarBuilder instance.
Adds additional custom classes to the Avatar container element.
public AvatarBuilder ClassName(string value)
The value for ClassName
Returns:Returns the current AvatarBuilder instance.
Sets a value controlling how the color is applied.
public AvatarBuilder FillMode(AvatarFillMode value)
The value for FillMode
Returns:Returns the current AvatarBuilder instance.
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 AvatarBuilder Icon(Action<AvatarIconSettingsBuilder> configurator)
The AvatarIconSettingsBuilder for the icon setting.
Returns:Returns the current instance of AvatarBuilder .
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 AvatarBuilder Icon(string icon)
The icon.
Returns:Returns the current instance of AvatarBuilder .
Specifies an image URL or dataURL that would be used to populate the src attribute of the avatar <img> element.
public AvatarBuilder Image(string value)
The value for Image
Returns:Returns the current AvatarBuilder instance.
Sets a value controlling the border radius.
public AvatarBuilder Rounded(Rounded value)
The value for Rounded
Returns:Returns the current AvatarBuilder instance.
public AvatarBuilder Size(ComponentSize value)
The value for Size
Returns:Returns the current AvatarBuilder instance.
Sets additional CSS styles to the Avatar container element.
public AvatarBuilder Style(IDictionary<string, object> value)
The value that configures the style.
Returns:Returns the current AvatarBuilder instance.
Will be used to populated Avatar content when its type is set to text
public AvatarBuilder Text(string value)
The value for Text
Returns:Returns the current AvatarBuilder instance.
Sets the theme color
public AvatarBuilder ThemeColor(AvatarThemeColor value)
The value for ThemeColor
Returns:Returns the current AvatarBuilder instance.
Sets the type of the avatar.
public AvatarBuilder Type(AvatarType value)
The value for Type
Returns:Returns the current AvatarBuilder instance.