In this section, we are going to focus on aspects related to style definition while the application is running (at runtime).
We have seen in this chapter that an FMX component is visually rendered through its style definition. This style definition is matched by name following a naming convention (for example, TButton has buttonstyle, TEdit has editstyle, and more) and an override mechanism (the StyleLookup property). The lookup of the definition is done against the (optional) TStyleBook instance referenced by the StyleBook property of the component's parent form and against the application style set for the application.
There is a dedicated class in FMX to deal with the application-wide style TStyleManager declared and implemented in the FMX.Styles.pas unit. This class provides some functionalities you may find handy when dealing with styles:
- It can enumerate style resources embedded within the application, through the EnumStyleResources...