Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
ThemeProvider Class
Collapse the table of content
Expand the table of content

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.)
Public methodGetHashCodeServes as the default hash function. (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.)
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.6, 4.5, 4, 3.5, 3.0, 2.0

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