The template control is a composite control template property to provide a practical sub-control to display the contents of the template container to display the actual content to be displayed. The template container can derive it from any control as an appropriate container.
Template properties and template containers are described by TemplateContainer metadata attributes of template properties. For example, TemplateContainer (TypeOf (ContactPanel)) Template is the instantiatein method in which the contents of the template container are displayed in the template in the template's instantiatein method to use templates. Sub-control represented to a container example
If you want to repeat the template in the template in the control, the template container should implement the InamingContainer interface. If you want to repeat the template in the instantiation control, you must process the DataBinding event of the child control defined in the template. If you want to repeat the instantiation control The template in the template should not contain any control instances as a member variable.
Add templates to the control tree in the CreatchildControls method.