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; } } 




ASP. NET 2.0 Revealed
ASP.NET 2.0 Revealed
ISBN: 1590593375
EAN: 2147483647
Year: 2005
Pages: 133

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net