IconifyIcon Class

Represents an Iconify icon: the content of an SVG image and its view box.

public sealed class IconifyIcon

Remarks

The rotation and the flips of the icon, and of its aliases, are already applied to IconifyIcon.Body and to the view box.

Constructors

NameDescription
IconifyIcon(string, string, string, double, double, double, double, bool)Initializes a new instance of the IconifyIcon class.

IconifyIcon(string, string, string, double, double, double, double, bool)

IconifyIcon.cs

Initializes a new instance of the IconifyIcon class.

public IconifyIcon(string prefix, string name, string body, double left, double top, double width, double height, bool isHidden = false)

Parameters

prefix string
The prefix of the icon set, such as mdi.
name string
The name of the icon in the icon set, such as account-circle.
body string
The content of the svg element.
left double
The left coordinate of the view box.
top double
The top coordinate of the view box.
width double
The width of the view box.
height double
The height of the view box.
isHidden bool
true when the icon set keeps the icon for backward compatibility only.

Properties

NameDescription
BodyGets the content of the svg element (paths, shapes, groups), without the svg element itself.
HeightGets the height of the view box.
IsHiddenGets a value indicating whether the icon set keeps the icon for backward compatibility only.
LeftGets the left coordinate of the view box.
NameGets the name of the icon in the icon set, such as account-circle.
PrefixGets the prefix of the icon set, such as mdi.
SvgGets the SVG image of the icon. Its width and height attributes are the size of the view box.
TopGets the top coordinate of the view box.
WidthGets the width of the view box.

Gets the content of the svg element (paths, shapes, groups), without the svg element itself.

public string Body { get; }

Property value

string

Gets the height of the view box.

public double Height { get; }

Property value

double

Gets a value indicating whether the icon set keeps the icon for backward compatibility only.

public bool IsHidden { get; }

Property value

bool

Gets the left coordinate of the view box.

public double Left { get; }

Property value

double

Gets the name of the icon in the icon set, such as account-circle.

public string Name { get; }

Property value

string

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

public string Prefix { get; }

Property value

string

Gets the SVG image of the icon. Its width and height attributes are the size of the view box.

public string Svg { get; }

Property value

string

Gets the top coordinate of the view box.

public double Top { get; }

Property value

double

Gets the width of the view box.

public double Width { get; }

Property value

double

Methods

NameDescription
ToString()Returns the SVG image of the icon.

ToString()

IconifyIcon.cs

Returns the SVG image of the icon.

public override string ToString()

Returns

string The value of IconifyIcon.Svg.