Class KnownIconInfo
- Namespace
- Dynamicweb.Core.UI.Icons
- Assembly
- Dynamicweb.Core.dll
Maps a Known Icon to it css class
public class KnownIconInfo
- Inheritance
-
KnownIconInfo
- Inherited Members
Properties
ClassName
The css class name
public string ClassName { get; set; }
Property Value
Color
The known color for the icon
public KnownColor Color { get; set; }
Property Value
FrameworkPrefix
The css prifix required for the related framework (Ex. FontAwesome = fa)
public string FrameworkPrefix { get; set; }
Property Value
Methods
ClassNameFor(KnownIcon, bool, KnownColor)
Return the related css class name for the Enum
public static string ClassNameFor(KnownIcon icon, bool includePrefix = true, KnownColor color = KnownColor.None)
Parameters
icon
KnownIconThe icon to get the css class name for.
includePrefix
boolSet to false to not include prefix.
color
KnownColorDefine color to override the default icon color.
Returns
- string
System.String.
GetCountryFlagKnownIcon(string)
Return the country flag KnownIcon for the specified two digit country code
public static KnownIcon GetCountryFlagKnownIcon(string countryCode)
Parameters
countryCode
stringTwo digit country code(ISO 3166-2)
Returns
- KnownIcon
Dynamicweb.Core.UI.KnownIcon.
Exceptions
- ArgumentException
Thrown if imposible parse known icon from
countryCode
GetIconHtml(KnownIcon, bool, KnownColor)
Return the related html for rendering the icon.
public static string GetIconHtml(KnownIcon icon, bool includePrefix = true, KnownColor color = KnownColor.None)
Parameters
icon
KnownIconThe icon to render.
includePrefix
boolSet to false to not include prefix.
color
KnownColorDefine color to override the default icon color.
Returns
- string
Html string (System.String).
GetIconHtml(KnownIcon, string, bool, KnownColor)
Return the related html for rendering the icon.
public static string GetIconHtml(KnownIcon icon, string title, bool includePrefix = true, KnownColor color = KnownColor.None)
Parameters
icon
KnownIconThe icon to render.
title
stringDefine icon title.
includePrefix
boolSet to false to not include prefix.
color
KnownColorDefine color to override the default icon color.
Returns
- string
Html string (System.String).
GetKnownIcon(string, KnownIcon?)
Return the KnownIcon for the specified classname
public static KnownIcon? GetKnownIcon(string iconName, KnownIcon? defaultIcon = KnownIcon.None)
Parameters
iconName
stringName of the icon from the KnownIcon enumeration.
defaultIcon
KnownIcon?Returns this value if
iconName
is not a KnownIcon
Returns
- KnownIcon?
Dynamicweb.Core.UI.KnownIcon.