CompositeCollection Class
Enables multiple collections and items to be displayed as a single list.
Assembly: PresentationFramework (in PresentationFramework.dll)
| Name | Description | |
|---|---|---|
![]() | CompositeCollection() | Creates a new instance of the CompositeCollection class that is empty and has default initial capacity. |
![]() | CompositeCollection(Int32) | Creates a new instance of the CompositeCollection class that is empty and has a specified initial capacity. |
| Name | Description | |
|---|---|---|
![]() | Count | Gets the number of items stored in this collection. |
![]() | Item[Int32] | Indexer property that retrieves or replaces the item at the given zero-based offset in the collection. |
| Name | Description | |
|---|---|---|
![]() | Add(Object^) | Adds the specified item to this collection. |
![]() | Clear() | Clears the collection. |
![]() | Contains(Object^) | Checks to see if a given item is in this collection. |
![]() | CopyTo(Array^, Int32) | Makes a shallow copy of object references from this collection to the given array. |
![]() | Equals(Object^) | Determines whether the specified object is equal to the current object.(Inherited from Object.) |
![]() | Finalize() | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.(Inherited from Object.) |
![]() | GetHashCode() | Serves as the default hash function. (Inherited from Object.) |
![]() | GetType() | |
![]() | IndexOf(Object^) | Returns the index in this collection where the given item is found. |
![]() | Insert(Int32, Object^) | Inserts an item in the collection at a given index. All items after the given position are moved down by one. |
![]() | MemberwiseClone() | |
![]() | ReceiveWeakEvent(Type^, Object^, EventArgs^) | Handles events from the centralized event table. |
![]() | Remove(Object^) | Removes the given item reference from the collection. All remaining items move up by one. |
![]() | RemoveAt(Int32) | Removes an item from the collection at the given index. All remaining items move up by one. |
![]() | ToString() | Returns a string that represents the current object.(Inherited from Object.) |
| Name | Description | |
|---|---|---|
![]() | CollectionChanged | Occurs when the collection changes, either by adding or removing an item. |
| Name | Description | |
|---|---|---|
![]() ![]() | INotifyCollectionChanged::CollectionChanged | Occurs when the collection has changed. |
![]() ![]() | IEnumerable::GetEnumerator() | Returns an enumerator. |
![]() ![]() | ICollectionViewFactory::CreateView() | This member supports the Windows Presentation Foundation (WPF) infrastructure and is not intended to be used directly from your code. |
![]() ![]() | IWeakEventListener::ReceiveWeakEvent(Type^, Object^, EventArgs^) | This member supports the Windows Presentation Foundation (WPF) infrastructure and is not intended to be used directly from your code. |
![]() ![]() | ICollection::IsSynchronized | This member supports the Windows Presentation Foundation (WPF) infrastructure and is not intended to be used directly from your code. |
![]() ![]() | ICollection::SyncRoot | This member supports the Windows Presentation Foundation (WPF) infrastructure and is not intended to be used directly from your code. |
![]() ![]() | IList::IsFixedSize | This member supports the Windows Presentation Foundation (WPF) infrastructure and is not intended to be used directly from your code. |
![]() ![]() | IList::IsReadOnly | This member supports the Windows Presentation Foundation (WPF) infrastructure and is not intended to be used directly from your code. |
| Name | Description | |
|---|---|---|
![]() | AsParallel() | Overloaded. Enables parallelization of a query.(Defined by ParallelEnumerable.) |
![]() | AsQueryable() | Overloaded. Converts an IEnumerable to an IQueryable.(Defined by Queryable.) |
![]() | Cast<TResult>() | Casts the elements of an IEnumerable to the specified type.(Defined by Enumerable.) |
![]() | OfType<TResult>() | Filters the elements of an IEnumerable based on a specified type.(Defined by Enumerable.) |
CompositeCollection can contain items such as strings, objects, XML nodes, elements, as well as other collections. An ItemsControl uses the data in the CompositeCollection to generate its content according to its ItemTemplate. For more information about using ItemsControl objects to bind to collections, see the Binding to Collections section of the Data Binding Overview.
Available since 3.0
Any public static ( Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.







