FMX.Controls.TStyleBook.LoadFromFile
Delphi
procedure LoadFromFile(const AFileName: string);
C++
void __fastcall LoadFromFile(const System::UnicodeString AFileName);
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
procedure function |
public | FMX.Controls.pas FMX.Controls.hpp |
FMX.Controls | TStyleBook |
Description
Method to load a style to a TStyleBook, from a file.
Select the full path to the file or the file name when located in the project folder.
FireMonkey styles are delivered in the RAD Studio product installation, at the following paths:
- C:\Program Files (x86)\Embarcadero\Studio\\Redist\styles\Fmx
- C:\Users\Public\Documents\Embarcadero\Studio\\Styles
Apply the style to the form using the StyleBook property of the form, for example:
procedure TForm1.FormCreate(Sender: TObject);
begin
StyleBook1.LoadFromFile('Air.Style');
Form1.StyleBook := StyleBook1;
end;
To load a style to an item of the TStyleCollection, that is a style for each platform added to the TStyleBook, then use FMX.Controls.TStyleCollectionItem.LoadFromFile.