次の方法で共有


IXRList::Insert (Compact 2013)

3/28/2014

This method inserts an item into the IXRList collection at the location specified by the index value.

Syntax

virtual HRESULT STDMETHODCALLTYPE Insert(
    __in int nIndex, 
    __in XRValue * pValue
) = 0;

Parameters

  • nIndex
    [in] Integer value that indicates the zero-based index value at which pValue should be inserted.
  • pValue
    [in] Pointer to the XRValue object that represents the item to insert.

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

When an item is inserted in this collection, the subsequent items are moved to the next indexed position.

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).IList.Insert

Requirements

Header

XamlRuntime.h

sysgen

SYSGEN_XAML_RUNTIME

See Also

Reference

IXRList
XRCollectionChangedCustomEventArgs