DesignerRegionCollection 类

定义

表示控件设计器内的 DesignerRegion 对象的集合。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
继承
DesignerRegionCollection
实现

注解

类和任何派生类DesignerRegionCollection使用类在Visual Studio 2005Visual Studio 2005设计宿主 (如) 中包含和枚举控件的设计器区域。 ControlDesignerThe 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 2005Visual Studio 2005.

例如, ControlDesigner.GetDesignTimeHtml方法可用于定义区域并将其添加到集合中。For example, the ControlDesigner.GetDesignTimeHtml method can be used to define and add regions to the collection.

Owner使用属性可访问包含设计器区域集合的控件设计器对象。Use the Owner property to access the control designer object that contains the designer region collection. 使用方法和属性来检查和DesignerRegion维护集合中的对象。 DesignerRegionCollectionUse 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. Count使用属性可确定集合中有多少设计器区域。Use the Count property to determine how many designer regions are in the collection. DesignerRegionCollection使用成员提供以下功能:Use the DesignerRegionCollection members to provide the following functionality:

  • 向集合中添加单个设计器区域的方法。AddThe Add method to add a single designer region to the collection.

  • 用于在集合中的特定索引处添加设计器区域的方法。InsertThe Insert method to add a designer region at a particular index within the collection.

  • 用于Remove移除设计器区域的方法。The Remove method to remove a designer region.

  • 用于移除特定索引处的设计器区域的方法。RemoveAtThe RemoveAt method to remove the designer region at a particular index.

  • 用于确定特定设计器区域是否已存在于集合中的方法。ContainsThe Contains method to determine whether a particular designer region is already in the collection.

  • 用于检索集合中设计器区域的索引的方法。IndexOfThe IndexOf method to retrieve the index of a designer region within the collection.

  • 用于获取或设置特定索引处的设计器区域的索引器,使用数组表示法。Item[Int32]The Item[Int32] indexer to get or set the designer region at a particular index, using array notation.

  • 要从集合中移除所有设计器区域的方法。ClearThe Clear method to remove all designer regions from the collection.

构造函数

DesignerRegionCollection()

初始化 DesignerRegionCollection 类的新实例。Initializes a new instance of the DesignerRegionCollection class.

DesignerRegionCollection(ControlDesigner)

为指定的控件设计器初始化 DesignerRegionCollection 类的新实例。Initializes a new instance of the DesignerRegionCollection class for the specified control designer.

属性

Count

获取集合中 DesignerRegion 对象的数量。Gets the number of DesignerRegion objects in the collection.

IsFixedSize

获取一个值,该值指示 DesignerRegionCollection 对象是否具有固定大小。Gets a value indicating whether the DesignerRegionCollection object has a fixed size.

IsReadOnly

获取一个值,该值指示 DesignerRegionCollection 对象是否为只读。Gets a value indicating whether the DesignerRegionCollection object is read-only.

IsSynchronized

获取一个值,该值指示对 DesignerRegionCollection 对象的访问是否同步(线程安全)。Gets a value indicating whether access to the DesignerRegionCollection object is synchronized (thread safe).

Item[Int32]

获取或设置集合中指定索引处的 DesignerRegion 对象。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

获取一个对象,该对象可用于同步对 DesignerRegionCollection 对象的访问。Gets an object that can be used to synchronize access to the DesignerRegionCollection object.

方法

Add(DesignerRegion)

将指定的 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)

从特定的 Array 索引开始,将集合的元素复制到 Array 对象。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.

(继承自 Object)
GetEnumerator()

返回一个循环访问集合的枚举器。Returns an enumerator that iterates through the collection.

GetHashCode()

用作默认哈希函数。Serves as the default hash function.

(继承自 Object)
GetType()

获取当前实例的 TypeGets the Type of the current instance.

(继承自 Object)
IndexOf(DesignerRegion)

返回指定的 DesignerRegion 对象在集合中的索引。Returns the index of the specified DesignerRegion object within the collection.

Insert(Int32, DesignerRegion)

DesignerRegion 对象插入到集合中的指定索引处。Inserts a DesignerRegion object into the collection at the specified index.

MemberwiseClone()

创建当前 Object 的浅表副本。Creates a shallow copy of the current Object.

(继承自 Object)
Remove(DesignerRegion)

从集合中移除指定的 DesignerRegion 对象。Removes the specified DesignerRegion object from the collection.

RemoveAt(Int32)

移除集合中指定索引处的 DesignerRegion 对象。Removes the DesignerRegion object at the specified index within the collection.

ToString()

返回一个表示当前对象的 string。Returns a string that represents the current object.

(继承自 Object)

显式界面实现

ICollection.CopyTo(Array, Int32)

有关此成员的说明,请参见 CopyTo(Array, Int32)For a description of this member, see CopyTo(Array, Int32).

ICollection.Count

有关此成员的说明,请参见 CountFor a description of this member, see Count.

ICollection.IsSynchronized

有关此成员的说明,请参见 IsSynchronizedFor a description of this member, see IsSynchronized.

ICollection.SyncRoot

有关此成员的说明,请参见 SyncRootFor a description of this member, see SyncRoot.

IEnumerable.GetEnumerator()

有关此成员的说明,请参见 GetEnumerator()For a description of this member, see GetEnumerator().

IList.Add(Object)

有关此成员的说明,请参见 Add(Object)For a description of this member, see Add(Object).

IList.Clear()

有关此成员的说明,请参见 Clear()For a description of this member, see Clear().

IList.Contains(Object)

有关此成员的说明,请参见 Contains(Object)For a description of this member, see Contains(Object).

IList.IndexOf(Object)

有关此成员的说明,请参见 IndexOf(Object)For a description of this member, see IndexOf(Object).

IList.Insert(Int32, Object)

有关此成员的说明,请参见 Insert(Int32, Object)For a description of this member, see Insert(Int32, Object).

IList.IsFixedSize

有关此成员的说明,请参见 IsFixedSizeFor a description of this member, see IsFixedSize.

IList.IsReadOnly

有关此成员的说明,请参见 IsReadOnlyFor a description of this member, see IsReadOnly.

IList.Item[Int32]

有关此成员的说明,请参见 Item[Int32]For a description of this member, see Item[Int32].

IList.Remove(Object)

有关此成员的说明,请参见 Remove(Object)For a description of this member, see Remove(Object).

IList.RemoveAt(Int32)

有关此成员的说明,请参见 RemoveAt(Int32)For a description of this member, see RemoveAt(Int32).

扩展方法

Cast<TResult>(IEnumerable)

IEnumerable 的元素强制转换为指定的类型。Casts the elements of an IEnumerable to the specified type.

OfType<TResult>(IEnumerable)

根据指定类型筛选 IEnumerable 的元素。Filters the elements of an IEnumerable based on a specified type.

AsParallel(IEnumerable)

启用查询的并行化。Enables parallelization of a query.

AsQueryable(IEnumerable)

IEnumerable 转换为 IQueryableConverts an IEnumerable to an IQueryable.

适用于

另请参阅