Type | Description | |||
String | A string expression that indicates the list of x-script instructions. |
For instance, the following Template adds some items to the control:
Items { Add("Item 1",2).SubMenu { Add("SubItem 1",2).SubMenu { Add("SubItem 1.1") Add("SubItem 1.2") } Add("SubItem 2") } Add("Item 2",2).SubMenu { Add("SubItem 1") Add("SubItem 2") } } Refresh
At runtime, you can build this string, including CRLF sequences, and you can pass it to the Template property.
The control's template uses the X-Script language to initialize the control's content. Use the Template property page of the control to update the control's Template property. Use the Template property to execute code by passing instructions as a string ( template string ).
Most of our UI components provide a Template page that's accessible in design mode. No matter what programming language you are using, you can have a quick view of the component's features using the WYSWYG Template editor.
The control's Template page helps user to initialize the control's look and feel in design mode, using the x-script language that's easy and powerful. The Template page displays the control on the left side of the page. On the right side of the Template page, a simple editor is displayed where user writes the initialization code. The control's look and feel is automatically updated as soon as the user types new instructions. The Template script is saved to the container persistence ( when Apply button is pressed ), and it is executed when the control is initialized at runtime. Any component that provides a WYSWYG Template page, provides a Template property. The Template property executes code from a string ( template string ).
The Template script is composed by lines of instructions. Instructions are separated by "\n\r" ( newline ) characters.
An instruction can be one of the following:
The Template supports the following general functions: