Share via


UIElementCollection Class

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

Represents an ordered collection of UIElement objects.

Inheritance Hierarchy

System. . :: . .Object
  Microsoft.SPOT.Presentation..::..UIElementCollection

Namespace:  Microsoft.SPOT.Presentation
Assembly:  Microsoft.SPOT.TinyCore (in Microsoft.SPOT.TinyCore.dll)

Syntax

'Declaration
Public Class UIElementCollection _
    Implements ICollection, IEnumerable
public class UIElementCollection : ICollection, 
    IEnumerable
public ref class UIElementCollection : ICollection, 
    IEnumerable
type UIElementCollection =  
    class
        interface ICollection
        interface IEnumerable
    end
public class UIElementCollection implements ICollection, IEnumerable

The UIElementCollection type exposes the following members.

Constructors

  Name Description
Public method UIElementCollection Initializes a new instance of the UIElementCollection class.

Top

Properties

  Name Description
Public property Capacity Gets or sets the maximum number of elements that the current collection can contain.
Public property Count Gets the actual number of elements in the current collection.
Public property IsSynchronized Gets a value that indicates whether access to the ICollection interface is synchronized (that is, thread-safe).
Public property Item Gets or sets the element that is stored at a specified index number (position) in the current collection.
Public property SyncRoot Gets an object that you can use to synchronize access to the ICollection interface.

Top

Methods

  Name Description
Public method Add Adds a specified element to the current collection at a specified index number (position).
Public method Clear Removes all elements from the current collection.
Public method Contains Determines whether the current collection contains a specified element.
Public method CopyTo(Array, Int32) Copies the UIElement objects from the current collection to an array, starting at a specified index number (position) in the collection.
Public method CopyTo(array<UIElement> [] () [] [], Int32) Copies the UIElement objects from the current collection to an array of UIElement objects, starting at a specified index number (position) in the collection.
Public method Equals(Object) Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Protected method Finalize Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public method GetHashCode Serves as a hash function for a particular type. (Inherited from Object.)
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Public method IndexOf Returns the index number (position) of a specified element in the current collection.
Public method Insert Inserts a specified element into the current collection at a specified index number (position).
Protected method MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Public method Remove Removes a specified element from the current collection.
Public method RemoveAt Removes from the current collection the element at the specified index number (position) in the collection.
Public method RemoveRange Removes from the current collection a range of elements starting at a specified index number (position) in the collection.
Public method ToString Returns a string that represents the current object. (Inherited from Object.)

Top

Explicit Interface Implementations

  Name Description
Explicit interface implemetationPrivate method IEnumerable. . :: . .GetEnumerator Retrieves an enumerator that can be used to iterate through the current collection.

Top

Remarks

The Panel class uses a UIElementCollection object to represent its collection of child elements. Methods and properties defined by the UIElementCollection class affect all objects derived from the Panel class and define a common feature set you can use to manipulate Panel child elements.

A UIElementCollection object has affinity to its own context (class). You must access the collection from the context of the owning Panel object.

Thread Safety

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

See Also

Reference

Microsoft.SPOT.Presentation Namespace