System.Web.UI (system.web.dll) | sealed class |
This class contains a name-value collection of cascading style sheet
(CSS) attributes for a specific control. CSS styles are used to
configure many aspects of a control's appearance
(such as font and color) and are supported for both web controls and
HTML controls. A CssStyleCollection is provided
through the
System.Web.UI.HtmlControls.HtmlControl.Style and
System.Web.UI.WebControls.WebControl.Style
properties. This collection is similar to the
AttributeCollection class, and you can retrieve
values by using the specific attribute name or enumerating through
the read-only Keys collection.
public sealed class CssStyleCollection {
// Public Instance Properties
public int Count{get; }
public ICollection Keys{get; }
public string this[string key]{set; get; }
// Public Instance Methods
public void Add(string key, string value);
public void Clear( );
public void Remove(string key);
}
Returned By
AttributeCollection.CssStyle,
System.Web.UI.HtmlControls.HtmlControl.Style,
System.Web.UI.WebControls.WebControl.Style
|