StyleCollection Class
Assembly: System.Web (in system.web.dll)
Use the StyleCollection class to store and manage Style objects for a control. Control developers can use this class to contain a set of styles that apply to different portions of the control.
The collection dynamically increases in size as objects are added. Indexes in this collection are zero-based. Use the Count property to determine how many objects are in the collection.
Additionally, use the StyleCollection methods and properties to provide the following functionality:
-
The Add method to add a single style to the collection.
-
The Insert method to add a style at a particular index within the collection.
-
The Remove method to remove a style from the collection.
-
The RemoveAt method to remove the style located at a particular index.
-
The Contains method to determine whether a particular style is already in the collection.
-
The IndexOf method to retrieve the index of a style within the collection.
-
The Clear method to remove all the styles from the collection.
- AspNetHostingPermission for operating in a hosted environment. Demand value: LinkDemand. Permission value: Minimal.
- AspNetHostingPermission for operating in a hosted environment. Demand value: InheritanceDemand. Permission value: Minimal.
Windows 98, Windows 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.