New to Telerik UI for BlazorStart a free 30-day trial

A component that lets you display a user representation as an image, icon, or text. Supports sizes, roundness, fill modes, theme colors, optional border, and usage inside other components (e.g., TelerikChip).

Definition

Namespace:Telerik.Blazor.Components

Assembly:Telerik.Blazor.dll

Syntax:

C#
public class TelerikAvatar : BaseComponent, IComponent, IHandleEvent, IHandleAfterRender, IDisposable

Inheritance: objectComponentBaseBaseComponentTelerikAvatar

Implements: IComponentIDisposableIHandleAfterRenderIHandleEvent

Inherited Members BaseComponent.ShouldRender()BaseComponent.OnInitializedAsync()BaseComponent.OnAfterRenderAsync(bool)BaseComponent.Dispose()BaseComponent.InitLocalizer()BaseComponent.ThrowIfParameterIsNull(object, string)BaseComponent.HaveOptionsChanged(IDictionary<string, object>, IDictionary<string, object>)BaseComponent.GetClassString(params string[])BaseComponent.InvokeAsync<T>(string, params object[])BaseComponent.InvokeAsync<T>(string, CancellationToken, params object[])BaseComponent.InvokeVoidAsync(string, params object[])BaseComponent.InvokeVoidAsyncWithoutAwait(string, params object[])BaseComponent.InvokeComponentMethodAsync<T>(string, params object[])BaseComponent.InvokeComponentMethodAsync<T>(string, CancellationToken, params object[])BaseComponent.InvokeVoidComponentMethodAsync(string, params object[])BaseComponent.InvokeComponentVoidMethodAsync(string, object)BaseComponent.InvokeDisposeAsync()BaseComponent.StateHasChanged()BaseComponent.RootComponentBaseComponent.ClassComponentBase.OnInitialized()ComponentBase.OnParametersSet()ComponentBase.OnParametersSetAsync()ComponentBase.OnAfterRender(bool)ComponentBase.InvokeAsync(Action)ComponentBase.InvokeAsync(Func<Task>)ComponentBase.DispatchExceptionAsync(Exception)ComponentBase.SetParametersAsync(ParameterView)...

Constructors

C#
public TelerikAvatar()

Methods

C#
protected override void BuildRenderTree(RenderTreeBuilder __builder)
Parameters:__builderRenderTreeBuilder

Overrides: ComponentBase.BuildRenderTree(RenderTreeBuilder)

Properties

Specifies whether the avatar is wrapped with a border.

C#
[Parameter]
public bool Bordered { get; set; }

Defines arbitrary HTML (most commonly img), icon or text. To be used in conjunction with the Type parameter. Children: allows arbitrary content based on the Type parameter.

C#
[Parameter]
public RenderFragment? ChildContent { get; set; }

Specifies the fill mode of the avatar.

C#
[Parameter]
public string? FillMode { get; set; }

Defines the height of the avatar.

C#
[Parameter]
public string? Height { get; set; }

Specifies the roundness of the avatar.

C#
[Parameter]
public string? Rounded { get; set; }

Specifies the size of the avatar.

C#
[Parameter]
public string? Size { get; set; }

Specifies the theme color of the avatar.

C#
[Parameter]
public string? ThemeColor { get; set; }

Defines the type of the content the avatar will be showing. Default value is Image, also available Icon and Text.

C#
[Parameter]
public AvatarType Type { get; set; }

Defines the width of the avatar.

C#
[Parameter]
public string? Width { get; set; }