System 4.0.0.0 System.Collections.ObjectModel.Collection<T> T System.Collections.Specialized.INotifyCollectionChanged System.ComponentModel.INotifyPropertyChanged System.Runtime.CompilerServices.TypeForwardedFrom("WindowsBase, Version=3.0.0.0, PublicKeyToken=31bf3856ad364e35") To be added.

In many cases the data that you work with is a collection of objects. For example, a common scenario in data binding is to use an such as a , , or to display a collection of records.

You can enumerate over any collection that implements the interface. However, to set up dynamic bindings so that insertions or deletions in the collection update the TLA2#tla_ui automatically, the collection must implement the interface. This interface exposes the event, an event that should be raised whenever the underlying collection changes.

TLA2#tla_winclient provides the class, which is a built-in implementation of a data collection that implements the interface.

Before implementing your own collection, consider using or one of the existing collection classes, such as , , and , among many others. If you have an advanced scenario and want to implement your own collection, consider using , which provides a non-generic collection of objects that can be individually accessed by index. Implementing provides the best performance with the data binding engine.

To fully support transferring data values from binding source objects to binding targets, each object in your collection that supports bindable properties must implement an appropriate property changed notification mechanism such as the interface.

For more information, see "Binding to Collections" in Data Binding Overview.

## Notes on XAML Usage

can be used as a XAML object element in TLA#tla_winclient, in versions 3.0 and 3.5. However, the usage has substantial limitations.

must be the root element, because the x:TypeArguments attribute that must be used to specify the constrained type of the generic is only supported on the object element for the root element.

You must declare an x:Class attribute (which entails that the build action for this XAML file must be Page or some other build action that compiles the XAML).

is in a namespace and assembly that are not initially mapped to the default XML namespace. You must map a prefix for the namespace and assembly, and then use that prefix on the object element tag for .

A more straightforward way to use capabilities from XAML in an application is to declare your own non-generic custom collection class that derives from , and constrains it to a specific type. Then map the assembly that contains this class, and reference it as an object element in your XAML.

## XAML Text Usage

See Remarks.

Represents a dynamic data collection that provides notifications when items get added, removed, or when the whole list is refreshed.

- Constructor
  4.0.0.0
  To be added.

  Initializes a new instance of the class.

- Constructor
  4.0.0.0
  To be added.
  To be added.
  To be added.
- Constructor
  4.0.0.0
  To be added.
  To be added.
  To be added.
- Method
  4.0.0.0
  System.IDisposable To be added.

  Disallows reentrant attempts to change this collection.

  An object that can be used to dispose of the object.

- Method
  4.0.0.0
  System.Void To be added.

  Checks for reentrant attempts to change this collection.

- Method
  4.0.0.0
  System.Void

  The base class calls this method when the list is being cleared. This implementation raises the event.

  For more information, see the method of the base class.

  Removes all items from the collection.

- Event
  4.0.0.0
  System.Collections.Specialized.NotifyCollectionChangedEventHandler To be added.

  Occurs when an item is added, removed, changed, moved, or the entire list is refreshed.

- Method
  4.0.0.0
  System.Void `` `` To be added. To be added. To be added. To be added.
- Method
  4.0.0.0
  System.Void `` ``

  Subclasses can override the method to provide custom behavior for this method.

  Moves the item at the specified index to a new location in the collection.

  The zero-based index specifying the location of the item to be moved. The zero-based index specifying the new location of the item.
- Method
  4.0.0.0
  System.Void `` ``

  This implementation raises the event.

  Subclasses can override this protected method to provide custom behavior for the method.

  Moves the item at the specified index to a new location in the collection.

  The zero-based index specifying the location of the item to be moved. The zero-based index specifying the new location of the item.
- Method
  4.0.0.0
  System.Void ``

  Properties and methods that modify this collection raise the event through this virtual method.

  Raises the event with the provided arguments.

  Arguments of the event being raised.
- Method
  4.0.0.0
  System.Void `` To be added.

  Raises the event with the provided arguments.

  Arguments of the event being raised.
- Event
  4.0.0.0
  System.ComponentModel.PropertyChangedEventHandler To be added.

  Occurs when a property value changes.

- Method
  4.0.0.0
  System.Void ``

  The base class calls this method when an item is removed from the collection. This implementation raises the event.

  For more information, see the method of the base class.

  Removes the item at the specified index of the collection.

  The zero-based index of the element to remove.
- Method
  4.0.0.0
  System.Void `` `` To be added. To be added. To be added. To be added.