FMX.Styles.TStyleManager.SetStyleFromFile
Delphi
class function SetStyleFromFile(const FileName: string): Boolean; overload;
class function SetStyleFromFile(const Context: TFmxObject; const FileName: string): Boolean; overload;
C++
__classmethod bool __fastcall SetStyleFromFile(const System::UnicodeString FileName)/* overload */;
__classmethod bool __fastcall SetStyleFromFile(Fmx::Types::TFmxObject* const Context, const System::UnicodeString FileName)/* overload */;
Properties
| Type | Visibility | Source | Unit | Parent |
|---|---|---|---|---|
| function | public | FMX.Styles.pas FMX.Styles.hpp |
FMX.Styles | TStyleManager |
Description
Sets the style specified by FileName as the active style.
Do not place multiple lines calling SetStyleFromFile in a project, because you can have only one active style in the style manager.
You can call SetStyleFromFile either in the project source code (before calling Application.Initialize) or in the initialization section of one of the form units:
- If you call SetStyleFromFile in a form, the style is reapplied.
- If you call SetStyleFromFile before the form is created, the custom style fully replaces the platform style.