Udostępnij za pośrednictwem


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, Windows.Foundation.UniversalApiContract)]
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, "Windows.Foundation.UniversalApiContract")]
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, typeof(Windows.Foundation.UniversalApiContract))]
public int IndexFromContainer(DependencyObject 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, "Windows.Foundation.UniversalApiContract")]
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