PageTheme Class

Definition

表示页主题的基类,页主题是用于定义网站中的页和控件之间统一外观的资源的集合。Represents the base class for a page theme, which is a collection of resources that are used to define a consistent look across pages and controls in a Web site. 可以通过配置或页指令设置页主题。The page theme can be set through configuration or the page directive.

public ref class PageTheme abstract
public abstract class PageTheme
type PageTheme = class
Public MustInherit Class PageTheme
Inheritance
PageTheme

Remarks

页面和控件开发人员不会直接使用 ControlSkinDelegateControlSkinPageTheme 类。Page and control developers do not use the ControlSkinDelegate, ControlSkin, or PageTheme classes directly. ASP.NET 分析器和运行时使用这些类将 ASP.NET 主题和控件外观文件中定义的样式表元素应用于页面和特定类型的控件。These classes are used by the ASP.NET parser and runtime to apply style sheet elements that are defined in ASP.NET themes and control skins files to pages and specific types of controls.

页面开发人员使用 "Theme" 和 "EnableTheming" 属性启用(或禁用)页面主题。Page developers enable (or disable) page themes using the Theme and EnableTheming properties. 有关页面主题的详细信息,请参阅ASP.NET 主题和外观For more information about page themes, see ASP.NET Themes and Skins.

Constructors

PageTheme()

初始化 PageTheme 类的新实例。Initializes a new instance of the PageTheme class.

Properties

AppRelativeTemplateSourceDirectory

当在派生类中重写时,获取 PageTheme 对象的目录的相对 URL。When overridden a derived class, gets the relative URL of the directory for the PageTheme object.

ControlSkins

当在派生类中重写时,获取可用于当前页主题的所有默认外观的名称的 IDictionary 接口(根据控件类型进行索引)。When overridden in a derived class, gets an IDictionary interface of the names of all default skins that are available for the current page theme, indexed by control type.

LinkedStyleSheets

当在派生类中重写时,获取链接到此页的样式表的数组。When overridden in a derived class, gets an array of style sheets that are linked to this page.

Page

获取与 PageTheme 类的实例关联的 Page 对象。Gets the Page object that is associated with the instance of the PageTheme class.

Methods

CreateSkinKey(Type, String)

创建特定控件类型和外观 ID 的查找键对象。Creates a lookup key object for a particular control type and skin ID.

Equals(Object)

确定指定的对象是否等于当前对象。Determines whether the specified object is equal to the current object.

(Inherited from Object)
Eval(String)

使用与 PageTheme 类的实例关联的 Page 属性的 Eval(Object, String) 方法来计算数据绑定表达式。Uses the Eval(Object, String) method of the Page property that the instance of the PageTheme class is associated with to evaluate a data-binding expression.

Eval(String, String)

使用与 PageTheme 类的实例关联的 Page 属性的 Eval(Object, String, String) 方法来计算数据绑定表达式。Uses the Eval(Object, String, String) method of the Page property that the instance of the PageTheme class is associated with to evaluate a data-binding expression.

GetHashCode()

作为默认哈希函数。Serves as the default hash function.

(Inherited from Object)
GetType()

获取当前实例的 TypeGets the Type of the current instance.

(Inherited from Object)
MemberwiseClone()

创建当前 Object 的浅表副本。Creates a shallow copy of the current Object.

(Inherited from Object)
TestDeviceFilter(String)

测试设备筛选器是否适用于与 PageTheme 类的实例关联的 Page 控件。Tests whether a device filter applies to the Page control that the instance of the PageTheme class is associated with.

ToString()

返回表示当前对象的字符串。Returns a string that represents the current object.

(Inherited from Object)
XPath(String)

计算 XPath 数据绑定表达式。Evaluates an XPath data-binding expression.

XPath(String, IXmlNamespaceResolver)

使用指定的前缀和命名空间映射来计算 XPath 数据绑定表达式,以进行命名空间解析。Evaluates an XPath data-binding expression using the specified prefix and namespace mappings for namespace resolution.

XPath(String, String)

计算 XPath 数据绑定表达式,使用指定的格式字符串来显示结果。Evaluates an XPath data-binding expression using the specified format string to display the result.

XPath(String, String, IXmlNamespaceResolver)

使用与 PageTheme 类的实例关联的 Page 控件的 XPath(String, String, IXmlNamespaceResolver) 方法来计算 XPath 数据绑定表达式。Uses the XPath(String, String, IXmlNamespaceResolver) method of the Page control that the instance of the PageTheme class is associated with to evaluate an XPath data-binding expression.

XPathSelect(String)

计算 XPath 数据绑定表达式,并返回实现 IEnumerable 接口的节点集合。Evaluates an XPath data-binding expression and returns a node collection that implements the IEnumerable interface.

XPathSelect(String, IXmlNamespaceResolver)

使用用于命名空间解析的指定前缀和命名空间映射计算 XPath 数据绑定表达式,并返回实现 IEnumerable 接口的节点集合。Evaluates an XPath data-binding expression using the specified prefix and namespace mappings for namespace resolution and returns a node collection that implements the IEnumerable interface.

Applies to

See also