This documentation is archived and is not being maintained.

DesignerRegionCollection Class

Represents a collection of DesignerRegion objects within a control designer.


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

public class DesignerRegionCollection : IList, 
	ICollection, IEnumerable

The DesignerRegionCollection type exposes the following members.

Public methodDesignerRegionCollection()Initializes a new instance of the DesignerRegionCollection class.
Public methodDesignerRegionCollection(ControlDesigner)Initializes a new instance of the DesignerRegionCollection class for the specified control designer.

Public propertyCountGets the number of DesignerRegion objects in the collection.
Public propertyIsFixedSizeGets a value indicating whether the DesignerRegionCollection object has a fixed size.
Public propertyIsReadOnlyGets a value indicating whether the DesignerRegionCollection object is read-only.
Public propertyIsSynchronizedGets a value indicating whether access to the DesignerRegionCollection object is synchronized (thread safe).
Public propertyItemGets or sets a DesignerRegion object at the specified index in the collection.
Public propertyOwnerGets the control designer that owns the designer region collection.
Public propertySyncRootGets an object that can be used to synchronize access to the DesignerRegionCollection object.

Public methodAddAdds the specified DesignerRegion object to the end of the collection.
Public methodClearRemoves all regions from the collection.
Public methodContainsGets a value indicating whether the specified region is contained within the collection.
Public methodCopyToCopies the elements of the collection to an Array object, starting at a particular Array index.
Public methodEquals(Object)Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public methodGetEnumeratorReturns an enumerator that iterates through the collection.
Public methodGetHashCodeServes as a hash function for a particular type. (Inherited from Object.)
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Public methodIndexOfReturns the index of the specified DesignerRegion object within the collection.
Public methodInsertInserts a DesignerRegion object into the collection at the specified index.
Protected methodMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Public methodRemoveRemoves the specified DesignerRegion object from the collection.
Public methodRemoveAtRemoves the DesignerRegion object at the specified index within the collection.
Public methodToStringReturns a string that represents the current object. (Inherited from Object.)

Public Extension MethodAsParallelEnables parallelization of a query. (Defined by ParallelEnumerable.)
Public Extension MethodAsQueryableConverts an IEnumerable to an IQueryable. (Defined by Queryable.)
Public Extension MethodCast<TResult>Converts the elements of an IEnumerable to the specified type. (Defined by Enumerable.)
Public Extension MethodOfType<TResult>Filters the elements of an IEnumerable based on a specified type. (Defined by Enumerable.)

Explicit interface implemetationPrivate methodICollection.CopyToInfrastructure. For a description of this member, see CopyTo.
Explicit interface implemetationPrivate propertyICollection.CountInfrastructure. For a description of this member, see ICollection.Count.
Explicit interface implemetationPrivate propertyICollection.IsSynchronizedInfrastructure. For a description of this member, see ICollection.IsSynchronized.
Explicit interface implemetationPrivate propertyICollection.SyncRootInfrastructure. For a description of this member, see ICollection.SyncRoot.
Explicit interface implemetationPrivate methodIEnumerable.GetEnumeratorInfrastructure. For a description of this member, see IEnumerable.GetEnumerator.
Explicit interface implemetationPrivate methodIList.AddInfrastructure. For a description of this member, see IList.Add.
Explicit interface implemetationPrivate methodIList.ClearInfrastructure. For a description of this member, see IList.Clear.
Explicit interface implemetationPrivate methodIList.ContainsInfrastructure. For a description of this member, see IList.Contains.
Explicit interface implemetationPrivate methodIList.IndexOfInfrastructure. For a description of this member, see IList.IndexOf.
Explicit interface implemetationPrivate methodIList.InsertInfrastructure. For a description of this member, see IList.Insert.
Explicit interface implemetationPrivate propertyIList.IsFixedSizeInfrastructure. For a description of this member, see IList.IsFixedSize.
Explicit interface implemetationPrivate propertyIList.IsReadOnlyInfrastructure. For a description of this member, see IList.IsReadOnly.
Explicit interface implemetationPrivate propertyIList.ItemInfrastructure. For a description of this member, see IList.Item.
Explicit interface implemetationPrivate methodIList.RemoveInfrastructure. For a description of this member, see IList.Remove.
Explicit interface implemetationPrivate methodIList.RemoveAtInfrastructure. For a description of this member, see IList.RemoveAt.

The ControlDesigner class, and any derived class, uses the DesignerRegionCollection class to contain and enumerate the designer regions for the control in a design host, such as Visual Studio 2005.

For example, the ControlDesigner.GetDesignTimeHtml method can be used to define and add regions to the collection.

Use the Owner property to access the control designer object that contains the designer region collection. Use the DesignerRegionCollection methods and properties to examine and maintain the DesignerRegion objects that are in the collection.

The collection dynamically increases as objects are added. Indexes in this collection are zero-based. Use the Count property to determine how many designer regions are in the collection. Use the DesignerRegionCollection members to provide the following functionality:

  • The Add method to add a single designer region to the collection.

  • The Insert method to add a designer region at a particular index within the collection.

  • The Remove method to remove a designer region.

  • The RemoveAt method to remove the designer region at a particular index.

  • The Contains method to determine whether a particular designer region is already in the collection.

  • The IndexOf method to retrieve the index of a designer region within the collection.

  • The Item indexer to get or set the designer region at a particular index, using array notation.

  • The Clear method to remove all designer regions from the collection.

.NET Framework

Supported in: 4, 3.5, 3.0, 2.0

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

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

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