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:

"apparances": {

    [appearance key]: {
      "inherit": "",
      "text": "",
      "states": {
        [state name]: {
          "styles": {
            ...
          },
          "properties": {
            ...
          }
        },
        "components": {
          [child key]: {
            "inherit": "",
            "text": "",
            "states": {
              [state name]: {
                "styles": {
                  ...
                },
                "properties": {
                  ...
                }
              },
              "components": {
                ...
              }
            }
          }
        }
      }
    }

See Elements section for a detailed explanation of the theme structure.

  • Child appearances are reachable using the forward slash. To inherit from the "title" child appearance defined inside "window", use "window/title".

  • Appearance keys are case sensitive.

  • Child widgets are not child controls. You cannot refer to child widgets from the server: the Wisej.Web.Button control can only refer to the wisej.web.Button JavaScript widget but cannot reference the internal composition of the widget.

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.

Some states are inherited: when the widget adds or removes a state to a widget it will also add it and remove it to child widgets.

Last updated