① 就用那个bitmap设计工具,先打开vcl里的皮肤(..... \Embarcadero\RAD Studio\12.0\Redist\styles\vcl里)
② save as 转换成fmx里的.style文件
③ 用 stylebook控件里load这个转过来的皮肤
④ 收工……
在FireMonkey移动窗体设计器 双击stylebook1
选择stylebook1在下拉菜单
-
Using the preceding procedure as a guide:
- Drop four stylebooks on the form, one each for Windows, Mac OS X, Android, and iOS.
- You need to add a style book for each platform that you want to support.
- Load the custom Windows style in one Stylebook. Name it StyleBookWin.
- Load your custom Mac styles in the second StyleBook. Name it StyleBookMac.
- Load your custom Android styles in the third StyleBook. Name it StyleBookAndroid.
- Load your custom iOS styles in the fourth StyleBook. Name it StyleBookiOS.
- At run time, execute the following code (in Form.OnCreate for instance):
{$IFDEF MSWINDOWS} StyleBook := StyleBookWin; {$ENDIF} {$IFDEF MACOS} StyleBook := StyleBookMac; {$ENDIF} {$IFDEF Android} StyleBook := StyleBookAndroid; {$ENDIF} {$IFDEF iOS} StyleBook := StyleBookiOS; {$ENDIF}
To set a style globally for all forms in the application, you can use the new TStyleBook.UseStyleManager property. Just set the following values:
StyleBookWin.UseStyleManager = True
StyleBookMac.UseStyleManager = True
StyleBookAndroid.UseStyleManager = True
StyleBookiOS.UseStyleManager = True
Use the $IFDEF code shown above.
- Drop four stylebooks on the form, one each for Windows, Mac OS X, Android, and iOS.