IXRPointCollection::IndexOf (Compact 2013)

3/28/2014

This method searches for the specified item and retrieves the zero-based index of its first occurrence within the IXRPointCollection collection.

Syntax

virtual HRESULT STDMETHODCALLTYPE IndexOf(
    __in XRPoint* pPoint,
    __out_opt int* pIndex
) = 0;

Parameters

  • pPoint
    [in] Pointer to an XRPoint object that represents an item to locate in this collection.
  • pIndex
    [out] Pointer to an int value that indicates the zero-based index of the last occurrence of pPoint within this collection.

Return Value

Returns an HRESULT that indicates success or failure.

Remarks

This method performs a linear search through the collection; therefore, the average execution time is proportional to the number of items. You can retrieve the number of items by using IXRPointCollection::GetCount.

By default, this method searches the collection starting at the last item, and ending at the first item. However, if this collection contains the item in pPoint more than once, it will retrieve the first occurrence of the item.

.NET Framework Equivalent

System.Windows.PresentationFrameworkCollection(T).IList.IndexOf

Requirements

Header

XamlRuntime.h

sysgen

SYSGEN_XAML_RUNTIME

See Also

Reference

IXRPointCollection
IXRPolyLineSegment::GetPoints
IXRPolyLineSegment::SetPoints
IXRPolyBezierSegment::GetPoints
IXRPolyBezierSegment::SetPoints
IXRPolyQuadraticBezierSegment::GetPoints
IXRPolyQuadraticBezierSegment::SetPoints
IXRPolygon::GetPoints
IXRPolygon::SetPoints
IXRPolyline::GetPoints
IXRPolyline::SetPoints