Class KnownIconInfo
- Namespace
- Dynamicweb.Core.UI.Icons
- Assembly
- Dynamicweb.Core.dll
Maps a Known Icon to it css class
- Inheritance
-
Known
Icon Info
- Inherited Members
Properties
ClassName
The css class name
Property Value
Color
The known color for the icon
Property Value
FrameworkPrefix
The css prifix required for the related framework (Ex. FontAwesome = fa)
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
KnownIcon The icon to get the css class name for.
includePrefix
boolSet to false to not include prefix.
color
KnownColor Define color to override the default icon color.
Returns
- string
System.String.
GetCountryFlagKnownIcon(string)
Return the country flag Known
Parameters
countryCode
stringTwo digit country code(ISO 3166-2)
Returns
- Known
Icon Dynamicweb.Core.UI.KnownIcon.
Exceptions
- Argument
Exception 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
KnownIcon The icon to render.
includePrefix
boolSet to false to not include prefix.
color
KnownColor Define 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
KnownIcon The icon to render.
title
stringDefine icon title.
includePrefix
boolSet to false to not include prefix.
color
KnownColor Define color to override the default icon color.
Returns
- string
Html string (System.String).
GetKnownIcon(string, KnownIcon?)
Return the Known
Parameters
iconName
stringName of the icon from the Known
Icon enumeration.defaultIcon
KnownIcon ?Returns this value if
iconName
is not a KnownIcon
Returns
- Known
Icon ? Dynamicweb.Core.UI.KnownIcon.