Class Avatar
Avatar UI element.
Implements
Inherited Members
VisualElement.ExecuteDefaultAction(EventBase)
VisualElement.Focus()
VisualElement.Overlaps(Rect)
VisualElement.ToString()
VisualElement.GetFirstOfType<T>()
VisualElement.GetFirstAncestorOfType<T>()
VisualElement.canGrabFocus
VisualElement.focusController
VisualElement.cacheAsBitmap
CallbackEventHandler.RegisterCallback<TEventType>(EventCallback<TEventType>, TrickleDown)
CallbackEventHandler.RegisterCallback<TEventType, TUserArgsType>(EventCallback<TEventType, TUserArgsType>, TUserArgsType, TrickleDown)
CallbackEventHandler.UnregisterCallback<TEventType>(EventCallback<TEventType>, TrickleDown)
CallbackEventHandler.UnregisterCallback<TEventType, TUserArgsType>(EventCallback<TEventType, TUserArgsType>, TrickleDown)
Namespace: Unity.AppUI.UI
Assembly: Unity.AppUI.dll
Syntax
public class Avatar : BaseVisualElement, IEventHandler, ITransform, ITransitionAnimations, IExperimentalFeatures, IVisualElementScheduler, IResolvedStyle, IContextOverrideElement, IAdditionalDataHolder, ISizeableElement
Constructors
Avatar()
Default constructor.
Declaration
public Avatar()
Fields
containerUssClassName
The Avatar container styling class.
Declaration
public const string containerUssClassName = "appui-avatar__container"
Field Value
Type | Description |
---|---|
string |
sizeUssClassName
The Avatar size styling class.
Declaration
public const string sizeUssClassName = "appui-avatar--size-"
Field Value
Type | Description |
---|---|
string |
ussClassName
The Avatar main styling class.
Declaration
public const string ussClassName = "appui-avatar"
Field Value
Type | Description |
---|---|
string |
variantUssClassName
The Avatar variant styling class.
Declaration
public const string variantUssClassName = "appui-avatar--"
Field Value
Type | Description |
---|---|
string |
Properties
backgroundColor
The Avatar background color.
Declaration
public Optional<Color> backgroundColor { get; set; }
Property Value
Type | Description |
---|---|
Optional<Color> |
contentContainer
The content container of the Avatar.
Declaration
public override VisualElement contentContainer { get; }
Property Value
Type | Description |
---|---|
VisualElement |
Overrides
outlineColor
The Avatar outline color.
Declaration
public Optional<Color> outlineColor { get; set; }
Property Value
Type | Description |
---|---|
Optional<Color> |
outlineWidth
The Avatar outline width.
Declaration
public Optional<float> outlineWidth { get; set; }
Property Value
Type | Description |
---|---|
Optional<float> |
size
The Avatar size.
Declaration
public Size size { get; set; }
Property Value
Type | Description |
---|---|
Size |
src
The Avatar source image.
Declaration
public Background src { get; set; }
Property Value
Type | Description |
---|---|
Background |
variant
The Avatar variant.
Declaration
public AvatarVariant variant { get; set; }
Property Value
Type | Description |
---|---|
AvatarVariant |
Methods
GetSizeUssClassName(Size)
Declaration
public static string GetSizeUssClassName(Size enumValue)
Parameters
Type | Name | Description |
---|---|---|
Size | enumValue |
Returns
Type | Description |
---|---|
string |
GetVariantUssClassName(AvatarVariant)
Declaration
public static string GetVariantUssClassName(AvatarVariant enumValue)
Parameters
Type | Name | Description |
---|---|---|
AvatarVariant | enumValue |
Returns
Type | Description |
---|---|
string |