Table of Contents

Class Template

Namespace
BSGameLib.UI.Builder.Models
Assembly
BSGameLib.UI.dll

The resources a view or template file declares: colors, strings, gradients, styles and textures.

public class Template
Inheritance
Template
Inherited Members

Properties

Colors

The color resources.

public IEnumerable<ColorResource> Colors { get; }

Property Value

IEnumerable<ColorResource>

Gradients

The gradient resources.

public IEnumerable<GradientResource> Gradients { get; }

Property Value

IEnumerable<GradientResource>

Resources

Everything this resource set declares, in one list so the kinds can appear in any order and interleave freely.

[Required]
public List<Resource> Resources { get; set; }

Property Value

List<Resource>

Remarks

One list rather than one per kind because XmlSerializer takes element order from property declaration order: separate lists would mean every gradient had to sit after every string, and a theme file that grouped its colors and gradients together would fail schema validation for no reason a reader could see. A single list with several element mappings is a repeated choice, which imposes no order at all.

This is also why it isn't split into "textures" and "the rest": a theme with no art at all is perfectly valid, and so is one with nothing but art.

Strings

The string resources.

public IEnumerable<StringResource> Strings { get; }

Property Value

IEnumerable<StringResource>

Styles

The style resources.

public IEnumerable<StyleResource> Styles { get; }

Property Value

IEnumerable<StyleResource>

Textures

The texture resources.

public IEnumerable<Texture> Textures { get; }

Property Value

IEnumerable<Texture>