The Styles operator is an OCL/EAL command used to access styles defined in StylesInModel.It allows you to reference a specific style by name and apply it in UI elements such as containers, rows, and columns.
Syntax
selfVM.Styles.StyleName
Example
In a ViewModel property (for example: Style Expression of a Row or Column or a Placing Container), the operator is used as follows:
selfVM.Styles.Search
selfVM: Refers to the current ViewModel instance.
Styles: Provides access to the collection of styles defined in the model (StylesInModel).
Search: The name of the specific style defined in the Style Editor.
Result
The expression returns the Style object named Search from StylesInModel.That style is then applied to the UI element where the Style Expression is set.
Usage Scenario
If you have created a style called Search in the model:
- Open the ViewModel Editor
- Select a Row, Column, or Control or placing container
- Set the Style Expression to: selfVM.Styles.Search
The UI element will render using the properties defined in the Search style.
