TemplateDefinition Class

Note: This class is new in the .NET Framework version 2.0.

Provides properties and methods that define a template element in a Web server control at design time.

Namespace: System.Web.UI.Design
Assembly: System.Design (in system.design.dll)

public ref class TemplateDefinition : public DesignerObject
public class TemplateDefinition extends DesignerObject
public class TemplateDefinition extends DesignerObject

The TemplateDefinition class provides a base template definition class that can be inherited from and extended for a control designer to use in providing support for templated controls in a design host such as Visual Studio 2005. A design host uses the properties and methods of the TemplateDefinition class to facilitate creating and editing a template at design time.

The following code example demonstrates how to derive a custom class from the ControlDesigner class. This control designer supports a control with four possible templates.

To try it, add a reference to the System.Design.dll assembly, compile the code, and then, in a design host such as Visual Studio 2005, look at the page in Design view. Select the control, click the action list to select a template to modify, and then use the drag-and-drop feature to move controls into the template.

No code example is currently available or this language may not be supported.

System.Object
   System.Web.UI.Design.DesignerObject
    System.Web.UI.Design.TemplateDefinition

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Windows 98, Windows 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.

.NET Framework

Supported in: 2.0
Show: