Table of Contents

Class GravatarStyles

Namespace
Tharga.Team
Assembly
Tharga.Team.dll

The Gravatar default-image styles, which is what GravatarStyle holds.

public static class GravatarStyles
Inheritance
GravatarStyles
Inherited Members

Remarks

The set is here rather than in prose so a consumer can bind to it. It used to be written out in the XML docs, in the icons article and in a hardcoded array in the sample's settings page — three copies, none of them reachable from code, so anyone building their own settings UI retyped it from documentation and found out about a typo when an avatar rendered wrong.

These are Gravatar's own d parameter values, so the strings are fixed by an external service rather than chosen here. Blank renders nothing at all, deliberately.

Fields

Blank

A transparent image: no avatar at all.

public const string Blank = "blank"

Field Value

string

Default

What GravatarStyle falls back to when it is null or blank.

public const string Default = "identicon"

Field Value

string

Identicon

A geometric pattern derived from the email. The default.

public const string Identicon = "identicon"

Field Value

string

MonsterId

A generated monster.

public const string MonsterId = "monsterid"

Field Value

string

MysteryPerson

The "mystery person" silhouette — the same image for everyone.

public const string MysteryPerson = "mp"

Field Value

string

Retro

A generated 8-bit character.

public const string Retro = "retro"

Field Value

string

RoboHash

A generated robot.

public const string RoboHash = "robohash"

Field Value

string

Wavatar

A generated face.

public const string Wavatar = "wavatar"

Field Value

string

Properties

All

Every style, in the order a picker should offer them.

public static IReadOnlyList<string> All { get; }

Property Value

IReadOnlyList<string>

Methods

IsKnown(string)

Whether style is one Gravatar understands.

public static bool IsKnown(string style)

Parameters

style string

Returns

bool