Share via


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:
 virtual int IndexFromContainer(DependencyObject ^ container) = IndexFromContainer;
/// [Windows.Foundation.Metadata.Deprecated("IndexFromContainer may be altered or unavailable for releases after Windows 8.1. Instead, use ItemsControl.IndexFromContainer.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, "Microsoft.UI.Xaml.WinUIContract")]
int IndexFromContainer(DependencyObject const& container);
[Windows.Foundation.Metadata.Deprecated("IndexFromContainer may be altered or unavailable for releases after Windows 8.1. Instead, use ItemsControl.IndexFromContainer.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, "Microsoft.UI.Xaml.WinUIContract")]
public int IndexFromContainer(DependencyObject container);
function indexFromContainer(container)
Public Function IndexFromContainer (container As DependencyObject) As Integer

Parameters

container
DependencyObject

The generated container to retrieve the item index for.

Returns

Int32

int

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

Attributes

Applies to