SkinBuilder 类

定义

提供一个 ControlBuilder 对象,用于在设计时将控件外观应用于控件。Provides a ControlBuilder object used at design time to apply control skins to controls.

public ref class SkinBuilder sealed : System::Web::UI::ControlBuilder
public sealed class SkinBuilder : System.Web.UI.ControlBuilder
type SkinBuilder = class
    inherit ControlBuilder
Public NotInheritable Class SkinBuilder
Inherits ControlBuilder
继承
SkinBuilder

注解

页面开发人员和控件作者不会直接SkinBuilder使用该类。Page developers and control authors do not use the SkinBuilder class directly.

ASP.NET 设计器生成器将SkinBuilderThemeProvider与类和IThemeResolutionService接口结合使用, 以便在设计时将主题及其各自的控件外观应用于控件。ASP.NET designer builders use the SkinBuilder class in conjunction with the ThemeProvider class and the IThemeResolutionService interface to apply themes and their respective control skins to controls at design time. 若要在设计时应用主题, 则ControlBuilder每当生成控件ApplyTheme的子控件树时, 基类都将调用方法。To apply themes at design time, the base ControlBuilder class calls the ApplyTheme method whenever a control's child control tree is built.

构造函数

SkinBuilder(ThemeProvider, Control, ControlBuilder, String)

初始化 SkinBuilder 类的新实例,设置与生成器相关联的控件、ThemeProvider 对象为该控件提供的通用 ControlBuilder 对象,以及主题文件的路径。Initializes a new instance of the SkinBuilder class, setting the control with which the builder is associated, the general ControlBuilder object provided by the ThemeProvider object for the control, and a path to the theme file.

属性

BindingContainerBuilder

获取与此生成器创建的控件的绑定容器对应的控件生成器。Gets the control builder that corresponds to the binding container for the control that this builder creates.

(继承自 ControlBuilder)
BindingContainerType

获取此生成器所创建控件的绑定容器的类型。Gets the type of the binding container for the control that this builder creates.

(继承自 ControlBuilder)
ComplexPropertyEntries

获取复杂属性项的集合。Gets a collection of complex property entries.

(继承自 ControlBuilder)
ControlType

获取要创建的控件的 TypeGets the Type for the control to be created.

(继承自 ControlBuilder)
CurrentFilterResolutionService

获取一个 IFilterResolutionService 对象,在设计器中分析和保持控件时使用该对象管理与设备筛选器相关的服务。Gets an IFilterResolutionService object that is used to manage device-filter related services when parsing and persisting controls in the designer.

(继承自 ControlBuilder)
DeclareType

获取代码生成将用于声明控件的类型。Gets the type that will be used by code generation to declare the control.

(继承自 ControlBuilder)
FChildrenAsProperties

获取确定控件是否有设置到 trueParseChildrenAttributeChildrenAsProperties 的值。Gets a value that determines whether the control has a ParseChildrenAttribute with ChildrenAsProperties set to true.

(继承自 ControlBuilder)
FIsNonParserAccessor

获取确定控件是否实现了 IParserAccessor 界面的值。Gets a value that determines whether the control implements the IParserAccessor interface.

(继承自 ControlBuilder)
HasAspCode

获取一个值,该值指示控件是否包含任何代码块。Gets a value indicating whether the control contains any code blocks.

(继承自 ControlBuilder)
ID

获取或设置要生成的控件的标识符属性。Gets or sets the identifier property for the control to be built.

(继承自 ControlBuilder)
InDesigner

返回 ControlBuilder 是否正在设计器中运行。Returns whether the ControlBuilder is running in the designer.

(继承自 ControlBuilder)
InPageTheme

获取一个布尔值,该值指示此 ControlBuilder 对象是否用于生成页主题。Gets a Boolean value indicating whether this ControlBuilder object is used to generate page themes.

(继承自 ControlBuilder)
ItemType

获取在绑定容器上设置的类型。Gets the type set on the binding container.

(继承自 ControlBuilder)
Localize

获取一个布尔值,该值指示由此 ControlBuilder 对象所创建的控件是否已本地化。Gets a Boolean value indicating whether the control that is created by this ControlBuilder object is localized.

(继承自 ControlBuilder)
NamingContainerType

获取此生成器所创建控件的命名容器的类型。Gets the type of the naming container for the control that this builder creates.

(继承自 ControlBuilder)
PageVirtualPath

通过 ControlBuilder 实例获取要建立的页的虚拟路径。Gets the virtual path of a page to be built by this ControlBuilder instance.

(继承自 ControlBuilder)
Parser

获取负责分析控件的 TemplateParserGets the TemplateParser responsible for parsing the control.

(继承自 ControlBuilder)
ServiceProvider

获取此 ControlBuilder 对象的服务对象。Gets the service object for this ControlBuilder object.

(继承自 ControlBuilder)
SubBuilders

获取此 ControlBuilder 对象的 ControlBuilder 子对象的列表。Gets a list of child ControlBuilder objects for this ControlBuilder object.

(继承自 ControlBuilder)
TagName

获取要生成的控件的标记名称。Gets the tag name for the control to be built.

(继承自 ControlBuilder)
TemplatePropertyEntries

获取模板属性项的集合。Gets a collection of template property entries.

(继承自 ControlBuilder)
ThemeResolutionService

获取一个 IThemeResolutionService 对象,该对象用于在设计时管理控件的主题和外观。Gets an IThemeResolutionService object that is used in design time to manage control themes and skins.

(继承自 ControlBuilder)

方法

AllowWhitespaceLiterals()

确定在控件的开始和结束标记之间的内容中是否允许存在空白。Determines whether white space literals are permitted in the content between a control's opening and closing tags. 此方法由 ASP.NET 页面框架调用。This method is called by the ASP.NET page framework.

(继承自 ControlBuilder)
AppendLiteralString(String)

将指定的文本内容添加到控件。Adds the specified literal content to a control. 此方法由 ASP.NET 页面框架调用。This method is called by the ASP.NET page framework.

(继承自 ControlBuilder)
AppendSubBuilder(ControlBuilder)

将生成器添加到属于容器控件的任何子控件的 ControlBuilder 对象。Adds builders to the ControlBuilder object for any child controls that belong to the container control.

(继承自 ControlBuilder)
ApplyTheme()

如果 SkinBuilder 对象与当前控件相关联,则在设计时将主题和控件外观应用于该控件。Applies a theme and a control skin to the current control at design time, if a SkinBuilder object is associated with the control.

BuildObject()

生成此 ControlBuilder 对象所引用的控件的设计时实例。Builds a design-time instance of the control that is referred to by this ControlBuilder object.

(继承自 ControlBuilder)
CloseControl()

由分析器调用以通知生成器对控件的开始和结束标记的分析已完成。Called by the parser to inform the builder that the parsing of the control's opening and closing tags is complete.

(继承自 ControlBuilder)
Equals(Object)

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

(继承自 Object)
GetChildControlType(String, IDictionary)

获取与子标记对应的控件类型的 TypeObtains the Type of the control type corresponding to a child tag. 此方法由 ASP.NET 页面框架调用。This method is called by the ASP.NET page framework.

(继承自 ControlBuilder)
GetHashCode()

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

(继承自 Object)
GetObjectPersistData()

创建此 ObjectPersistData 对象的 ControlBuilder 对象。Creates the ObjectPersistData object for this ControlBuilder object.

(继承自 ControlBuilder)
GetResourceKey()

检索此 ControlBuilder 对象的资源键。Retrieves the resource key for this ControlBuilder object.

(继承自 ControlBuilder)
GetType()

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

(继承自 Object)
HasBody()

确定控件是否同时具有开始标记和结束标记。Determines if a control has both an opening and closing tag. 此方法由 ASP.NET 页面框架调用。This method is called by the ASP.NET page framework.

(继承自 ControlBuilder)
HtmlDecodeLiterals()

确定 HTML 控件的字符串是否必须是 HTML 解码的。Determines whether the literal string of an HTML control must be HTML decoded. 此方法由 ASP.NET 页面框架调用。This method is called by the ASP.NET page framework.

(继承自 ControlBuilder)
Init(TemplateParser, ControlBuilder, Type, String, String, IDictionary)

实例化 ControlBuilder 后再进行初始化以便使用。Initializes the ControlBuilder for use after it is instantiated. 此方法由 ASP.NET 页面框架调用。This method is called by the ASP.NET page framework.

(继承自 ControlBuilder)
MemberwiseClone()

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

(继承自 Object)
NeedsTagInnerText()

确定控件生成器是否需要获取它的内部文本。Determines if the control builder needs to get its inner text. 如果需要,则必须调用 SetTagInnerText(String) 方法。If so, the SetTagInnerText(String) method must be called. 此方法由 ASP.NET 页面框架调用。This method is called by the ASP.NET page framework.

(继承自 ControlBuilder)
OnAppendToParentBuilder(ControlBuilder)

通知 ControlBuilder 正在将它添加到父控件生成器。Notifies the ControlBuilder that it is being added to a parent control builder.

(继承自 ControlBuilder)
ProcessGeneratedCode(CodeCompileUnit, CodeTypeDeclaration, CodeTypeDeclaration, CodeMemberMethod, CodeMemberMethod)

启用自定义控件生成器以访问生成的代码文档对象模型 (CodeDom),并在分析和生成控件的过程中插入和修改代码。Enables custom control builders to access the generated Code Document Object Model (CodeDom) and insert and modify code during the process of parsing and building controls.

(继承自 ControlBuilder)
SetResourceKey(String)

设置此 ControlBuilder 对象的资源键。Sets the resource key for this ControlBuilder object.

(继承自 ControlBuilder)
SetServiceProvider(IServiceProvider)

设置此 ControlBuilder 对象的服务对象。Sets the service object for this ControlBuilder object.

(继承自 ControlBuilder)
SetTagInnerText(String)

ControlBuilder 提供控件标记的内部文本。Provides the ControlBuilder with the inner text of the control tag.

(继承自 ControlBuilder)
ToString()

返回一个表示当前对象的 string。Returns a string that represents the current object.

(继承自 Object)

适用于

另请参阅