Class Icon
Defines an icon to be rendered, including its definition, size, color, and accessible name.
public sealed class Icon
- Inheritance
-
Icon
- Inherited Members
Constructors
Icon(IconDefinition, Size, Color?, string?)
Defines an icon to be rendered, including its definition, size, color, and accessible name.
public Icon(IconDefinition definition, Size size, Color? color = null, string? accessibleName = null)
Parameters
definitionIconDefinitionsizeSizecolorColor?accessibleNamestring
Properties
AccessibleName
The accessible name of the icon, used for screen readers and other assistive technologies. If null, the technical name of the icon will be used as a fallback.
public string? AccessibleName { get; }
Property Value
Color
The color of the icon. If null, the default color of the icon will be used. This will of course also only work for some icons, e.g. svg icons that define a single path.
public Color? Color { get; }
Property Value
Definition
See IconDefinition
public IconDefinition Definition { get; }
Property Value
Size
The size of the icon in px. User level zoom is obviously not considered.
public Size Size { get; }
Property Value
Methods
WithAccessibleName(string)
Creates a new icon with the same everything, but a different accessible name.
public Icon WithAccessibleName(string accessibleName)
Parameters
accessibleNamestring
Returns
WithColor(Color)
Creates a new icon with the same everything, but a different color.
public Icon WithColor(Color color)
Parameters
colorColor