Sheet load order
When the workspace attaches to a panel, it adds these sheets. A later sheet wins over an earlier one.
| Order | Sheet (Resources path) | On | Condition |
|---|---|---|---|
| 1 | UIToolbox/Themes/dark |
Panel root | Always. |
| 2 | UIToolbox/WindowStyles |
Panel root | Only if AutoLoadStyles is true. |
| 3 | UIToolbox/Styles/WindowAnimations |
Panel root | Always. |
| 4 | UIToolbox/Themes/{ThemeName} |
Workspace | Only if AutoLoadStyles is true and ThemeName is not empty, default or dark. |
| 5 | User sheets | Workspace | Sheets added with AddUserStyleSheet, in the order you added them. |
A toolbox control (UIToolbox) adds sheet 1 and UIToolbox/Styles/Controls to the panel root when it attaches. In an editor panel, the root of the editor window holds the editor sheets, which win over the panel root. So the control also adds the two sheets to the window root, where its popups open, and to the outermost template above it, such as the Inspector or the UI Builder document. The UI Builder document also gets the theme sheet of the canvas theme menu, such as UIToolbox/Themes/light for UI Toolbox Light, after UIToolbox/Styles/Controls, as a Workspace holds its theme. It changes when the menu changes.
The shared sheets (1–3) are on the panel root, once for all workspaces. The theme and user sheets are on the workspace element. They affect only that workspace and its descendants, so two workspaces on one panel can use different themes. The workspace also hosts its context menus and its error dialog, so these get its theme.