ItemsRepeater.GetElementIndex(UIElement) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Retrieves the index of the item from the data source that corresponds to the specified UIElement.
public:
virtual int GetElementIndex(UIElement ^ element) = GetElementIndex;
int GetElementIndex(UIElement const& element);
public int GetElementIndex(UIElement element);
function getElementIndex(element)
Public Function GetElementIndex (element As UIElement) As Integer
Parameters
- element
- UIElement
The element that corresponds to the item to get the index of.
Returns
int
The index of the item from the data source that corresponds to the specified UIElement, or -1 if the element is not supported.
Remarks
Only UIElements that are direct children of the ItemsRepeater are supported. A value of -1 is returned for unsupported elements.