Table of Contents

Class Resource

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

Base for everything a Template can declare - colors, strings, gradients and textures.

[KnownType(typeof(ColorResource))]
[KnownType(typeof(StringResource))]
[KnownType(typeof(GradientResource))]
[KnownType(typeof(StyleResource))]
[KnownType(typeof(Texture))]
public abstract class Resource
Inheritance
Resource
Derived
Inherited Members

Remarks

They share a base so Template can hold them in one polymorphic list. XmlSerializer derives element order from property declaration order, so separate lists would force resources to be grouped by kind in a fixed sequence - authoring a theme file would mean remembering that every gradient has to sit after every string. One list makes it a repeated choice instead, so any order and any interleaving is valid.

Properties

Id

The name the resource is referred to by.

[Required]
public string Id { get; set; }

Property Value

string