Defines the metadata attribute that Web server controls and their members use to indicate whether their rendering can be affected by themes and control skins. This class cannot be inherited.
Assembly: System.Web (in System.Web.dll)
Thetype exposes the following members.
|Equals||Returns a value that indicates whether this instance is equal to a specified object. (Overrides Attribute.Equals(Object).)|
|GetHashCode||Serves as a hash function for the type. (Overrides Attribute.GetHashCode.)|
|GetType||Gets the Type of the current instance. (Inherited from Object.)|
|IsDefaultAttribute||Gets a value indicating whether the current instance is equivalent to a Default instance of the class. (Overrides Attribute.IsDefaultAttribute.)|
|IsObjectThemeable||Returns a value indicating whether the object passed to the method supports themes.|
|IsTypeThemeable||Returns a value indicating whether the Type passed to the method supports themes.|
|Match||When overridden in a derived class, returns a value that indicates whether this instance equals a specified object. (Inherited from Attribute.)|
|ToString||Returns a string that represents the current object. (Inherited from Object.)|
|Default||Gets a instance that represents the application-defined default value of the attribute.|
|No||Gets a instance used to decorate a type or member that is not affected by themes and control skins.|
|Yes||Gets a instance used to decorate a type or member that is affected by themes and control skins.|
|_Attribute.GetIDsOfNames||Maps a set of names to a corresponding set of dispatch identifiers. (Inherited from Attribute.)|
|_Attribute.GetTypeInfo||Retrieves the type information for an object, which can be used to get the type information for an interface. (Inherited from Attribute.)|
|_Attribute.GetTypeInfoCount||Retrieves the number of type information interfaces that an object provides (either 0 or 1). (Inherited from Attribute.)|
|_Attribute.Invoke||Provides access to properties and methods exposed by an object. (Inherited from Attribute.)|
Control developers use the attribute to decorate control types and their members, to signal which ones can and cannot be affected by themes and control skins. By default, all properties exposed by a control are themeable. However, themes are typically applied only to stylistic properties; the Themeable(false) attribute should be applied explicitly to all non-stylistic properties. Decorating a member with the Themeable(false) attribute ensures that the member is not themed, regardless of the value of the EnableTheming property. For example, if the attribute is applied to a control and set to false, the control is not affected by themes even when its EnableTheming property is set to true.
The following code example demonstrates how you can apply the attribute to a member of a control. In this example, is applied to a data-bound control and false is passed to the ThemeableAttribute constructor, indicating that the DataSourceID member cannot have themes applied. (Passing false to the constructor results in a instance that is equivalent to the No field.)
Imports System Imports System.Web.UI Imports System.Web.UI.WebControls Public Class SomeDataBoundControl Inherits DataBoundControl ' Implementation of a custom data source control. <Themeable(False)> _ <IDReferenceProperty()> _ Public Overrides Property DataSourceID() As String Get Return MyBase.DataSourceID End Get Set MyBase.DataSourceID = value End Set End Property End Class 'SomeDataBoundControl
Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.