Add Method

DependencyObjectCollection<T>.Add Method

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

Adds the specified object to the end of the collection.

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

public void Add(
	T item
)

Parameters

item
Type: T
The object to add to the collection.

Implements

ICollection<T>.Add(T)

ExceptionCondition
ArgumentException

item is not a DependencyObject.

InvalidOperationException

The method is being called in a CollectionChanged event handler.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1

Windows Phone

Show:
© 2017 Microsoft