Represents an ordered collection of UIElement objects.
Inheritance
- Object
- UIElementCollection
Syntax
<panelobject> oneOrMoreChildren </panelobject>
XAML Values
- oneOrMoreChildren
-
One or more objects elements for classes that derive from UIElement.
- panelobject
-
Object element (opening and closing tags) for a class that derives from Panel. Typically this is one of the panels, such as Canvas, Grid, or StackPanel.
Attributes
- MarshalingBehaviorAttribute(Agile)
- ThreadingAttribute(Both)
- VersionAttribute(NTDDI_WIN8)
- WebHostHiddenAttribute()
Members
The UIElementCollection class has these types of members:
Methods
The UIElementCollection class has these methods. It also inherits methods from the Object class.
| Method | Description |
|---|---|
| Append | Adds a new item to the collection. |
| Clear | Removes all items from the collection. |
| Contains [C#, VB] | Determines whether an element is in the collection. |
| CopyTo [C#, VB] | Copies the elements of the collection to an array, starting at a particular array index in the destination array. |
| First | Returns the iterator object that can iterate over the items in the UIElementCollection. |
| GetAt | Returns the item located at the specified index. |
| GetEnumerator [C#, VB] | Returns an enumerator that iterates through a collection. |
| GetMany | Retrieves multiple elements in a single pass through the iterator. |
| GetView | Gets an immutable view into the collection. |
| IndexOf | Retrieves the index of the specified item. |
| IndexOf [C#, VB] | Determines the index of a specific item in the collection. |
| Insert [C#, VB] | Inserts an item into the collection at the specified index. |
| InsertAt | Inserts the specified item at the specified index. |
| Remove [C#, VB] | Removes a specific object from the collection. |
| RemoveAt | Removes the item at the specified index. |
| RemoveAt [C#, VB] | Removes the element at the specified index of the collection. |
| RemoveAtEnd | Removes the last item in the collection. |
| ReplaceAll | Initially clears the collection, then inserts the provided array as new items. |
| SetAt | Sets the value at the specified index to the UIElement value specified. |
Properties
The UIElementCollection class has these properties.
| Property | Access type | Description |
|---|---|---|
|
Count [C#, VB] | Read-only | Gets the number of elements that are contained in the collection. |
|
IsReadOnly [C#, VB] | Read-only | Gets a value indicating whether the collection is read-only. |
|
Item [C#, VB] | Read/write | Gets or sets the element at the specified index. |
| Read-only | Gets the size (count) of the collection. |
Requirements
|
Minimum supported client | Windows 8 [Windows Store apps only] |
|---|---|
|
Minimum supported server | Windows Server 2012 [Windows Store apps only] |
|
Namespace |
|
|
Metadata |
|
See also
Build date: 3/12/2013