Class “ResourceBuilder”

Object > ResourceBuilder

A factory for generic resource dictionaries. Instances can be obtained from or by invoking the constructor.

Do not use for resource dictionaries of the types Color, Font and string. Instead use the respective factories ColorResources.from(), FontResources.from() and TextResources.from().

Type: ResourceBuilder<ResourceType, RawType>
extends Object
Generics: ResourceType: undefined
RawType: ResourceType
Constructor: public
Singleton: No
Namespace: tabris
Direct subclasses: None
JSX Support: No


new ResourceBuilder(options)

Parameter Type Description
options ResourceBuilderConstructorOptions<ResourceType, RawType>  


from(base, data)

Creates a resource dictionary from the given raw “data” object. All values from the given “base” dictionary are inherited unless overwritten.

Entries in the “data” object starting with “$” are considered configuration options and will not become part of the final resource dictionary.

Parameter Type Description
base Base  
data Data  

Returns: NamedResources<ResourceType, keyof (Base & Data)>


Parameter Type Description
data Data  

Returns: Resources<ResourceType>