IndexFromContainer Method

ItemContainerGenerator.IndexFromContainer Method

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

Returns the index to the item that has the specified, generated container.

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

public int IndexFromContainer(
	DependencyObject container


Type: System.Windows.DependencyObject
The generated container to retrieve the item index for.

Return Value

Type: System.Int32
The index to the item that corresponds to the specified generated container.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

© 2016 Microsoft