This documentation is archived and is not being maintained.

ThemeProvider Class

Provides a class that encapsulates theme and style sheet information for controls in a designer environment.


Namespace:  System.Web.UI
Assembly:  System.Web (in System.Web.dll)

public sealed class ThemeProvider

The ThemeProvider type exposes the following members.

Public methodThemeProviderInitializes a new instance of the ThemeProvider class.

Public propertyContentHashCodeGets the hash of the theme definition passed to the constructor.
Public propertyCssFilesGets a set of strings that represent the names of any cascading style sheet (CSS) files associated with the current theme, if the theme is a style sheet theme.
Public propertyDesignerHostGets an IDesignerHost object that represents the current designer environment.
Public propertyThemeNameGets the name of the theme or style sheet theme that the ThemeProvider instance represents.

Public methodEquals(Object)Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public methodGetHashCodeServes as a hash function for a particular type. (Inherited from Object.)
Public methodGetSkinBuilderRetrieves a SkinBuilder instance for the specified control, which is used to apply a theme and control skin in a designer environment.
Public methodGetSkinControlBuildersForControlTypeGets an IDictionary object that contains a set of SkinBuilder objects for the specified Type.
Public methodGetSkinsForControlGets an ICollection of skin identifiers that are associated with the specified Type.
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Protected methodMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Public methodToStringReturns a string that represents the current object. (Inherited from Object.)

Page developers and control authors do not use the ThemeProvider class. ASP.NET developer tool and designer builders use the ThemeProvider class in conjunction with the SkinBuilder class and the IThemeResolutionService interface to apply themes and their respective control skins to controls at design time.

The ThemeProvider class encapsulates the information needed to apply a theme or style sheet theme and its control skins to the child controls of a control in a designer.

.NET Framework

Supported in: 4, 3.5, 3.0, 2.0

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.