Читати англійською Редагувати

Поділитися через


TemplateDefinition Constructors

Definition

Initializes a new instance of the TemplateDefinition class.

Overloads

TemplateDefinition(ControlDesigner, String, Object, String)

Initializes a new instance of the TemplateDefinition class, using the provided designer, template name, template, and property name.

TemplateDefinition(ControlDesigner, String, Object, String, Boolean)

Initializes a new instance of the TemplateDefinition class, using the provided designer, template name, template, property name, and whether to limit the template contents to Web server controls.

TemplateDefinition(ControlDesigner, String, Object, String, Style)

Initializes a new instance of the TemplateDefinition class, using the provided designer, template name, template, property name, and Style object.

TemplateDefinition(ControlDesigner, String, Object, String, Style, Boolean)

Initializes a new instance of the TemplateDefinition class, using the provided designer, template name, template, property name, Style object, and whether to limit content to Web server controls.

TemplateDefinition(ControlDesigner, String, Object, String)

Initializes a new instance of the TemplateDefinition class, using the provided designer, template name, template, and property name.

C#
public TemplateDefinition(System.Web.UI.Design.ControlDesigner designer, string name, object templatedObject, string templatePropertyName);

Parameters

designer
ControlDesigner

The parent ControlDesigner object.

name
String

The name of the template.

templatedObject
Object

The object that contains the template.

templatePropertyName
String

The property name that represents this template in the Properties list in the design host.

Exceptions

designer is null,

-or-

templatedObject is null.

See also

Applies to

.NET Framework 4.8.1 та інші версії
Продукт Версії
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1

TemplateDefinition(ControlDesigner, String, Object, String, Boolean)

Initializes a new instance of the TemplateDefinition class, using the provided designer, template name, template, property name, and whether to limit the template contents to Web server controls.

C#
public TemplateDefinition(System.Web.UI.Design.ControlDesigner designer, string name, object templatedObject, string templatePropertyName, bool serverControlsOnly);

Parameters

designer
ControlDesigner

The parent ControlDesigner object.

name
String

The name of the template.

templatedObject
Object

The object that contains the template.

templatePropertyName
String

The property name that represents this template in the Properties list in the design host.

serverControlsOnly
Boolean

A Boolean value indicating whether the template content should allow only Web server controls.

Exceptions

designer is null,

-or-

templatedObject is null.

See also

Applies to

.NET Framework 4.8.1 та інші версії
Продукт Версії
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1

TemplateDefinition(ControlDesigner, String, Object, String, Style)

Initializes a new instance of the TemplateDefinition class, using the provided designer, template name, template, property name, and Style object.

C#
public TemplateDefinition(System.Web.UI.Design.ControlDesigner designer, string name, object templatedObject, string templatePropertyName, System.Web.UI.WebControls.Style style);

Parameters

designer
ControlDesigner

The parent ControlDesigner object.

name
String

The name of the template.

templatedObject
Object

The object that contains the template.

templatePropertyName
String

The property name that represents this template in the Properties list in the design host.

style
Style

A Style object to apply to each template.

Exceptions

designer is null,

-or-

templatedObject is null.

See also

Applies to

.NET Framework 4.8.1 та інші версії
Продукт Версії
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1

TemplateDefinition(ControlDesigner, String, Object, String, Style, Boolean)

Initializes a new instance of the TemplateDefinition class, using the provided designer, template name, template, property name, Style object, and whether to limit content to Web server controls.

C#
public TemplateDefinition(System.Web.UI.Design.ControlDesigner designer, string name, object templatedObject, string templatePropertyName, System.Web.UI.WebControls.Style style, bool serverControlsOnly);

Parameters

designer
ControlDesigner

The parent ControlDesigner object.

name
String

The name of the template.

templatedObject
Object

The object that contains the template.

templatePropertyName
String

The property name that represents this template in the Properties list in the design host.

style
Style

A Style object to apply to each template.

serverControlsOnly
Boolean

A Boolean value indicating whether the template should limit content to Web server controls.

Exceptions

designer is null,

-or-

templatedObject is null.

See also

Applies to

.NET Framework 4.8.1 та інші версії
Продукт Версії
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1