Presentation styles / Using presentation styles |
A style attribute may be inherited by the descendants of a given node in the abstract user interface tree.
The style inheritance is implicitly defined by the attribute. Common font and color related style attributes are typically inherited.
For example, when defining a style using the fontFamily in a window or group container, all the children of this container will get the same font family. However, most style attributes (such as "border" for the Window element type) are specific to a type of element, and are not inherited.
<StyleList> <Style name="Group"> <StyleAttribute name="textColor" value="red" /> </Style> <Style name="Label"> <StyleAttribute name="textColor" value="windowText" /> </Style> <Style name="Edit"> <StyleAttribute name="textColor" value="windowText" /> </Style> </StyleList>
For more details, see Style attributes reference.