IconifyIconSet Class

Represents an icon set loaded from a file in the IconifyJSON format, using Iconify.Load.

public sealed class IconifyIconSet

Properties

NameDescription
CountGets the number of icons and aliases in the icon set.
IconsGets the icons and the aliases of the icon set, including the hidden icons.
InfoGets the description of the icon set, or null when the file has no info property.
PrefixGets the prefix of the icon set, such as mdi.

Gets the number of icons and aliases in the icon set.

public int Count { get; }

Property value

int

Gets the icons and the aliases of the icon set, including the hidden icons.

public IReadOnlyList<IconifyIcon> Icons { get; }

Gets the description of the icon set, or null when the file has no info property.

public IconifyIconSetInfo? Info { get; }

Property value

IconifyIconSetInfo?

Gets the prefix of the icon set, such as mdi.

public string Prefix { get; }

Property value

string

Indexers

NameDescription
this[string]Gets the icon or the alias with the specified name. The comparison is case-sensitive.

this[string]

IconifyIconSet.cs

Gets the icon or the alias with the specified name. The comparison is case-sensitive.

public IconifyIcon this[string name] { get; }

Parameters

name string
The name of the icon, such as account-circle.

Property value

IconifyIcon

Exceptions

KeyNotFoundException
The icon set has no icon with this name.

Methods

NameDescription
ContainsIcon(string)Determines whether the icon set has an icon or an alias with the specified name. The comparison is case-sensitive.
TryGetIcon(string, IconifyIcon?)Gets the icon or the alias with the specified name. The comparison is case-sensitive.

ContainsIcon(string)

IconifyIconSet.cs

Determines whether the icon set has an icon or an alias with the specified name. The comparison is case-sensitive.

public bool ContainsIcon(string name)

Parameters

name string
The name of the icon, such as account-circle.

Returns

bool true when the icon set has an icon with this name; otherwise, false.

TryGetIcon(string, IconifyIcon?)

IconifyIconSet.cs

Gets the icon or the alias with the specified name. The comparison is case-sensitive.

public bool TryGetIcon(string name, out IconifyIcon? icon)

Parameters

name string
The name of the icon, such as account-circle.
icon IconifyIcon?
The icon, when it exists.

Returns

bool true when the icon set has an icon with this name; otherwise, false.