Interface ITemplateBuilder
Builds the resources a view or template declares: colors, strings, gradients, styles and textures.
public interface ITemplateBuilder : ITextureBuilder<ITemplateBuilder>, ITextureFileBuilder<ITemplateBuilder>, IIndexedTextureAtlasBuilder<ITemplateBuilder>
- Inherited Members
Methods
PopulateFromFile(string)
Reads the resources from the template file fileName. Any errors are
reported when the view is built.
void PopulateFromFile(string fileName)
Parameters
fileNamestring
WithColor(string, string)
A Color resource, read as "{Resource id}" wherever a color is.
ITemplateBuilder WithColor(string id, string colorHex)
Parameters
Returns
WithGradient(string, Action<IGradientBuilder>)
A Gradient resource, named by "{Resource id}" in a FillGradient attribute.
ITemplateBuilder WithGradient(string id, Action<IGradientBuilder> configure)
Parameters
idstringconfigureAction<IGradientBuilder>
Returns
WithString(string, string)
A String resource, read as "{Resource id}" wherever a text attribute takes one.
ITemplateBuilder WithString(string id, string value)
Parameters
Returns
WithStyle(string, Action<IStyleBuilder>)
A Style resource, named by Style="id" on a control.
ITemplateBuilder WithStyle(string id, Action<IStyleBuilder> configure)
Parameters
idstringconfigureAction<IStyleBuilder>