CssCollection Class

This class represents a collection of Cascading Style Sheets (CSS) attributes and their values.

Syntax

Visual Basic  Public  Class CssCollection Inherits NameObjectCollectionBase Implements ICloneable, IStateManager
C# public   class CssCollection : NameObjectCollectionBase, ICloneable, IStateManager
Managed C++ public:  __gc class CssCollection :  public NameObjectCollectionBase, ICloneable, IStateManager
JScript public   class CssCollection extends NameObjectCollectionBase, ICloneable, IStateManager

Inheritance Hierarchy

Object

NameObjectCollectionBase

Members Table

The following table lists the members exposed by the CssCollection object.

Property Description
CssText Sets or retrieves a value that indicates the string version of this collection.
Dirty Retrieves a value that indicates whether the collection is dirty.
IStateManager.IsTrackingViewState Retrieves a value indicating whether the server control is tracking its view state changes.
Item Sets or retrieves the item in the collection that matches the string being searched for.
Item Sets or retrieves the item in the collection that matches the int being searched for.
Object Description
CssEventArgs This class contains the event arguments for CssCollection events.
Event Description
Cleared Fires when the CssCollection is cleared.
ItemAdded Fires when a item is added to the CssCollection.
ItemRemoved Fires when a an item is removed from the CssCollection.
Method Description
Add Adds a new CSS attribute/value pair.
AddAttributesToRender Adds the style attributes to the HtmlTextWriter.
AppendCssText Appends a CSS text string to this collection.
Clear Clears the CssCollection.
Clone Creates a new object that is a copy of the current instance.
CssEventHandler Event handler delegate for CssCollection events.
Equals Determines whether the specified object is the same instance as the current object.
FromString Creates a CssCollection from a string.
GetBackColor Returns the background color.
GetColor Returns the color attribute.
GetFontFace Returns the font face.
GetFontSize Returns the size of the font.
GetFontStyle Returns the font style.
GetFontWeight Returns the weight of the font.
GetHashCode Retrieves a value that indicates the hash code for a particular type.
IsBorderSet Retrieves a Boolean value that indicates if the border has been set.
IStateManager.LoadViewState Loads the collection's previously saved view state.
IStateManager.SaveViewState Saves changes to the collection's view state to an Object.
IStateManager.TrackViewState Instructs the collection to track changes to its view state.
Load Load the CssCollection.
Merge Merges a CssCollection object into this one.
Merge Merges a CssStyleCollection object into this one.
MergeInto Merge this collection into a CssCollection.
Remove Remove the CSS attribute.
RenderBeginFontTag Render the font tag.
RenderBeginModalTags Render the bold and italic tags.
RenderEndFontTag Render the closing tag.
RenderEndModalTags Closes the tags.
ToString Retrieves a string that indicates the current object.

Class Information

Namespace Microsoft.Web.UI.WebControls
Assembly Microsoft.Web.UI.WebControls.dll

See Also

Internet Explorer WebControls