Please enable JavaScript to view this site.

Altova MobileTogether Designer

Design Components > Style Sheets

Applying User-Created Style Sheets

Scroll Home Prev Top Next More

A user-created style sheet can be applied to page instances, table instances, and control instances. The style definitions in the user-created style sheet will be immediately applied to the selected design component and will override existing style definitions of a lower priority.

 

You can apply a user-created style sheet to a design component (page, table, or control) as follows:

 

1.In the design, select the design component (page, table, or control) to which you wish to apply a user-created style sheet.

2.In the Styles & Properties Pane, select the Style Sheet property of the page, table, or control to which you wish to apply the style sheet. In the screenshot below, the Style Sheet property of a control has been selected.

MTDStyleSheetsApply

3.In the dropdown list of the Style Sheet property's combo box (see screenshot above), select the user-created style sheet you wish to apply to the design component. (The dropdown list contains the names of all the user-created style sheets of the current project.) Alternatively, click the XPath icon in the pane's toolbar, and enter an XPath expression that will evaluate to the name of the style sheet you wish to apply.

 

Note:If a design component has a style assigned to it via a style sheet, then this is indicated by a green marker at the bottom right of the cell containing the property's name (see the Space Height property in the screenshot above). Placing the mouse cursor over the marker causes the style sheet information to be displayed in a pop up. Clicking the marker, takes you to the corresponding definition in the Style Sheets dialog.

 

Advantages of a style sheet selection via XPath

A big advantage of using an XPath expression to select a user-created style sheet is that the selection can be made conditional upon dynamic environmental criteria. For example, if you wish to specify one style sheet for iOS devices and another for all other devices, you could use the following XPath expression: if ($MT_iOS=true()) then 'iOSStyleSheet' else 'GeneralStyleSheet'.

 

Note:        Switching style sheets often at runtime could cause solution execution to slow down.

 

© 2019 Altova GmbH