Team LiB
Previous Section Next Section

Using Themes for Custom Controls

The support of Themes within custom controls can be implemented extremely easily. First, you must decide whether each property should be available via a Skin or not. If the control derives from a base class like WebControl, then the decision has already been made with regard to a lot of existing properties. You just have to point the new Themeable attribute to all the other properties you want to allow to be assigned through a Skin. That's all you have to do!

[Themeable]
public string MyProperty
{
    get { return this.myProperty; }
    set { this.myProperty = value; }
}

Team LiB
Previous Section Next Section