Chapter 11. Styles in Controls


The WebControl class exposes style properties such as ForeColor , BackColor , and Font that govern the visual appearance of the HTML element rendered by a Web control. These properties provide an object-oriented abstraction of appearance- related HTML and cascading style sheet (CSS) attributes. As we described in Chapter 8, "Rendering," if your control renders visual HTML elements, you should derive from the WebControl class so that your control inherits basic style properties and the style architecture that enables you to modify or add style properties.

In this chapter, we'll examine the style properties of the WebControl class and the methods that WebControl provides for working with styles. We'll look at the Style class that is responsible for providing style functionality to WebControl . And we'll show how you can override or add to the style properties of WebControl .



Developing Microsoft ASP. NET Server Controls and Components
Developing Microsoft ASP.NET Server Controls and Components (Pro-Developer)
ISBN: 0735615829
EAN: 2147483647
Year: 2005
Pages: 183

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