CompositeCollection Class

 

Enables multiple collections and items to be displayed as a single list.

Namespace:   System.Windows.Data
Assembly:  PresentationFramework (in PresentationFramework.dll)

System.Object
  System.Windows.Data.CompositeCollection

[LocalizabilityAttribute(LocalizationCategory.Ignore)]
public class CompositeCollection : IList, ICollection, IEnumerable, 
	INotifyCollectionChanged, ICollectionViewFactory, IWeakEventListener

NameDescription
System_CAPS_pubmethodCompositeCollection()

Creates a new instance of the CompositeCollection class that is empty and has default initial capacity.

System_CAPS_pubmethodCompositeCollection(Int32)

Creates a new instance of the CompositeCollection class that is empty and has a specified initial capacity.

NameDescription
System_CAPS_pubpropertyCount

Gets the number of items stored in this collection.

System_CAPS_pubpropertyItem[Int32]

Indexer property that retrieves or replaces the item at the given zero-based offset in the collection.

NameDescription
System_CAPS_pubmethodAdd(Object)

Adds the specified item to this collection.

System_CAPS_pubmethodClear()

Clears the collection.

System_CAPS_pubmethodContains(Object)

Checks to see if a given item is in this collection.

System_CAPS_pubmethodCopyTo(Array, Int32)

Makes a shallow copy of object references from this collection to the given array.

System_CAPS_pubmethodEquals(Object)

Determines whether the specified object is equal to the current object.(Inherited from Object.)

System_CAPS_protmethodFinalize()

Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.(Inherited from Object.)

System_CAPS_pubmethodGetHashCode()

Serves as the default hash function. (Inherited from Object.)

System_CAPS_pubmethodGetType()

Gets the Type of the current instance.(Inherited from Object.)

System_CAPS_pubmethodIndexOf(Object)

Returns the index in this collection where the given item is found.

System_CAPS_pubmethodInsert(Int32, Object)

Inserts an item in the collection at a given index. All items after the given position are moved down by one.

System_CAPS_protmethodMemberwiseClone()

Creates a shallow copy of the current Object.(Inherited from Object.)

System_CAPS_protmethodReceiveWeakEvent(Type, Object, EventArgs)

Handles events from the centralized event table.

System_CAPS_pubmethodRemove(Object)

Removes the given item reference from the collection. All remaining items move up by one.

System_CAPS_pubmethodRemoveAt(Int32)

Removes an item from the collection at the given index. All remaining items move up by one.

System_CAPS_pubmethodToString()

Returns a string that represents the current object.(Inherited from Object.)

NameDescription
System_CAPS_proteventCollectionChanged

Occurs when the collection changes, either by adding or removing an item.

NameDescription
System_CAPS_pubinterfaceSystem_CAPS_priveventINotifyCollectionChanged.CollectionChanged

Occurs when the collection has changed.

System_CAPS_pubinterfaceSystem_CAPS_privmethodIEnumerable.GetEnumerator()

Returns an enumerator.

System_CAPS_pubinterfaceSystem_CAPS_privmethodICollectionViewFactory.CreateView()

This member supports the Windows Presentation Foundation (WPF) infrastructure and is not intended to be used directly from your code.

System_CAPS_pubinterfaceSystem_CAPS_privmethodIWeakEventListener.ReceiveWeakEvent(Type, Object, EventArgs)

This member supports the Windows Presentation Foundation (WPF) infrastructure and is not intended to be used directly from your code.

System_CAPS_pubinterfaceSystem_CAPS_privpropertyICollection.IsSynchronized

This member supports the Windows Presentation Foundation (WPF) infrastructure and is not intended to be used directly from your code.

System_CAPS_pubinterfaceSystem_CAPS_privpropertyICollection.SyncRoot

This member supports the Windows Presentation Foundation (WPF) infrastructure and is not intended to be used directly from your code.

System_CAPS_pubinterfaceSystem_CAPS_privpropertyIList.IsFixedSize

This member supports the Windows Presentation Foundation (WPF) infrastructure and is not intended to be used directly from your code.

System_CAPS_pubinterfaceSystem_CAPS_privpropertyIList.IsReadOnly

This member supports the Windows Presentation Foundation (WPF) infrastructure and is not intended to be used directly from your code.

NameDescription
System_CAPS_pubmethodAsParallel()

Overloaded. Enables parallelization of a query.(Defined by ParallelEnumerable.)

System_CAPS_pubmethodAsQueryable()

Overloaded. Converts an IEnumerable to an IQueryable.(Defined by Queryable.)

System_CAPS_pubmethodCast<TResult>()

Casts the elements of an IEnumerable to the specified type.(Defined by Enumerable.)

System_CAPS_pubmethodOfType<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.

.NET Framework
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.

Return to top
Show: