IXRItemCollection::Add (Compact 2013)

3/28/2014

This method adds an item to the end of this collection and retrieves the index where it was added.

Syntax

virtual HRESULT STDMETHODCALLTYPE Add(
    __in XRValue* pValue,
    __out_opt int* pIndex
) = 0;

Parameters

  • pValue
    [in] Pointer to an XRValue object that represents an item to add to this collection.
  • pIndex
    [out] Optional. Pointer to an integer value that indicates the zero-based index that describes the location of the item added to this collection.

Return Value

Returns S_OK if successful; otherwise, returns an HRESULT error code. For common error codes for XAML for Windows Embedded, see XAML for Windows Embedded Error Messages.

Remarks

To use a specific interface pointer type, you can use the helper template version of this method that XAML for Windows Embedded provides. When you supply a derived type, this version automatically supplies a type-safe method that implicitly converts the returned type from a generic interface so you do not have to explicitly call QueryInterface to convert the generic interface into the required object type.

.NET Framework Equivalent

System.Windows.PresentationFrameworkCollection(T).Add

Requirements

Header

XamlRuntime.h

sysgen

SYSGEN_XAML_RUNTIME

See Also

Reference

IXRItemCollection
IXRItemsControl::GetItems