Resources
Named resource container. A resource can be a string, boolean, number, binary, or a genericResource, accessed through {Resources.Name}.
Signature
Child elements
The
Text attribute is equivalent to the tag body:
Runtime behavior
String→ stringBool→ true whenText/body isTrue/trueNumber→ NumberBinary→ produces a blob URL that can be passed toImage/MediadirectlyResource Type="Json"→ JSON parseResource Type="Page"→ stores a node tree used throughContent="{PageName}"; see Page system- Resource names are unique within a widget; duplicates fail to parse
Example
Gotchas
- Base64 in Binary inflates the XML size; use
Data Type="Binary"for large files instead of resource literals. - Resources are static values and cannot be updated at runtime.
ResourceTypesupportsString/Bool/Number/Binary/Json.