ItemsControl.IndexFromContainer(DependencyObject) 方法

定義

將索引傳回至具有指定且產生的容器的專案。

public:
 virtual int IndexFromContainer(DependencyObject ^ container) = IndexFromContainer;
int IndexFromContainer(DependencyObject const& container);
public int IndexFromContainer(DependencyObject container);
function indexFromContainer(container)
Public Function IndexFromContainer (container As DependencyObject) As Integer

參數

container
DependencyObject

要為其擷取專案索引的產生的容器。

傳回

Int32

int

對應至指定所產生容器之專案的索引,如果 container 找不到 ,則為 -1。

實作

適用於