Represents a collection of System.Web.UI.Design.TemplateGroup objects within a control designer. This class cannot be inherited.
See Also: TemplateGroupCollection Members
The System.Web.UI.Design.ControlDesigner class, and any derived class, defines the ControlDesigner.TemplateGroups property as a System.Web.UI.Design.TemplateGroupCollection object. The System.Web.UI.Design.TemplateGroupCollection property is typically used only by a design host such as vsprvslong.
The collection dynamically increases in size as objects are added. Indexes in this collection are zero-based. Use the TemplateGroupCollection.Count property to determine how many groups are in the collection.
Additionally, use the System.Web.UI.Design.TemplateGroupCollection methods and properties to provide the following functionality:
The TemplateGroupCollection.Add(TemplateGroup) method to add a single group to the collection.
The TemplateGroupCollection.Insert(int, TemplateGroup) method to add a group at a particular index within the collection.
The TemplateGroupCollection.Remove(TemplateGroup) method to remove a group.
The TemplateGroupCollection.RemoveAt(int) method to remove the group at a particular index.
The TemplateGroupCollection.Contains(TemplateGroup) method to determine whether a particular group is already in the collection.
The TemplateGroupCollection.IndexOf(TemplateGroup) method to retrieve the index of a group within the collection.
The TemplateGroupCollection.Item(int) indexer to get or set the group at a particular index, using array notation.
The TemplateGroupCollection.AddRange(TemplateGroupCollection) method to add multiple groups to the collection.
You can add multiple groups either as an array of groups or as a System.Web.UI.Design.TemplateGroupCollection object that you retrieve through the ControlDesigner.TemplateGroups property of another control designer.
The TemplateGroupCollection.Clear method to remove all groups from the collection.