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

Defines the fluent API for configuring the Kendo Avatar for ASP.NET MVC.

Definition

Constructors

Initializes a new instance of the Avatar class.

C#
public AvatarBuilder(Avatar component)
Parameters:componentAvatar

The component.

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 that configures the alt.

Returns:

AvatarBuilder

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

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

The value that configures the border.

Returns:

AvatarBuilder

Adds additional custom classes to the Avatar container element.

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

The value that configures the classname.

Returns:

AvatarBuilder

Specifies the appearance fill style of the Avatar. The available values are "outline", "solid" (default), and null.

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

The value that configures the fillmode.

Returns:

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.

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

The value that configures the icon.

Returns:

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 that configures the image.

Returns:

AvatarBuilder

Could be one of the predefined shapes available for the widget container: "circle" (default), "small", "medium", "large", or null.

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

The value that configures the rounded.

Returns:

AvatarBuilder

The Avatar allows you to set predefined sizes. The available size values are "small", "medium" (default), "large", or null.

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

The value that configures the size.

Returns:

AvatarBuilder

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

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

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

The value that configures the text.

Returns:

AvatarBuilder

The Avatar allows you to specify predefined theme colors for background of its container. The available themeColor values are: - base - Applies base theme color. - primary (Default) - Applies coloring based on primary theme color. - secondary - Applies coloring based on secondary theme color. - tertiary - Applies coloring based on tertiary theme color. - null - Does not apply theme color class.

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

The value that configures the themecolor.

Returns:

AvatarBuilder

Could be one of the three predefined types for the widget: icon, image, or text (default).

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

The value that configures the type.

Returns:

AvatarBuilder