TemplateBuilder 类

定义

支持在生成模板及其包含的子控件时使用的页分析器。Supports the page parser in building a template and the child controls it contains.

public ref class TemplateBuilder : System::Web::UI::ControlBuilder, System::Web::UI::ITemplate
public class TemplateBuilder : System.Web.UI.ControlBuilder, System.Web.UI.ITemplate
type TemplateBuilder = class
    inherit ControlBuilder
    interface ITemplate
Public Class TemplateBuilder
Inherits ControlBuilder
Implements ITemplate
继承
TemplateBuilder
派生
实现

注解

若要将自TemplateBuilder定义类用于控件,请为该ControlBuilder控件创建一个自定义,然后从该TemplateBuilder GetChildControlType方法返回自定义控件。To use a custom TemplateBuilder class for a control, create a custom ControlBuilder for the control, and then return the custom TemplateBuilder control from the GetChildControlType method.

构造函数

TemplateBuilder()

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

属性

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)
Text

获取或设置模板的开始和结束标记之间的文本。Gets or sets the text between the opening and closing tags of the template.

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)
BuildObject()

在设计过程中用于生成模板及其子控件。Used during design time to build the template and its child controls.

CloseControl()

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

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)

当进行 Web 请求时初始化模板生成器。Initializes the template builder when a Web request is made.

InstantiateIn(Control)

在设计时定义子控件和模板所属的 Control 对象。Defines the Control object that child controls and templates belong to in design time.

MemberwiseClone()

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

(继承自 Object)
NeedsTagInnerText()

确定控件生成器是否需要获取它的内部文本。Determines if the control builder needs to get its inner text.

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)

保存模板标记的内部文本。Saves the inner text of the template tag.

ToString()

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

(继承自 Object)

适用于

另请参阅