In order to use any font icon, the user must create a theme class that applies the desired font, and then pass the icon's "encoded code" to the UI control where it will be displayed.
To simplify this, SmartDevicesPlus provides classes and procedures that help the developers include Font Icons in their Smart Devices application.
Currently, 2 types of "Font Icons" are supported, "Font Awesome 5 Free" and "Material Icons", but the mechanism can easily be extended with any other type of font icons that the user can find.
Please check the official websites
To use any icon, the user must first create the desired UI element (Textblock, Attribute, Button, etc) and assign one od the theme classes provided by SmartDevicesPlus.
Then, the user must encode the icon "code" using the procedure "SDPlusBaseObjects.SDPGetUnicodeFromHex()", and the result must be assigned to the UI Control's caption property.
Let's select an icon from the "Font Awesome" library.
Then, create a "Textblock" or a "Button", and assign the classes
And finally, in the "start" event, encode the selected icon "f1c5", using SmartDevicesPlus API
// Icon in Label
FontIconLabel.Caption = SDPlusBaseObjects.SDPGetUnicodeFromHex(!"f1c5")
// Icon in button
FontIconButton.Caption = SDPlusBaseObjects.SDPGetUnicodeFromHex(!"f1c5")
You can see the result here:
SmartDevicesPlus provides the following classes that can be used or sub-classed: