NOTE:
As of Version 1.3.0+, you may compress skin assets into a single binary file. By using the packing tool, “Amber”, provided in the Aspire UI distribution, you can easily exclude skin assets when packing the theme.
It is important to note that all the skin assets defined in the “rules.xml” file will be (pre)loaded, regardless of whether they will be used or not in your application. If your application does not use all the skin assets in the theme, you may want to exclude the unused assets from the “rules.xml” file when the application is ready for deployment, especially if you are deploying online.
To prevent a skin asset from being loaded into your application (even if it exists in the theme folder), simply remove its entry in the “rules.xml” file.
For example, a simple application that uses only uiLabelButton and uiRadioButton instances may use a stripped down “rules.xml” file:
1: <rules theme="xp" css="text.css"> 2: <Button slices="up,over,emphasized_over,down,emphasized_down,selected_up,selected_over,selected_down,disabled,selected_disabled,emphasized" prefs="padding|3,6|focusPadding|3|displaceX|1|displaceY|1" /> 3: <CheckBox slices="up,over,down,selected_up,selected_over,selected_down,disabled,selected_disabled" /> 4: <FocusRect edge="1" repeat="xy" /> 5: <LabelButton clone="Button" /> 6: <RadioButton copy="CheckBox" /> 7: </rules>
Be careful of “clone” and “copy” attributes when stripping the XML file. For example, in the above XML:
Since we don't want to load the “CheckBox” skin, we will strip it off as well after copying its attributes over to “RadioButton”:
1: <rules theme="xp" css="text.css"> 2: <Button slices="up,over,emphasized_over,down,emphasized_down,selected_up,selected_over,selected_down,disabled,selected_disabled,emphasized" prefs="padding|3,6|focusPadding|3|displaceX|1|displaceY|1" /> 3: <FocusRect edge="1" repeat="xy" /> 4: <LabelButton clone="Button" /> 5: <RadioButton slices="up,over,down,selected_up,selected_over,selected_down,disabled,selected_disabled" /> 6: </rules>
NOTE: You would also want to retain the “FocusRect” asset as well - if you remove it, no focus rectangle will be drawn.