次の方法で共有


IXRStylusPointCollection::IndexOf (Compact 2013)

3/28/2014

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

Syntax

virtual HRESULT STDMETHODCALLTYPE IndexOf(
    __in IXRStylusPoint* pStylusPoint,
    __out_opt int* pIndex
) = 0;

Parameters

  • pStylusPoint
    [in] Pointer to an IXRStylusPoint object that represents an item to locate in this collection.
  • pIndex
    [out] Pointer to an integer value that indicates the zero-based index of the last occurrence of pStylusPoint 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 IXRStylusPointCollection::GetCount.

By default, this method searches the collection starting at the last item, and ending at the first item. Because an object cannot exist more than once in a visual tree, an item can occur only once in this object collection.

.NET Framework Equivalent

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

Requirements

Header

XamlRuntime.h

sysgen

SYSGEN_XAML_RUNTIME

See Also

Reference

IXRStylusPointCollection
XRMouseEventArgs
IXRStroke::SetStylusPoints
IXRStroke::GetStylusPoints
IXRStroke::HitTest
IXRStrokeCollection::HitTest