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

Defines the fluent API for configuring the Kendo UI Avatar

Definition

Namespace:Kendo.Mvc.UI.Fluent

Assembly:Kendo.Mvc.dll

Syntax:

C#
public class AvatarBuilder : WidgetBuilderBase<Avatar, AvatarBuilder>, IHtmlContent

Inheritance: objectHelperResultWidgetBuilderBase<Avatar, AvatarBuilder>AvatarBuilder

Implements: IHtmlContent

Inherited Members WidgetBuilderBase<Avatar, AvatarBuilder>.ToComponent()WidgetBuilderBase<Avatar, AvatarBuilder>.Expression(string)WidgetBuilderBase<Avatar, AvatarBuilder>.Explorer(ModelExplorer)WidgetBuilderBase<Avatar, AvatarBuilder>.Name(string)WidgetBuilderBase<Avatar, AvatarBuilder>.Deferred(bool)WidgetBuilderBase<Avatar, AvatarBuilder>.HtmlAttributes(object)WidgetBuilderBase<Avatar, AvatarBuilder>.HtmlAttributes(IDictionary<string, object>)WidgetBuilderBase<Avatar, AvatarBuilder>.ScriptAttributes(object, bool)WidgetBuilderBase<Avatar, AvatarBuilder>.ScriptAttributes(IDictionary<string, object>, bool)WidgetBuilderBase<Avatar, AvatarBuilder>.Render()WidgetBuilderBase<Avatar, AvatarBuilder>.ToHtmlString()WidgetBuilderBase<Avatar, AvatarBuilder>.WriteTo(TextWriter, HtmlEncoder)WidgetBuilderBase<Avatar, AvatarBuilder>.ToClientTemplate()WidgetBuilderBase<Avatar, AvatarBuilder>.AsModule(bool)WidgetBuilderBase<Avatar, AvatarBuilder>.ComponentWidgetBuilderBase<Avatar, AvatarBuilder>.ContainerHelperResult.WriteTo(TextWriter, HtmlEncoder)HelperResult.WriteActionobject.GetType()object.MemberwiseClone()object.ToString()object.Equals(object)object.Equals(object, object)object.ReferenceEquals(object, object)object.GetHashCode()...

Constructors

Initializes a new instance of the AvatarBuilder class.

C#
public AvatarBuilder(Avatar component)
Parameters:componentAvatar

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.

C#
public AvatarBuilder Alt(string value)
Parameters:valuestring

The value for Alt

Returns:

AvatarBuilder

Returns the current AvatarBuilder instance.

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

C#
public AvatarBuilder Border()
Returns:

AvatarBuilder

Returns the current AvatarBuilder instance.

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

C#
public AvatarBuilder Border(bool value)
Parameters:valuebool

The value for Border

Returns:

AvatarBuilder

Returns the current AvatarBuilder instance.

Adds additional custom classes to the Avatar container element.

C#
public AvatarBuilder ClassName(string value)
Parameters:valuestring

The value for ClassName

Returns:

AvatarBuilder

Returns the current AvatarBuilder instance.

Sets a value controlling how the color is applied.

C#
public AvatarBuilder FillMode(AvatarFillMode value)
Parameters:valueAvatarFillMode

The value for FillMode

Returns:

AvatarBuilder

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.

C#
public AvatarBuilder Icon(Action<AvatarIconSettingsBuilder> configurator)
Parameters:configuratorAction<AvatarIconSettingsBuilder>

The AvatarIconSettingsBuilder for the icon setting.

Returns:

AvatarBuilder

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.

C#
public AvatarBuilder Icon(string icon)
Parameters:iconstring

The icon.

Returns:

AvatarBuilder

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.

C#
public AvatarBuilder Image(string value)
Parameters:valuestring

The value for Image

Returns:

AvatarBuilder

Returns the current AvatarBuilder instance.

Sets a value controlling the border radius.

C#
public AvatarBuilder Rounded(Rounded value)
Parameters:valueRounded

The value for Rounded

Returns:

AvatarBuilder

Returns the current AvatarBuilder instance.

C#
public AvatarBuilder Size(ComponentSize value)
Parameters:valueComponentSize

The value for Size

Returns:

AvatarBuilder

Returns the current AvatarBuilder instance.

Sets additional CSS styles to the Avatar container element.

C#
public AvatarBuilder Style(IDictionary<string, object> value)
Parameters:valueIDictionary<string, object>

The value that configures the style.

Returns:

AvatarBuilder

Returns the current AvatarBuilder instance.

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

C#
public AvatarBuilder Text(string value)
Parameters:valuestring

The value for Text

Returns:

AvatarBuilder

Returns the current AvatarBuilder instance.

Sets the theme color

C#
public AvatarBuilder ThemeColor(AvatarThemeColor value)
Parameters:valueAvatarThemeColor

The value for ThemeColor

Returns:

AvatarBuilder

Returns the current AvatarBuilder instance.

Sets the type of the avatar.

C#
public AvatarBuilder Type(AvatarType value)
Parameters:valueAvatarType

The value for Type

Returns:

AvatarBuilder

Returns the current AvatarBuilder instance.