Contents

rules

Contains the elements used in data binding and media queries.

Overview

The rules element contains a set of specialize elements that are used to modify existing elements. The specialize elements use data queries to determine how the existing element is modified. Here’s an example that sets the rules for a button element.

<rules>
    <specialize state="({progress}-greater-than:0) and ({progress}-less-than:1)">
        <button tag="button">
            <text>Resume</text>
        </button>
    </specialize>
    <specialize state="({progress}:0), ({progress}:1)">
        <button tag="button">
            <text>Play</text>
        </button>
    </specialize>
</rules>

Subelements of rules

Elements that Use rules

The rules element can used by any other element.

Topics

Valid TVML Attributes

See Also

Binding Elements