CompositeCollection Class
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Enables multiple collections and items to be displayed as a single list.
public ref class CompositeCollection : System::Collections::IList, System::Collections::Specialized::INotifyCollectionChanged, System::ComponentModel::ICollectionViewFactory, System::Windows::IWeakEventListener
[System.Windows.Localizability(System.Windows.LocalizationCategory.Ignore)]
public class CompositeCollection : System.Collections.IList, System.Collections.Specialized.INotifyCollectionChanged, System.ComponentModel.ICollectionViewFactory, System.Windows.IWeakEventListener
[<System.Windows.Localizability(System.Windows.LocalizationCategory.Ignore)>]
type CompositeCollection = class
interface IList
interface ICollection
interface IEnumerable
interface INotifyCollectionChanged
interface ICollectionViewFactory
interface IWeakEventListener
[<System.Windows.Localizability(System.Windows.LocalizationCategory.Ignore)>]
type CompositeCollection = class
interface ICollection
interface IEnumerable
interface IList
interface INotifyCollectionChanged
interface ICollectionViewFactory
interface IWeakEventListener
Public Class CompositeCollection
Implements ICollectionViewFactory, IList, INotifyCollectionChanged, IWeakEventListener
- Inheritance
-
CompositeCollection
- Attributes
- Implements
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.
Composite |
Creates a new instance of the CompositeCollection class that is empty and has default initial capacity. |
Composite |
Creates a new instance of the CompositeCollection class that is empty and has a specified initial capacity. |
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. |
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. |
Copy |
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) |
Get |
Serves as the default hash function. (Inherited from Object) |
Get |
Gets the Type of the current instance. (Inherited from Object) |
Index |
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. |
Memberwise |
Creates a shallow copy of the current Object. (Inherited from Object) |
Receive |
Handles events from the centralized event table. |
Remove(Object) |
Removes the given item reference from the collection. All remaining items move up by one. |
Remove |
Removes an item from the collection at the given index. All remaining items move up by one. |
To |
Returns a string that represents the current object. (Inherited from Object) |
Collection |
Occurs when the collection changes, either by adding or removing an item. |
ICollection. |
This member supports the Windows Presentation Foundation (WPF) infrastructure and is not intended to be used directly from your code. |
ICollection. |
This member supports the Windows Presentation Foundation (WPF) infrastructure and is not intended to be used directly from your code. |
ICollection |
This member supports the Windows Presentation Foundation (WPF) infrastructure and is not intended to be used directly from your code. |
IEnumerable. |
Returns an enumerator. |
IList. |
This member supports the Windows Presentation Foundation (WPF) infrastructure and is not intended to be used directly from your code. |
IList. |
This member supports the Windows Presentation Foundation (WPF) infrastructure and is not intended to be used directly from your code. |
INotify |
Occurs when the collection has changed. |
IWeak |
This member supports the Windows Presentation Foundation (WPF) infrastructure and is not intended to be used directly from your code. |
Cast<TResult>(IEnumerable) |
Casts the elements of an IEnumerable to the specified type. |
Of |
Filters the elements of an IEnumerable based on a specified type. |
As |
Enables parallelization of a query. |
As |
Converts an IEnumerable to an IQueryable. |
Product | Versions |
---|---|
.NET Framework | 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
Windows Desktop | 3.0, 3.1, 5, 6, 7, 8, 9 |
.NET feedback
.NET is an open source project. Select a link to provide feedback: