ItemContainerGenerator.IndexFromContainer(DependencyObject) ItemContainerGenerator.IndexFromContainer(DependencyObject) ItemContainerGenerator.IndexFromContainer(DependencyObject) ItemContainerGenerator.IndexFromContainer(DependencyObject) Method

Definition

Note

IndexFromContainer may be altered or unavailable for releases after Windows 8.1. Instead, use ItemsControl.IndexFromContainer.

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

public : int IndexFromContainer(DependencyObject container)
int32_t IndexFromContainer(DependencyObject container) const;
public int IndexFromContainer(DependencyObject container)
Public Function IndexFromContainer(container As DependencyObject) As int

Parameters

container
DependencyObject DependencyObject

The generated container to retrieve the item index for.

Returns

int int

The index to the item that corresponds to the specified generated container.