Vixen
02b45cc4
csharp
public sealed class Avatar

A person or an entity, as a circle with their initials in it.

No guide page documents this yet — the page shows what the code says about itself.

Remarks

⚠ Initials only, for now, and it is the draw list rather than this control that says so. There is no texture command — DrawCommandKind has rectangles, borders, text, paths and clips — so an avatar cannot show a picture until one exists. Initials derives from a name so that the fallback every avatar needs anyway is the thing that works today, and the picture is owed.

Fields and properties (5)

  • protected override string TagName

    The element name this type answers to when a caller does not choose one.

  • protected override bool AcceptsFocus

    Whether the focus can rest on this kind of control at all.

  • public string? Name
  • public string? Initials

    The letters shown, derived from Name unless set directly.

  • public static readonly UiPropertyKey NameProperty

    Identity for Name.

Methods (2)

  • public static string Of(string? name)

    The first letter of each of the first two words.

  • public void ClearName()

    Unsets Name, so it takes its default or its ancestor's value again.