Appearances
The appearances section in the theme file is where all the styles and properties that apply to the widgets are defined. Each widget has an appearance name (corresponds to the AppearanceKey property exposed by the server-side control) that selects which section of the theme applies to the widget.
The appearances are organizes in a hierarchical structure:
[appearance key]
Top level appearance key. Widgets that want to use the styles and properties defined under this key must match the key. i.e., wisej.web.Button uses the "button" appearance, but it could use "button-ok" or "button-cancel" to retrieve different styles and properties.
"inherit"
Inherits all the states, styles and properties from another key. i.e., "button-ok" inherits from "button" and overrides the face color.
"text"
The text property is used only by the Theme Builder. It simply changes the text of the appearance in the tree view. i.e. "listview" can be displayed as "ListView". The Theme Builder already converts all appearance keys from first lower to first upper, and converts dashed to spaces. Use the "text" property only when you want to change the text displayed by the Theme Builder.
"states"
The first state must be default. The theme engine in Wisej applies the styles and properties of all the states that match the widget states in the order they are declared in the theme.
[state name]
The state name depends on the widget using the appearance. Some state are used by most widgets and are suggested by the Theme Builder. However, many widgets use states that depend on the implementation of the widget itself, and can add new states in later releases.
For example, the disabled state is available for most widgets, while the checked, or pressed state is not.
"styles"
"properties"
"components"
[child key]
Child keys are appearance keys inside another appearance key. They apply their styles and properties to inner widgets. i.e. the icon widget inside a wisej.web.Button uses the styles and properties defined in button/icon.
Components
Components refer to child widgets that compose a larger widget. The name of the component is the name used by the parent widget to refer to the child.
The component entry in the Theme is identical to the Appearance entry. A component can include other components in a recursive structure.
In the image above, you can see that the Button appearance contains a component named Icon. Each component has a set of states and for each state it has styles and properties.
Last updated
Was this helpful?