IndexOf Method

DependencyObjectCollection<T>.IndexOf Method

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

Gets the index of the specified object within the collection, or -1 if the object is not in the collection.

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

public int IndexOf(
	T item
)

Parameters

item
Type: T
The object to locate in the collection.

Return Value

Type: System.Int32
The index of the first occurrence of item within the collection, or -1 if item is not in the collection.

Implements

IList<T>.IndexOf(T)

ExceptionCondition
ArgumentException

item is not a DependencyObject.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1

Windows Phone

Show:
© 2017 Microsoft