Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

WebPartManager.EnableTheming Property

Gets a value indicating that the use of themes is enabled on a Web page.

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

public override bool EnableTheming { get; set; }

Property Value

Type: System.Boolean
A Boolean value that indicates whether themes are enabled. true in all cases.


An attempt was made to set the property value.

The WebPartManager control overrides the base EnableTheming property to ensure that it always returns a value of true. This is done because the Web Parts control set requires the use of themes to render the Web Parts controls that are child controls of the WebPartManager control and that form the user interface (UI) of a Web page. For example, themes are used to render the various zones, and the controls that reside in the zones, including the various types of part controls (controls that inherit from the Part class), user controls, ASP.NET server controls, and custom server controls.

Although the overridden EnableTheming property is implemented as a read/write property in accordance with its base property, you cannot set the property, because by design it must always return a value of true. If you attempt to set the property, a NotSupportedException exception is thrown.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0
© 2015 Microsoft