Compartilhar via


IXREnumerator (Compact 2013)

3/28/2014

This C++ class provides methods that enumerate XRValue objects in an IXRValueCollection collection.

Syntax

class IXREnumerator : public IUnknown

Methods

Method

Description

IXREnumerator::GetCurrent

Retrieves the value at the current position of the enumerator.

IXREnumerator::MoveNext

Moves the enumerator to the next value in the collection.

IXREnumerator::Reset

Sets the enumerator to its initial position, which is before the first value in the collection.

Thread Safety

Members of this class are thread safe if you previously called IXRApplication::CreateHostFromXaml and supplied it with an XRWindowCreateParams structure that has AllowsMultipleThreadAccess set to true.

Remarks

To retrieve a pointer to IXREnumerator, call the inherited method IXREnumerable::GetEnumerator from an IXRValueCollection object.

When you implement data binding, use IXREnumerator to enumerate through the IXRValueCollection collection of values in the data source by calling IXREnumerator::MoveNext and, if MoveNext is successful, by calling IXREnumerator::GetCurrent.

This behavior differs from Microsoft Silverlight 3, which offers a variety of enumerators that are structures and do not implement GetCurrent as a member function.

When you create a class instance, use an IXREnumeratorPtr smart pointer instead of a raw interface pointer. For more information, see XRPtr<Interface>.

.NET Framework Equivalent

None.

Requirements

Header

XamlRuntime.h

sysgen

SYSGEN_XAML_RUNTIME

See Also

Reference

Classes for Populating UI Elements with Data