Uredi

Deli z drugimi prek


DesignerRegionCollection Class

Definition

Represents a collection of DesignerRegion objects within a control designer.

public ref class DesignerRegionCollection : System::Collections::IList
public class DesignerRegionCollection : System.Collections.IList
type DesignerRegionCollection = class
    interface IList
    interface ICollection
    interface IEnumerable
Public Class DesignerRegionCollection
Implements IList
Inheritance
DesignerRegionCollection
Implements

Remarks

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.

Constructors

DesignerRegionCollection()

Initializes a new instance of the DesignerRegionCollection class.

DesignerRegionCollection(ControlDesigner)

Initializes a new instance of the DesignerRegionCollection class for the specified control designer.

Properties

Count

Gets the number of DesignerRegion objects in the collection.

IsFixedSize

Gets a value indicating whether the DesignerRegionCollection object has a fixed size.

IsReadOnly

Gets a value indicating whether the DesignerRegionCollection object is read-only.

IsSynchronized

Gets a value indicating whether access to the DesignerRegionCollection object is synchronized (thread safe).

Item[Int32]

Gets or sets a DesignerRegion object at the specified index in the collection.

Owner

Gets the control designer that owns the designer region collection.

SyncRoot

Gets an object that can be used to synchronize access to the DesignerRegionCollection object.

Methods

Add(DesignerRegion)

Adds the specified DesignerRegion object to the end of the collection.

Clear()

Removes all regions from the collection.

Contains(DesignerRegion)

Gets a value indicating whether the specified region is contained within the collection.

CopyTo(Array, Int32)

Copies the elements of the collection to an Array object, starting at a particular Array index.

Equals(Object)

Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetEnumerator()

Returns an enumerator that iterates through the collection.

GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetType()

Gets the Type of the current instance.

(Inherited from Object)
IndexOf(DesignerRegion)

Returns the index of the specified DesignerRegion object within the collection.

Insert(Int32, DesignerRegion)

Inserts a DesignerRegion object into the collection at the specified index.

MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
Remove(DesignerRegion)

Removes the specified DesignerRegion object from the collection.

RemoveAt(Int32)

Removes the DesignerRegion object at the specified index within the collection.

ToString()

Returns a string that represents the current object.

(Inherited from Object)

Explicit Interface Implementations

ICollection.CopyTo(Array, Int32)

For a description of this member, see CopyTo(Array, Int32).

ICollection.Count

For a description of this member, see Count.

ICollection.IsSynchronized

For a description of this member, see IsSynchronized.

ICollection.SyncRoot

For a description of this member, see SyncRoot.

IEnumerable.GetEnumerator()

For a description of this member, see GetEnumerator().

IList.Add(Object)

For a description of this member, see Add(Object).

IList.Clear()

For a description of this member, see Clear().

IList.Contains(Object)

For a description of this member, see Contains(Object).

IList.IndexOf(Object)

For a description of this member, see IndexOf(Object).

IList.Insert(Int32, Object)

For a description of this member, see Insert(Int32, Object).

IList.IsFixedSize

For a description of this member, see IsFixedSize.

IList.IsReadOnly

For a description of this member, see IsReadOnly.

IList.Item[Int32]

For a description of this member, see Item[Int32].

IList.Remove(Object)

For a description of this member, see Remove(Object).

IList.RemoveAt(Int32)

For a description of this member, see RemoveAt(Int32).

Extension Methods

Cast<TResult>(IEnumerable)

Casts the elements of an IEnumerable to the specified type.

OfType<TResult>(IEnumerable)

Filters the elements of an IEnumerable based on a specified type.

AsParallel(IEnumerable)

Enables parallelization of a query.

AsQueryable(IEnumerable)

Converts an IEnumerable to an IQueryable.

Applies to

See also